Skip to content

Commit b1d9411

Browse files
committed
Finalize new GUI
1 parent 6d088ac commit b1d9411

File tree

6 files changed

+41
-28
lines changed

6 files changed

+41
-28
lines changed

Media/discord-icon.png

351 Bytes
Loading

Media/github-icon.png

504 Bytes
Loading
2.58 KB
Loading

Python/gui/gui.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ def run_window():
5555
break
5656
if window == settings_window:
5757
settings_window = None
58+
main_window.Enable()
59+
main_window.BringToFront()
5860

5961
elif event == "CCCP_FOLDER":
6062
cccp_folder = values[event]
@@ -72,6 +74,7 @@ def run_window():
7274

7375
elif event == "LAUNCH_SETTINGS_WINDOW" and settings_window == None:
7476
settings_window = gui_windows.get_settings_window()
77+
main_window.Disable()
7578

7679
elif event in ("SKIP_CONVERSION", "OUTPUT_ZIPS", "PLAY_FINISH_SOUND"):
7780
value = values[event]

Python/gui/gui_windows.py

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,60 +10,73 @@ def get_main_window_layout():
1010
[
1111
sg.FolderBrowse(
1212
"CCCP folder",
13-
# size=(7, 1),
14-
# pad=(
15-
# (15, 15),
16-
# (3, 0),
17-
# )
13+
size=(12, None),
14+
pad=(
15+
(10, 0),
16+
(15, 0)
17+
),
1818
),
19-
sg.In(
19+
sg.InputText(
2020
sg.user_settings_get_entry("cccp_folder"),
21-
size=(43, 1),
2221
tooltip=" Location of your CCCP folder ",
2322
enable_events = True,
2423
key="CCCP_FOLDER",
2524
background_color=sg.theme_input_background_color() if sg.user_settings_get_entry("cccp_folder") else cfg.NO_PATH_SET_COLOR,
25+
font=("Helvetica", 20),
26+
size=(61, None),
2627
pad=(
27-
(0, 0),
28-
(3, 0),
29-
)
28+
(20, 0),
29+
(15, 0)
30+
),
3031
)
3132
],
3233
[
3334
sg.Button(
3435
"Settings",
35-
key="LAUNCH_SETTINGS_WINDOW"
36+
key="LAUNCH_SETTINGS_WINDOW",
37+
size=(12, None),
38+
pad=(
39+
(10, 0),
40+
(20, 14)
41+
),
3642
),
3743
sg.Button(
3844
"Convert",
3945
key="CONVERT",
40-
size=(7, 1),
46+
size=(12, None),
4147
pad=(
42-
(15, 0),
43-
(15, 15)
44-
)
48+
(20, 0),
49+
(20, 14)
50+
),
4551
),
4652
sg.ProgressBar(
47-
999,
48-
size=(30, 40),
53+
max_value=None, # Calculated and set later on
4954
key="PROGRESS_BAR",
55+
size=(47.2, 65),
5056
pad=(
51-
(15, 0),
52-
(0, 0)
53-
)
57+
(10, 3),
58+
(6, 0)
59+
),
5460
),
5561
sg.Image(
5662
utils.path("Media/github-icon.png"),
5763
enable_events=True,
5864
key="GITHUB",
5965
tooltip=" Visit this program's GitHub page ",
60-
size=(56, 47)
66+
pad=(
67+
(17, 0),
68+
(7, 0)
69+
),
6170
),
6271
sg.Image(
6372
utils.path("Media/discord-icon.png"),
6473
enable_events=True,
6574
key="DISCORD",
6675
tooltip=" Visit the CCCP Discord server for help ",
76+
pad=(
77+
(13, 3),
78+
(1, 0)
79+
),
6780
),
6881
]
6982
]
@@ -75,10 +88,9 @@ def get_main_window():
7588
title=f"Legacy Mod Converter {cfg.CONVERTER_VERSION} for CCCP {cfg.GAME_VERSION}",
7689
layout=get_main_window_layout(),
7790
icon=utils.path("Media/legacy-mod-converter.ico"),
78-
font=("Helvetica", 16),
79-
finalize=True
91+
font=("Helvetica", 25),
92+
finalize=True,
8093
)
81-
# window.finalize() # TODO: Check if this reduces the white flicker at the start of the program.
8294

8395

8496
def get_settings_window_layout():
@@ -114,7 +126,6 @@ def get_settings_window():
114126
title="Settings",
115127
layout=get_settings_window_layout(),
116128
icon=utils.path("Media/legacy-mod-converter.ico"),
117-
font=("Helvetica", 16),
118-
finalize=True
129+
font=("Helvetica", 25),
130+
finalize=True,
119131
)
120-
# window.finalize() # TODO: Check if this reduces the white flicker at the start of the program.

TODO.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)