Skip to content

Commit 2b7d2bd

Browse files
style(main_screen.py,-configure_game.py): lowered offline configure game screen, removed social buttons when offline
lowered the y position of the configure game screen when offline, and removed the socials bar when offline, when offline, also increased the scroll bar height Signed-off-by: Mythical-Github <MythicalData@gmail.com>
1 parent 57e5055 commit 2b7d2bd

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

assets/to_do_list.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
Next:
22

33
# automated releases pack windows exe into the linux release somehow, fix this
4-
# offline check removes social buttons
54
# fix installs that only have ue4ss files
6-
# sometimes it doesn't properly remember the preferences of the checkboxes
5+
# sometimes it doesn't properly remember the preferences of the checkboxes, probably related to force toggling off standard/portable
76
# sometimes the install button can be pressed, when no file to install is selected, prevent this somehow
87
# bring back keep mods and settings and make uninstall more robust
98

src/ue4ss_installer_gui/screens/configure_game.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,11 +406,14 @@ def add_centered_text(text, parent, wrap=None):
406406
dpg.add_text(text, wrap=wrap_width)
407407

408408

409-
# have the differing offline functionality occur here
410409
def push_configure_game_screen(sender, app_data, user_data):
411410
game_info = settings.get_game_info_instance_in_settings_from_game_directory(
412411
str(user_data)
413412
)
413+
if online_check.is_online:
414+
pos_y = 160
415+
else:
416+
pos_y = 300
414417
if game_info:
415418
if dpg.does_item_exist("configure_game_modal"):
416419
dpg.delete_item("configure_game_modal")
@@ -422,7 +425,7 @@ def push_configure_game_screen(sender, app_data, user_data):
422425
max_size=[524, 999],
423426
autosize=True,
424427
no_open_over_existing_popup=False,
425-
pos=[30, 160],
428+
pos=[30, pos_y],
426429
)
427430

428431
install_dir = str(game_info.install_dir)

src/ue4ss_installer_gui/screens/main_screen.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
from ue4ss_installer_gui import constants, settings, unreal_engine, translator
1010

11+
from ue4ss_installer_gui.checks import online_check
12+
1113

1214
scroll_area_height = (
1315
constants.WINDOW_HEIGHT
@@ -73,6 +75,10 @@ def add_new_game_to_games_list(game_name: str, game_directory: str):
7375

7476

7577
def init_main_screen_game_list_scroll_box():
78+
global scroll_area_height
79+
from ue4ss_installer_gui.checks.online_check import is_online
80+
if not is_online:
81+
scroll_area_height = scroll_area_height + 40
7682
with dpg.child_window(
7783
width=-1, height=scroll_area_height, tag="GameListScroll", autosize_x=True
7884
):
@@ -161,7 +167,7 @@ def init_main_screen_footer_section():
161167

162168
dpg.add_spacer()
163169

164-
with dpg.group(horizontal=True):
170+
with dpg.group(horizontal=True, tag='socials_group', show=online_check.is_online):
165171
discord_button = dpg.add_button(
166172
label=translator.translator.translate("docs_button_text"),
167173
width=184,

0 commit comments

Comments
 (0)