Menus: original logo back, 24px corner buttons with real gear and globe icons, EMI buttons in casing style, no background behind the game menu, player reports from the game menu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ba4dbd1052
commit
bf6c483c8c
@@ -194,8 +194,9 @@ class Layout:
|
||||
|
||||
# --- the screens ------------------------------------------------------------------------------------------------------
|
||||
def logo_size() -> tuple:
|
||||
"""The logo is 221 GUI pixels wide everywhere."""
|
||||
w, h = Image.open(MENU / 'logo.png').size
|
||||
return w // 3, h // 3
|
||||
return 221, round(h * 221 / w)
|
||||
|
||||
|
||||
def title_screen(version: str, labels: dict) -> Layout:
|
||||
@@ -209,11 +210,12 @@ def title_screen(version: str, labels: dict) -> Layout:
|
||||
lay.vanilla('mc_titlescreen_singleplayer_button', anchor='mid-centered', x=-100, y=0, w=98)
|
||||
lay.vanilla('mc_titlescreen_multiplayer_button', anchor='mid-centered', x=2, y=0, w=98, label='Сервери')
|
||||
|
||||
# bottom right corner: language, options, quit. Anchors give the corner; offsets are the element's top left.
|
||||
lay.vanilla('376388', anchor='bottom-right', x=-72, y=-24, w=20) # language
|
||||
lay.button('bottom-right', -48, -24, 20, icon='settings.png', tooltip='Налаштування',
|
||||
# bottom right corner: language, options, quit — 24 x 24, so a 14 px icon fits inside the casing frame.
|
||||
# Anchors give the corner; offsets are the element's top left.
|
||||
lay.vanilla('376388', anchor='bottom-right', x=-84, y=-28, w=24, h=24) # language
|
||||
lay.button('bottom-right', -56, -28, 24, 24, icon='settings.png', tooltip='Налаштування',
|
||||
action=('opengui', SCREENS + 'options.OptionsScreen'))
|
||||
lay.button('bottom-right', -24, -24, 20, icon='quit.png', tooltip='Вийти з гри', action=('quitgame', ''))
|
||||
lay.button('bottom-right', -28, -28, 24, 24, icon='quit.png', tooltip='Вийти з гри', action=('quitgame', ''))
|
||||
lay.vanilla('title_screen_copyright_button', anchor='bottom-centered', x=-98, y=-12, w=196, h=10)
|
||||
|
||||
# bottom left corner: the pack version and whether a newer release is out
|
||||
@@ -261,7 +263,10 @@ def game_menu() -> Layout:
|
||||
lay.button('mid-centered', 2, -4, 100, label='Знайшов баг?', action=('openlink', GIT + '/issues/new'),
|
||||
tooltip='Відкриє в браузері сторінку створення задачі в нашому Git', visible=[(SERVER_IP, 'if_not', HOST)])
|
||||
lay.button('mid-centered', -102, 20, 100, label='Налаштування...', action=('opengui', SCREENS + 'options.OptionsScreen'))
|
||||
lay.button('mid-centered', 2, 20, 100, label='Скарги на гравців', active=NEVER)
|
||||
lay.button('mid-centered', 2, 20, 100, label='Скарги на гравців', action=('paste_to_chat', 'false:/report '),
|
||||
tooltip='Напиши нік гравця й що сталося, потім Enter — скаргу отримають модератори',
|
||||
visible=[(SERVER_IP, 'if', HOST)])
|
||||
lay.button('mid-centered', 2, 20, 100, label='Скарги на гравців', active=NEVER, visible=[(SERVER_IP, 'if_not', HOST)])
|
||||
# leaving: from our server straight to the title screen, from another one to the server list as usual
|
||||
ours, online = (SERVER_IP, 'if', HOST), (MULTIPLAYER, 'if', '')
|
||||
elsewhere = (SERVER_IP, 'if_not', HOST)
|
||||
@@ -336,7 +341,7 @@ def main() -> None:
|
||||
options = option(options, 'custom_window_icon_32', '/config/fancymenu/assets/favicon-32x32.png')
|
||||
options = option(options, 'custom_window_icon_macos', '')
|
||||
options = option(options, 'global_background_panorama', '')
|
||||
options = option(options, 'global_menu_background_texture', ASSET + 'background_dim.png') # every other menu screen
|
||||
options = option(options, 'global_menu_background_texture', '') # it also covered the world behind the game menu
|
||||
(fm / 'options.txt').write_text(options, encoding='utf-8')
|
||||
|
||||
for source in RESOURCES.rglob('*'): # branding/resources/<namespace>/… → kubejs/assets/<namespace>/…
|
||||
|
||||
Reference in New Issue
Block a user