Skip to content

Commit

Permalink
Launch client args
Browse files Browse the repository at this point in the history
  • Loading branch information
lipeeeee committed Feb 16, 2024
1 parent 4d9dcdc commit adaca02
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sightstone/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ def __get_atr(atr, input):
with dpg.group():
dpg.add_separator()
with dpg.group(horizontal=True):
dpg.add_button(label="Launch Another Client", callback=sightstone_hook.launch_client)
dpg.add_button(label="Launch Another Client", callback=lambda:sightstone_hook.launch_client(args=""))
dpg.add_button(label="Close Client", callback=sightstone_hook.close_client, indent=300)

with dpg.group(horizontal=True):
Expand Down
4 changes: 2 additions & 2 deletions sightstone/sightstone.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ def restart_client_ux(self) -> bool:

return self.is_valid_response(response)

def launch_client(self) -> None:
def launch_client(self, args: str = "") -> None:
"""Launch's another client"""
subprocess.run([self.lca_hook.complete_league_path, "--allow-multiple-clients"])
subprocess.run([self.lca_hook.complete_league_path, f"--allow-multiple-clients {args}"])

def close_client(self) -> bool:
"""Close client"""
Expand Down
13 changes: 13 additions & 0 deletions sightstone/sightstone_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,16 @@
EMOTE_TYPE = "EMOTE"
ICON_TYPE = "SUMMONER_ICON"
COMPANION_TYPE = "COMPANION"

# Client Languages
CLIENT_LANGUAGES = {
"English (US)": "en_US", "Japanese": "ja_JP", "Korean": "ko_KR",
"Chinese (China)": "zh_CN", "German": "de_DE", "Spanish (Spain)": "es_ES",
"Polish": "pl_PL", "Russian": "ru_RU", "French": "fr_FR", "Turkish": "tr_TR",
"Portuguese": "pt_BR", "Czech": "cs_CZ", "Greek": "el_GR", "Romanian": "ro_RO",
"Hungarian": "hu_HU", "English (UK)": "en_GB", "Italian": "it_IT", "Spanish (Mexico)": "es_MX",
"Spanish (Argentina)": "es_AR", "English (Australia)": "en_AU", "Malay": "ms_MY",
"English (Philippines)": "en_PH", "English (Singapore)": "en_SG", "Thai": "th_TH",
"Vietnamese": "vi_VN", "Indonesian": "id_ID", "Tagalog": "tl_PH",
"Chinese (Malaysia)": "zh_MY", "Chinese (Taiwan)": "zh_TW"
}

0 comments on commit adaca02

Please sign in to comment.