Loading screen layout for Drippy Loading Screen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Fulldroper
2026-10-14 09:40:37 +03:00
co-authored by Claude Opus 5.5
parent bf6c483c8c
commit 3cabdf6174
2 changed files with 19 additions and 2 deletions
+15 -2
View File
@@ -12,6 +12,7 @@ What it writes:
createrp_screens.txt connecting / loading / disconnected screens: our background and logo
createrp_lists.txt server list, world list and their dialogs: our background
createrp_pause.txt the game menu
createrp_loading.txt the loading screen (Drippy Loading Screen): key art, logo, progress bar
config/fancymenu/custom_gui_screens.txt the game menu is our own screen that replaces Minecraft's one, so that
buttons other mods add to the pause screen (Mods, Create) never get into it
config/fancymenu/customizablemenus.txt, options.txt which screens are customised; window title and icon
@@ -51,6 +52,7 @@ LIST_SCREENS = [('join_multiplayer_screen', SCREENS + 'multiplayer.JoinMultiplay
('direct_join_server_screen', SCREENS + 'DirectJoinServerScreen'),
('edit_server_screen', SCREENS + 'EditServerScreen')]
PAUSE_GUI = 'createrp_pause'
LOADING_SCREEN = 'de.keksuccino.drippyloadingscreen.customization.DrippyOverlayScreen' # Drippy's overlay as a screen
# --- FancyMenu's file format: "name {", " key = value" lines, "}" -------------------------------------------------
@@ -251,6 +253,17 @@ def list_screens() -> Layout:
whitelist=[name for name, _ in LIST_SCREENS])
def loading_screen() -> Layout:
"""Drippy Loading Screen draws the game's loading overlay (and the NeoForge stage after the first window) as a screen
FancyMenu customises. Its two widgets are "mojang_logo" and "progress_bar"."""
lay = Layout('loading', 'drippy_loading_overlay', background='background.png')
lw, lh = logo_size()
lay.image('logo.png', 'mid-centered', -(lw // 2), -20 - lh, lw, lh)
lay.vanilla('progress_bar', anchor='mid-centered', x=-100, y=4, w=200, h=10)
lay.vanilla('mojang_logo', hidden=True)
return lay
def game_menu() -> Layout:
lay = Layout('pause', PAUSE_GUI)
lw, lh = logo_size()
@@ -327,11 +340,11 @@ def main() -> None:
(fm / 'customization' / 'title_screen_layout.txt').unlink(missing_ok=True) # the name used before the generator
for name, layout in (('title', title_screen(version, labels)), ('screens', plain_screens()), ('lists', list_screens()),
('pause', game_menu())):
('pause', game_menu()), ('loading', loading_screen())):
(fm / 'customization' / f'createrp_{name}.txt').write_text(layout.text(), encoding='utf-8', newline='\n')
(fm / 'custom_gui_screens.txt').write_text(CUSTOM_GUIS, encoding='utf-8', newline='\n')
(fm / 'customizablemenus.txt').write_text(
'type = customizablemenus\n\n' + ''.join(f'{c} {{\n}}\n\n' for c in [SCREENS + 'TitleScreen'] + [c for _, c in PLAIN_SCREENS + LIST_SCREENS]),
'type = customizablemenus\n\n' + ''.join(f'{c} {{\n}}\n\n' for c in [SCREENS + 'TitleScreen', LOADING_SCREEN] + [c for _, c in PLAIN_SCREENS + LIST_SCREENS]),
encoding='utf-8', newline='\n')
options = (fm / 'options.txt').read_text(encoding='utf-8')