Skip to content

Commit 877cbd2

Browse files
Added new buttons to configure game screen
1 parent 09446d7 commit 877cbd2

File tree

1 file changed

+57
-27
lines changed

1 file changed

+57
-27
lines changed

src/ue4ss_installer_gui/screens/configure_game.py

Lines changed: 57 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@
66
import dearpygui.dearpygui as dpg
77

88
from ue4ss_installer_gui import settings, ue4ss, constants, translator, file_io
9-
from ue4ss_installer_gui.screens import setup_screen, notification_screen
9+
from ue4ss_installer_gui.screens import (
10+
main_ue4ss_screen,
11+
setup_screen,
12+
notification_screen,
13+
ue4ss_mods_configurator,
14+
ue4ss_settings_configurator,
15+
bp_mod_loader_configurator,
16+
developer_screen
17+
)
1018
from ue4ss_installer_gui.checks import online_check
1119

1220

@@ -272,7 +280,6 @@ def download_ue4ss(user_data):
272280
user_data
273281
)
274282
if game_info:
275-
print(file_io.get_temp_dir())
276283
os.makedirs(str(file_io.get_temp_dir()), exist_ok=True)
277284
file_names_to_download_links = ue4ss.get_file_name_to_download_links_from_tag(
278285
game_info.ue4ss_version
@@ -453,9 +460,9 @@ def push_configure_game_screen(sender, app_data, user_data):
453460
str(user_data)
454461
)
455462
if online_check.is_online:
456-
pos_y = 148
463+
pos_y = 120
457464
else:
458-
pos_y = 288
465+
pos_y = 260
459466
if game_info:
460467
if dpg.does_item_exist("configure_game_modal"):
461468
dpg.delete_item("configure_game_modal")
@@ -468,6 +475,8 @@ def push_configure_game_screen(sender, app_data, user_data):
468475
autosize=True,
469476
no_open_over_existing_popup=False,
470477
pos=[30, pos_y],
478+
no_move=True,
479+
no_resize=True
471480
)
472481

473482
install_dir = str(game_info.install_dir)
@@ -562,7 +571,7 @@ def push_configure_game_screen(sender, app_data, user_data):
562571

563572
refresh_file_to_install_combo_box(user_data)
564573

565-
dpg.add_spacer(parent="configure_game_modal")
574+
dpg.add_spacer(parent="configure_game_modal", height=4)
566575
with dpg.group(horizontal=True, parent="configure_game_modal"):
567576
dpg.add_checkbox(
568577
default_value=game_info.show_pre_releases,
@@ -692,28 +701,49 @@ def push_configure_game_screen(sender, app_data, user_data):
692701
user_data=str(game_info.install_dir),
693702
)
694703

695-
# dpg.add_spacer(parent="configure_game_modal")
696-
# with dpg.group(
697-
# horizontal=True, tag="configure_button_row", parent="configure_game_modal"
698-
# ):
699-
# # finish this, have the button text be localized
700-
# dpg.add_button(
701-
# label='Configure Mods',
702-
# width=250,
703-
# height=28,
704-
# callback=configure_mods,
705-
# user_data=str(game_info.install_dir),
706-
# )
707-
# # finish this, have the button text be localized
708-
# dpg.add_button(
709-
# label='Configure UE4SS Settings',
710-
# width=250,
711-
# height=28,
712-
# callback=configure_ue4ss_settings,
713-
# user_data=str(game_info.install_dir),
714-
# )
715-
716-
dpg.add_spacer(parent="configure_game_modal", height=-1)
704+
dpg.add_spacer(parent="configure_game_modal")
705+
with dpg.group(
706+
horizontal=True, tag="configure_button_row", parent="configure_game_modal"
707+
):
708+
# finish this, have the button text be localized
709+
dpg.add_button(
710+
label='Configure Lua and C++ mods',
711+
width=250,
712+
height=28,
713+
callback=ue4ss_mods_configurator.push_ue4ss_mods_configurator_screen,
714+
user_data=str(game_info.install_dir),
715+
)
716+
# finish this, have the button text be localized
717+
dpg.add_button(
718+
label='Configure UE4SS settings',
719+
width=250,
720+
height=28,
721+
callback=ue4ss_settings_configurator.push_ue4ss_settings_configurator_screen,
722+
user_data=str(game_info.install_dir),
723+
)
724+
725+
dpg.add_spacer(parent="configure_game_modal")
726+
with dpg.group(
727+
horizontal=True, tag="configure_two_button_row", parent="configure_game_modal"
728+
):
729+
# finish this, have the button text be localized
730+
dpg.add_button(
731+
label='Configure UE4SS BP mods',
732+
width=250,
733+
height=28,
734+
callback=bp_mod_loader_configurator.push_bp_mod_loader_configuration_screen,
735+
user_data=str(game_info.install_dir),
736+
)
737+
# finish this, have the button text be localized
738+
dpg.add_button(
739+
label='Developer utilities',
740+
width=250,
741+
height=28,
742+
callback=developer_screen.push_developer_screen,
743+
user_data=str(game_info.install_dir),
744+
)
745+
746+
dpg.add_spacer(parent="configure_game_modal")
717747
dpg.add_button(
718748
label=translator.translator.translate("close_button_text"),
719749
parent="configure_game_modal",

0 commit comments

Comments
 (0)