Merge d200860965 into 2cad7ebbac
@ -8,6 +8,7 @@ from MCE.custom_widgets.ctk_timeentry import CTkTimeEntry
|
||||
from MCE.custom_widgets.ctk_integerspinbox import CTkIntegerSpinbox
|
||||
from MCE.custom_widgets.ctk_templatedialog import CTkTemplateDialog
|
||||
from MCE.custom_widgets.ctk_notification import CTkNotification
|
||||
from MCE.custom_widgets.ctk_add_button import CTkAddButton
|
||||
from MCE.utils import Linker, Config
|
||||
from filelock import FileLock, Timeout
|
||||
import threading
|
||||
@ -117,7 +118,7 @@ class MCE_Manager(customtkinter.CTk):
|
||||
|
||||
# Helper method to create Mission Tabview with Template and Queue Tabs
|
||||
def create_mission_tabview(self):
|
||||
self.mission_tabview = customtkinter.CTkTabview(self, height=500)
|
||||
self.mission_tabview = customtkinter.CTkTabview(self)
|
||||
self.mission_tabview.grid(row=17, column=0, columnspan=3, padx=20)
|
||||
|
||||
self.tab_template = self.mission_tabview.add('Template')
|
||||
@ -134,11 +135,11 @@ class MCE_Manager(customtkinter.CTk):
|
||||
self.template_labels.grid(row=0, column=0, sticky="ew")
|
||||
|
||||
self.mode_label = customtkinter.CTkLabel(self.template_labels, text="Mode:", font=customtkinter.CTkFont(underline=True))
|
||||
self.mode_tooltip = CTkToolTip(self.mode_label, message="N:Mission Normal\nH:Mission Hard\nE:Event Quest\nBD:Commissions EXP\nIR:Commissions Credits\n")
|
||||
self.mode_tooltip = CTkToolTip(self.mode_label, message="N : Mission Normal\nH : Mission Hard\nE : Event Quest\nXP : Commissions EXP\nCR : Commissions Credits\n", justify=tk.LEFT)
|
||||
self.mode_label.grid(row=1, column=0, padx=(130, 0), pady=5)
|
||||
|
||||
self.stage_label = customtkinter.CTkLabel(self.template_labels, text="Stage:", font=customtkinter.CTkFont(underline=True))
|
||||
self.stage_tooltip = CTkToolTip(self.stage_label, message="Valid format for Mission: 1-1\nValid format for Commissions/Event: 01")
|
||||
self.stage_tooltip = CTkToolTip(self.stage_label, message="Valid format\nMission: 1-1, 3-A\nCommissions & Event: 01", justify=tk.LEFT)
|
||||
self.stage_label.grid(row=1, column=1, padx=(40, 20), pady=5)
|
||||
|
||||
self.run_times_label = customtkinter.CTkLabel(self.template_labels, text="Number of Sweeps:", font=customtkinter.CTkFont(underline=True))
|
||||
@ -151,7 +152,8 @@ class MCE_Manager(customtkinter.CTk):
|
||||
self.highlight_label = customtkinter.CTkLabel(self.template_buttons_frame, text="*You can double click an entry and press up or down arrow to change its position", font=customtkinter.CTkFont(family="Inter", size=12))
|
||||
self.highlight_label.grid(row=0, column=0, columnspan=3)
|
||||
|
||||
self.add_button = customtkinter.CTkButton(self.template_buttons_frame , text="Add", command=lambda queue=queue: self.add_frame(queue=queue))
|
||||
self.add_button = CTkAddButton(master=self.template_buttons_frame)
|
||||
self.add_button.button.configure(command=lambda queue=queue, button=self.add_button.button: self.add_frame(queue=queue, button=button))
|
||||
self.add_button.grid(row=1, column=0, padx=5, pady=5)
|
||||
|
||||
# Clear button to clear all frames
|
||||
@ -166,10 +168,10 @@ class MCE_Manager(customtkinter.CTk):
|
||||
|
||||
# Helper method to create Template Frame and Queue Frame
|
||||
def create_template_and_queue_frames(self):
|
||||
self.template_frame = customtkinter.CTkScrollableFrame(self.tab_template, width=400, height=350)
|
||||
self.template_frame = customtkinter.CTkScrollableFrame(self.tab_template, width=435, height=350)
|
||||
self.template_frame.grid(row=1, column=0, sticky="nsew")
|
||||
|
||||
self.queue_frame = customtkinter.CTkScrollableFrame(self.tab_queue, width=400, height=350)
|
||||
self.queue_frame = customtkinter.CTkScrollableFrame(self.tab_queue, width=435, height=350)
|
||||
self.queue_frame.grid(row=1, column=0, sticky="nsew")
|
||||
|
||||
# Helper method to create Lists to Store Frame Widgets
|
||||
@ -211,7 +213,7 @@ class MCE_Manager(customtkinter.CTk):
|
||||
self.template_optionmenu.set(self.previous_selected)
|
||||
return
|
||||
elif template_name in self.templates_list:
|
||||
CTkMessagebox(title="Error", message="Name is invalid.", icon="cancel")
|
||||
CTkMessagebox(title="Error", message="Name is invalid.", icon="MCE\icons\cancel.png")
|
||||
self.template_optionmenu.set(self.previous_selected)
|
||||
return
|
||||
else:
|
||||
@ -232,7 +234,7 @@ class MCE_Manager(customtkinter.CTk):
|
||||
|
||||
def delete_template(self):
|
||||
msg = CTkMessagebox(title="Template Deletetion", message=f"Are you sure you want to delete Template {self.previous_selected}?",
|
||||
icon="question", option_1="No", option_2="Yes")
|
||||
icon="MCE\icons\question.png", option_1="No", option_2="Yes")
|
||||
response = msg.get()
|
||||
if response=="Yes":
|
||||
if len(self.templates) != 1:
|
||||
@ -250,18 +252,19 @@ class MCE_Manager(customtkinter.CTk):
|
||||
self.template_optionmenu.configure(values=self.templates_list)
|
||||
self.template_optionmenu.set(self.preferred_template)
|
||||
else:
|
||||
CTkMessagebox(title="Error", message="At least one template must exist!!!", icon="cancel")
|
||||
CTkMessagebox(title="Error", message="At least one template must exist!!!", icon="MCE\icons\cancel.png")
|
||||
return
|
||||
|
||||
# Function to add a frame with widgets
|
||||
def add_frame(self, inner_list=None, queue=False, state="normal"):
|
||||
def add_frame(self, inner_list=None, queue=False, state="normal", button=None):
|
||||
position = button.cget("text") if button else "Add Down"
|
||||
frames = self.queue_frames if queue else self.template_frames
|
||||
parent_frame = self.queue_frame if queue else self.template_frame
|
||||
row_index = len(frames) + 1 # Calculate the row for the new frame
|
||||
# Create a frame
|
||||
frame = tk.Frame(parent_frame, bg="gray17")
|
||||
frame.grid(row=row_index, column=0, columnspan=4, padx=10, pady=10, sticky="w")
|
||||
frames.append(frame)
|
||||
frames.append(frame) if position == "Add Down" else frames.insert(0, frame)
|
||||
# "Up" button to move the frame up
|
||||
up_button = customtkinter.CTkButton(frame, text="Up", width=5, command=lambda f=frame, queue=queue: self.move_frame_up(f, queue), state=state)
|
||||
up_button.grid(row=0, column=0, padx=5, pady=5, sticky="w")
|
||||
@ -269,7 +272,7 @@ class MCE_Manager(customtkinter.CTk):
|
||||
down_button = customtkinter.CTkButton(frame, text="Down", width=5, command=lambda f=frame, queue=queue: self.move_frame_down(f, queue), state=state)
|
||||
down_button.grid(row=0, column=1, padx=5, pady=5, sticky="w")
|
||||
# Dropdown menu for mode
|
||||
mode_optionmenu = customtkinter.CTkOptionMenu(frame, width=60, values=["N", "H", "E", "BD", "IR"], state=state)
|
||||
mode_optionmenu = customtkinter.CTkOptionMenu(frame, width=60, values=["N", "H", "E", "XP", "CR"], state=state)
|
||||
mode_optionmenu.set(inner_list[0] if inner_list else "N")
|
||||
mode_optionmenu.grid(row=0, column=2, padx=5, pady=5, sticky="w")
|
||||
# Entry widget for stage
|
||||
@ -289,6 +292,8 @@ class MCE_Manager(customtkinter.CTk):
|
||||
delete_button.grid(row=0, column=5, padx=5, pady=5, sticky="w")
|
||||
|
||||
frame.bind("<Double-Button-1>", lambda event, f=frame: self.highlight_frame(f))
|
||||
if position == "Add Up":
|
||||
self.update_frame_positions(queue=queue)
|
||||
|
||||
# Function to clear all frames
|
||||
def clear_frames(self, queue=False):
|
||||
@ -306,7 +311,7 @@ class MCE_Manager(customtkinter.CTk):
|
||||
mode_optionmenu = frame.winfo_children()[2]
|
||||
stage_entry = frame.winfo_children()[3]
|
||||
if not self.check_entry(mode_optionmenu, stage_entry):
|
||||
CTkMessagebox(title="Error", message="Configuration not saved. Some entries are incomplete or have incorect input.", icon="cancel")
|
||||
CTkMessagebox(title="Error", message="Configuration not saved. Some entries are incomplete or have incorect input.", icon="MCE\icons\cancel.png")
|
||||
return
|
||||
mode = frame.winfo_children()[2].get()
|
||||
stage = frame.winfo_children()[3].get().strip()
|
||||
|
||||
19
MCE/custom_widgets/ctk_add_button.py
Normal file
@ -0,0 +1,19 @@
|
||||
import customtkinter
|
||||
|
||||
class CTkAddButton(customtkinter.CTkFrame):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.button = customtkinter.CTkButton(self, text="Add Down", corner_radius=0, width=120)
|
||||
self.button.grid(row=0, column=0)
|
||||
self.option_menu = customtkinter.CTkOptionMenu(
|
||||
self, values= ["Add Up", "Add Down"], width=10, command=self.set_button, corner_radius=0
|
||||
)
|
||||
self.option_menu.set("")
|
||||
self.option_menu.grid(row=0, column=1)
|
||||
|
||||
def set_button(self, value):
|
||||
self.option_menu.set("")
|
||||
self.button.configure(text=value)
|
||||
|
||||
def configure(self, *args, **kwargs):
|
||||
self.button.configure(*args, **kwargs)
|
||||
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
4
aas.py
@ -62,6 +62,10 @@ class ArisuAutoSweeper(AzurLaneAutoScript):
|
||||
from tasks.mission.mission import Mission
|
||||
Mission(config=self.config, device=self.device).run()
|
||||
|
||||
def schedule(self):
|
||||
from tasks.schedule.schedule import Schedule
|
||||
Schedule(config=self.config, device=self.device).run()
|
||||
|
||||
def data_update(self):
|
||||
from tasks.item.data_update import DataUpdate
|
||||
DataUpdate(config=self.config, device=self.device).run()
|
||||
|
||||
BIN
assets/en/base/popup/LEVEL_UP.BUTTON.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
assets/en/base/popup/LEVEL_UP.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
assets/en/base/popup/LOCATION_LEVEL_UP.BUTTON.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
assets/en/base/popup/LOCATION_LEVEL_UP.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
assets/en/base/popup/QUIT.BUTTON.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
assets/en/base/popup/QUIT.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
assets/en/login/OCR_YEAR.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
BIN
assets/en/mission/EVENT_INDEX.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
assets/en/mission/EVENT_ITEM.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
assets/en/mission/EVENT_LIST.png
Normal file
|
After Width: | Height: | Size: 148 KiB |
BIN
assets/en/mission/EVENT_STARS.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
BIN
assets/en/momotalk/CHATTING.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
assets/en/schedule/CONFIRM.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
assets/en/schedule/FIRST_ITEM.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
assets/en/schedule/LOCATIONS.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
assets/en/schedule/LOCATIONS_POPUP.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
assets/en/schedule/OCR_TICKET.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
assets/en/schedule/START_LESSON.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
assets/zht/base/page/ACCOUNT_INFO_CHECK.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
assets/zht/base/page/BOUNTY_CHECK.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/zht/base/page/CAFE_CHECK.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
assets/zht/base/page/CIRCLE_CHECK.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
assets/zht/base/page/COMMISSIONS_CHECK.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
assets/zht/base/page/CRAFTING_CHECK.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
assets/zht/base/page/EVENT_CHECK.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
assets/zht/base/page/GACHA_CHECK.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
assets/zht/base/page/MAIL_CHECK.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/zht/base/page/MAIN_GO_TO_WORK.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
assets/zht/base/page/MISSION_CHECK.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
assets/zht/base/page/SCHEDULE_CHECK.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
assets/zht/base/page/SCHOOL_EXCHANGE_CHECK.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/zht/base/page/SHOP_CHECK.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
assets/zht/base/page/STORY_CHECK.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
assets/zht/base/page/TACTICAL_CHALLENGE_CHECK.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
assets/zht/base/page/TASK_CHECK.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
assets/zht/base/page/WORK_CHECK.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
assets/zht/base/page/WORK_GO_TO_BOUNTY.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
assets/zht/base/page/WORK_GO_TO_COMMISSIONS.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
assets/zht/base/page/WORK_GO_TO_EVENT.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
assets/zht/base/page/WORK_GO_TO_MISSION.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
assets/zht/base/page/WORK_GO_TO_SCHOOL_EXCHANGE.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
assets/zht/base/page/WORK_GO_TO_STORY.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
assets/zht/base/page/WORK_GO_TO_TACTICAL_CHALLENGE.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
assets/zht/base/popup/AFFECTION_LEVEL_UP.BUTTON.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
assets/zht/base/popup/AFFECTION_LEVEL_UP.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
assets/zht/base/popup/AP_EXCEED.BUTTON.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
assets/zht/base/popup/AP_EXCEED.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
assets/zht/base/popup/GET_REWARD.BUTTON.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
assets/zht/base/popup/GET_REWARD.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
assets/zht/base/popup/GET_REWARD_SKIP.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
assets/zht/base/popup/INSUFFICIENT_INVENTORY.BUTTON.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
assets/zht/base/popup/INSUFFICIENT_INVENTORY.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
assets/zht/base/popup/ITEM_EXPIRED.BUTTON.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/zht/base/popup/ITEM_EXPIRED.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
assets/zht/base/popup/LEVEL_UP.BUTTON.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
assets/zht/base/popup/LEVEL_UP.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
assets/zht/base/popup/LOCATION_LEVEL_UP.BUTTON.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
assets/zht/base/popup/LOCATION_LEVEL_UP.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
assets/zht/base/popup/NETWORK_RECONNECT.BUTTON.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
assets/zht/base/popup/NETWORK_RECONNECT.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
assets/zht/base/popup/NETWORK_RECONNECT_OK.BUTTON.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
assets/zht/base/popup/NETWORK_RECONNECT_OK.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
assets/zht/base/popup/QUIT.BUTTON.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/zht/base/popup/QUIT.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
assets/zht/bounty/CHECK_BOUNTY.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
assets/zht/bounty/CHECK_DESERT_RAILROAD.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
assets/zht/bounty/CHECK_HIGHWAY.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
assets/zht/bounty/CHECK_SCHOOLHOUSE.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
assets/zht/bounty/OCR_TICKET.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
assets/zht/bounty/SELECT_DESERT_RAILROAD.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
assets/zht/bounty/SELECT_HIGHWAY.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
assets/zht/bounty/SELECT_SCHOOLHOUSE.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
assets/zht/cafe/CAFE_FIRST.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
assets/zht/cafe/CAFE_INVITE.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
assets/zht/cafe/CAFE_INVITED.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
assets/zht/cafe/CAFE_SECOND.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
assets/zht/cafe/CHANGE_CAFE_NOT_SELECTED.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
assets/zht/cafe/CHANGE_CAFE_SELECTED.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
assets/zht/cafe/CHECK_MOMOTALK.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
assets/zht/cafe/CHECK_REWARD.BUTTON.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
assets/zht/cafe/CHECK_REWARD.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
assets/zht/cafe/GET_REWARD.BUTTON.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/zht/cafe/GET_REWARD.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
assets/zht/cafe/GET_REWARD_CLOSE.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
assets/zht/cafe/GOT_REWARD.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
assets/zht/cafe/INVENTORY.BUTTON.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
assets/zht/cafe/INVENTORY.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
assets/zht/cafe/INVITE_CONFIRM.BUTTON.png
Normal file
|
After Width: | Height: | Size: 12 KiB |