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
+4
View File
@@ -77,6 +77,10 @@ python tools/branding/fancymenu.py <тека config гри або збірки>
**Підключення, завантаження світу, розрив з'єднання** — затемнений головний кадр і лого вгорі. **Список серверів, **Підключення, завантаження світу, розрив з'єднання** — затемнений головний кадр і лого вгорі. **Список серверів,
світів** і решта меню поза грою — той самий затемнений кадр. світів** і решта меню поза грою — той самий затемнений кадр.
**Екран завантаження** (мод Drippy Loading Screen): головний кадр, лого, смуга прогресу під ним; лого Mojang сховано. Drippy
заміняє й етап завантаження модів NeoForge; найперше вікно NeoForge (до запуску самої гри) малює NeoForge, його
колір — налаштування гравця «Монохромне лого» (`darkMojangStudiosBackground`): чорне замість червоного.
**Ігрове меню** — наш власний екран, що підміняє екран паузи Minecraft (тому кнопки, які туди додають інші **Ігрове меню** — наш власний екран, що підміняє екран паузи Minecraft (тому кнопки, які туди додають інші
моди, у нього не потрапляють): «Назад до гри»; «Залишити відгук» (поки неактивна) і «Знайшов баг?» — на нашому сервері відкриває чат моди, у нього не потрапляють): «Назад до гри»; «Залишити відгук» (поки неактивна) і «Знайшов баг?» — на нашому сервері відкриває чат
із набраним `/bug `: гравець пише, що сталося, і бекенд створює задачу в Gitea з його ніком і місцем у світі із набраним `/bug `: гравець пише, що сталося, і бекенд створює задачу в Gitea з його ніком і місцем у світі
+15 -2
View File
@@ -12,6 +12,7 @@ What it writes:
createrp_screens.txt connecting / loading / disconnected screens: our background and logo createrp_screens.txt connecting / loading / disconnected screens: our background and logo
createrp_lists.txt server list, world list and their dialogs: our background createrp_lists.txt server list, world list and their dialogs: our background
createrp_pause.txt the game menu 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 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 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 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'), ('direct_join_server_screen', SCREENS + 'DirectJoinServerScreen'),
('edit_server_screen', SCREENS + 'EditServerScreen')] ('edit_server_screen', SCREENS + 'EditServerScreen')]
PAUSE_GUI = 'createrp_pause' 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, "}" ------------------------------------------------- # --- FancyMenu's file format: "name {", " key = value" lines, "}" -------------------------------------------------
@@ -251,6 +253,17 @@ def list_screens() -> Layout:
whitelist=[name for name, _ in LIST_SCREENS]) 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: def game_menu() -> Layout:
lay = Layout('pause', PAUSE_GUI) lay = Layout('pause', PAUSE_GUI)
lw, lh = logo_size() 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 (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()), 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 / '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 / 'custom_gui_screens.txt').write_text(CUSTOM_GUIS, encoding='utf-8', newline='\n')
(fm / 'customizablemenus.txt').write_text( (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') encoding='utf-8', newline='\n')
options = (fm / 'options.txt').read_text(encoding='utf-8') options = (fm / 'options.txt').read_text(encoding='utf-8')