diff --git a/branding/README.md b/branding/README.md index f74e71d..c9a3329 100644 --- a/branding/README.md +++ b/branding/README.md @@ -41,6 +41,7 @@ | `banners/invite.png` | картинка-запрошення, 1200×630 | | `banners/wiki-cover.png` | обкладинка вікі й README, 1280×320 | | `menu/` | картинки меню гри для FancyMenu: тло (звичайне й затемнене), лого, іконки кнопок і стану сервера | +| `hud/` | іконки попереджень 16×16 з прозорістю, кожна жовта (попередження) й червона (погано): `server-load` — сервер навантажений (потяг), `client-load` — клієнт навантажений (людина), `connection` — поганий зв'язок (годинник) | | `resources/` | текстури для всієї гри (у гру йдуть як `kubejs/assets/…`): кнопки й повзунки — андезитовий корпус Create, під курсором латунний; роздільники, поле вводу, смуга прокрутки, іконка мови; панелі EMI | | `art/keyart.png` | головний кадр: нічна вулиця з ліхтарями й вежею ратуші; з нього зроблено банери й тло меню | | `art/street-lamps.png`, `art/street-tower.png`, `art/night-aerial.png`, `art/factory-hall.png` | інші нічні кадри столиці — запасні | diff --git a/branding/hud/client-load-red.png b/branding/hud/client-load-red.png new file mode 100644 index 0000000..07c96bb Binary files /dev/null and b/branding/hud/client-load-red.png differ diff --git a/branding/hud/client-load-yellow.png b/branding/hud/client-load-yellow.png new file mode 100644 index 0000000..5861742 Binary files /dev/null and b/branding/hud/client-load-yellow.png differ diff --git a/branding/hud/connection-red.png b/branding/hud/connection-red.png new file mode 100644 index 0000000..dd0aed6 Binary files /dev/null and b/branding/hud/connection-red.png differ diff --git a/branding/hud/connection-yellow.png b/branding/hud/connection-yellow.png new file mode 100644 index 0000000..fdec997 Binary files /dev/null and b/branding/hud/connection-yellow.png differ diff --git a/branding/hud/server-load-red.png b/branding/hud/server-load-red.png new file mode 100644 index 0000000..9c12acf Binary files /dev/null and b/branding/hud/server-load-red.png differ diff --git a/branding/hud/server-load-yellow.png b/branding/hud/server-load-yellow.png new file mode 100644 index 0000000..b350361 Binary files /dev/null and b/branding/hud/server-load-yellow.png differ diff --git a/tools/branding/build.py b/tools/branding/build.py index e9a8fef..f7231f0 100644 --- a/tools/branding/build.py +++ b/tools/branding/build.py @@ -199,6 +199,61 @@ ICON_COLOURS = { 'Y': (255, 216, 61), 'M': (214, 222, 240), # sun and moon in the player list } +# Warning icons for the HUD, 16 x 16 with a dark outline, each in yellow (a warning) and red (bad). +# C main colour, c its shade, W light, K dark detail. The person and the clock redraw the FD Icons "person" and +# "clock"; the library has no train, so the train is drawn here: a locomotive from the front, on rails. +HUD_ICONS = { + 'server-load': ''' +....CCCCCC.... +..CCCCCCCCCC.. +..CKKKKKKKKC.. +..CKKKKKKKKC.. +..CKKKKKKKKC.. +..CCCCCCCCCC.. +..CCCCCCCCCC.. +..CWWCCCCWWC.. +..CWWCCCCWWC.. +..cccccccccc.. +...cc....cc... +..cc......cc.. +.cc........cc. +cc..........cc +''', + 'client-load': ''' +.....CCCC..... +....CCCCCC.... +....CWCCCC.... +....CCCCCC.... +....CCCCCC.... +.....cccc..... +.............. +...CCCCCCCC... +..CCCCCCCCCC.. +.CCCCCCCCCCCC. +.CCCCCCCCCCCC. +.CCCCCCCCCCCC. +.cccccccccccc. +.............. +''', + 'connection': ''' +....CCCCCC.... +..CCCCCCCCCC.. +.CCWWWWKWWWCC. +.CWWWWWKWWWWC. +CCWWWWWKWWWWCC +CWWWWWWKWWWWWC +CWWWWWWKKKKWWC +CWWWWWWWWWWWWC +CCWWWWWWWWWWCC +.CWWWWWWWWWWC. +.CCWWWWWWWWCC. +..CCCCCCCCCC.. +....cccccc.... +.............. +''', +} +HUD_COLOURS = {'yellow': ((255, 204, 51), (196, 140, 20)), 'red': ((226, 62, 50), (150, 30, 24))} + SUN_ICON = ''' Y..Y..Y .Y.Y.Y. @@ -693,6 +748,13 @@ def main() -> None: (font_dir / 'font' / 'tab.json').write_text(json.dumps({'providers': providers}, indent=2), encoding='utf-8', newline='\n') print('player list header:', header.size, '-> GUI', header.width // 3, 'x', header.height // 3) + # --- warning icons for the HUD: branding/hud/-.png, 16 x 16 ------------------------------------ + (OUT / 'hud').mkdir(parents=True, exist_ok=True) + for colour, (main, dim) in HUD_COLOURS.items(): # not 'shade': that name is a function used above + ICON_COLOURS.update({'C': main, 'c': dim, 'W': (245, 240, 225), 'K': (40, 30, 25)}) + for name, rows in HUD_ICONS.items(): + button_icon(rows, outline=True, canvas=16, at=1).save(OUT / 'hud' / f'{name}-{colour}.png') + button_icon(QUIT_ICON, canvas=24).save(OUT / 'menu' / 'quit.png') # the corner buttons are 24 x 24 on_canvas(gear_icon(14), 24).save(OUT / 'menu' / 'settings.png') for name, rows in (('online', ONLINE_ICON), ('offline', OFFLINE_ICON), ('maintenance', MAINTENANCE_ICON)):