HUD warning icons: server load (train), client load (person), connection (clock), yellow and red

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Fulldroper
2026-10-14 10:38:57 +03:00
co-authored by Claude Opus 5.5
parent 28bc931b6f
commit 4d28c178fb
8 changed files with 63 additions and 0 deletions
+1
View File
@@ -41,6 +41,7 @@
| `banners/invite.png` | картинка-запрошення, 1200×630 | | `banners/invite.png` | картинка-запрошення, 1200×630 |
| `banners/wiki-cover.png` | обкладинка вікі й README, 1280×320 | | `banners/wiki-cover.png` | обкладинка вікі й README, 1280×320 |
| `menu/` | картинки меню гри для FancyMenu: тло (звичайне й затемнене), лого, іконки кнопок і стану сервера | | `menu/` | картинки меню гри для FancyMenu: тло (звичайне й затемнене), лого, іконки кнопок і стану сервера |
| `hud/` | іконки попереджень 16×16 з прозорістю, кожна жовта (попередження) й червона (погано): `server-load` — сервер навантажений (потяг), `client-load` — клієнт навантажений (людина), `connection` — поганий зв'язок (годинник) |
| `resources/` | текстури для всієї гри (у гру йдуть як `kubejs/assets/…`): кнопки й повзунки — андезитовий корпус Create, під курсором латунний; роздільники, поле вводу, смуга прокрутки, іконка мови; панелі EMI | | `resources/` | текстури для всієї гри (у гру йдуть як `kubejs/assets/…`): кнопки й повзунки — андезитовий корпус Create, під курсором латунний; роздільники, поле вводу, смуга прокрутки, іконка мови; панелі EMI |
| `art/keyart.png` | головний кадр: нічна вулиця з ліхтарями й вежею ратуші; з нього зроблено банери й тло меню | | `art/keyart.png` | головний кадр: нічна вулиця з ліхтарями й вежею ратуші; з нього зроблено банери й тло меню |
| `art/street-lamps.png`, `art/street-tower.png`, `art/night-aerial.png`, `art/factory-hall.png` | інші нічні кадри столиці — запасні | | `art/street-lamps.png`, `art/street-tower.png`, `art/night-aerial.png`, `art/factory-hall.png` | інші нічні кадри столиці — запасні |
Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

+62
View File
@@ -199,6 +199,61 @@ ICON_COLOURS = {
'Y': (255, 216, 61), 'M': (214, 222, 240), # sun and moon in the player list '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 = ''' SUN_ICON = '''
Y..Y..Y Y..Y..Y
.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') (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) print('player list header:', header.size, '-> GUI', header.width // 3, 'x', header.height // 3)
# --- warning icons for the HUD: branding/hud/<what>-<yellow|red>.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 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') on_canvas(gear_icon(14), 24).save(OUT / 'menu' / 'settings.png')
for name, rows in (('online', ONLINE_ICON), ('offline', OFFLINE_ICON), ('maintenance', MAINTENANCE_ICON)): for name, rows in (('online', ONLINE_ICON), ('offline', OFFLINE_ICON), ('maintenance', MAINTENANCE_ICON)):