From 3cabdf6174a9dab422bf6890c96f3b900488bc0a Mon Sep 17 00:00:00 2001 From: Fulldroper <40297614+Fulldroper@users.noreply.github.com> Date: Wed, 14 Oct 2026 09:40:37 +0300 Subject: [PATCH] Loading screen layout for Drippy Loading Screen Co-Authored-By: Claude Opus 5.5 --- branding/README.md | 4 ++++ tools/branding/fancymenu.py | 17 +++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/branding/README.md b/branding/README.md index 8ade474..f74e71d 100644 --- a/branding/README.md +++ b/branding/README.md @@ -77,6 +77,10 @@ python tools/branding/fancymenu.py <тека config гри або збірки> **Підключення, завантаження світу, розрив з'єднання** — затемнений головний кадр і лого вгорі. **Список серверів, світів** і решта меню поза грою — той самий затемнений кадр. +**Екран завантаження** (мод Drippy Loading Screen): головний кадр, лого, смуга прогресу під ним; лого Mojang сховано. Drippy +заміняє й етап завантаження модів NeoForge; найперше вікно NeoForge (до запуску самої гри) малює NeoForge, його +колір — налаштування гравця «Монохромне лого» (`darkMojangStudiosBackground`): чорне замість червоного. + **Ігрове меню** — наш власний екран, що підміняє екран паузи Minecraft (тому кнопки, які туди додають інші моди, у нього не потрапляють): «Назад до гри»; «Залишити відгук» (поки неактивна) і «Знайшов баг?» — на нашому сервері відкриває чат із набраним `/bug `: гравець пише, що сталося, і бекенд створює задачу в Gitea з його ніком і місцем у світі diff --git a/tools/branding/fancymenu.py b/tools/branding/fancymenu.py index 8295d2b..ba2a605 100644 --- a/tools/branding/fancymenu.py +++ b/tools/branding/fancymenu.py @@ -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')