From 441d7d3b04705b78d02ce7d243a1ce666578977e Mon Sep 17 00:00:00 2001 From: Fulldroper <40297614+Fulldroper@users.noreply.github.com> Date: Wed, 14 Oct 2026 09:47:20 +0300 Subject: [PATCH] Player list pictures: logo with a brass divider, sun and moon (font createrp:tab) Co-Authored-By: Claude Opus 5.5 --- branding/resources/createrp/font/tab.json | 31 +++++++++++ .../createrp/textures/font/tab_header.png | Bin 0 -> 2595 bytes .../createrp/textures/font/tab_moon.png | Bin 0 -> 132 bytes .../createrp/textures/font/tab_sun.png | Bin 0 -> 159 bytes tools/branding/build.py | 48 ++++++++++++++++++ 5 files changed, 79 insertions(+) create mode 100644 branding/resources/createrp/font/tab.json create mode 100644 branding/resources/createrp/textures/font/tab_header.png create mode 100644 branding/resources/createrp/textures/font/tab_moon.png create mode 100644 branding/resources/createrp/textures/font/tab_sun.png diff --git a/branding/resources/createrp/font/tab.json b/branding/resources/createrp/font/tab.json new file mode 100644 index 0000000..9c27fdb --- /dev/null +++ b/branding/resources/createrp/font/tab.json @@ -0,0 +1,31 @@ +{ + "providers": [ + { + "type": "bitmap", + "file": "createrp:font/tab_header.png", + "height": 48, + "ascent": 46, + "chars": [ + "\ue000" + ] + }, + { + "type": "bitmap", + "file": "createrp:font/tab_sun.png", + "height": 8, + "ascent": 7, + "chars": [ + "\ue001" + ] + }, + { + "type": "bitmap", + "file": "createrp:font/tab_moon.png", + "height": 8, + "ascent": 7, + "chars": [ + "\ue002" + ] + } + ] +} \ No newline at end of file diff --git a/branding/resources/createrp/textures/font/tab_header.png b/branding/resources/createrp/textures/font/tab_header.png new file mode 100644 index 0000000000000000000000000000000000000000..9aec34f78d2439c3f37a737d23f3d2d4bdec3d92 GIT binary patch literal 2595 zcmZ`*dsq@yAI8~dw>dRePOXt$bUKY`DvAN+a%q@26>(l*E6b@NQ&Se;rM5IvN7Dg$ zr5kA?_?ZgxZkO4x6vfEAMa#UP14BVjZl8U#efz#=-}&R5^PKZM=bZQVd*AnW@`8ho zm~OJ!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Uj!9CiK66zLh(9joXh@8rw`>_Rkki9T0qgOVJB+tbb5v*RY4`15;_177h|6x*E3T`7PK|l?D^(C%IDg2i3ZSHNLfM z8#V$d0+}|3o?JfJTMBBMkhd!udP0!QbSEt)O^>o87SL3yEn==v#OTZ1+aF_!*^oZ2b%xC4l z#3u%Lu7rFOBq8u)3@D7t6T#8GLz=>z^|f&CD8p)TO)~kTu*q5Gtsg_XKWx_Q0J_`S z>Y|3?czeawqtK?hg|0{rgvr@^$4RP435@*93=CyAZij8 zJb6X9#EM=-XT^UyU|WKqo06;ztK7iNp2#Zg==@WzN7B&O#tdDc;?M;r;_~l15A+jm zqVkmsBNxkCFmQ{>LsOU)OI;fxASrO=ER=53C{DgknRt=r1o%E~qeZqFaq$?k-stMS zHKY0;&2<@`RhiqoZnYIa+mJJKd{$rQ{;#vyH`hKU2;1Pnkgs?mE6xF}idJP`%xG%d z(EgVo$^gz=n@`?%dX#t2`>paE!?wOuLlcX)V*8OO+WJ*wt(06(c4VhxAm)>|@%Kg9 z>0f~-a0H_}N9m?V7^MMv)36h3@wK~f+w+`1$u9gW(BYZFx8*l>qlL|j!pHpw)-IYk atiV!DUmLoQ^rgIk72p?inB)89`F{c6H~T;U literal 0 HcmV?d00001 diff --git a/branding/resources/createrp/textures/font/tab_moon.png b/branding/resources/createrp/textures/font/tab_moon.png new file mode 100644 index 0000000000000000000000000000000000000000..3e5dada3e7798beaef06ade71eac3c8bced3343a GIT binary patch literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj-kvUwAr*6yQw}h$yZift{B#+f z3{6f0p`gP@9Fh;XWOGY&a*F9HH6=-~Uo@3sIsJi4X;~mQN8?2WB@VaKN=*#umBvwv edzsjh7#W%#im0uKU;>)Tz~JfX=d#Wzp$P!;k0j^- literal 0 HcmV?d00001 diff --git a/branding/resources/createrp/textures/font/tab_sun.png b/branding/resources/createrp/textures/font/tab_sun.png new file mode 100644 index 0000000000000000000000000000000000000000..5135e0f252e35ad0966e04684bb2f87f57fd2b05 GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjX`U{QAr*6y|I{D;X3s2QkR_9r za)9Yy@Pf9^#$yeg*Tgm`RJYGq;J|idh5RqaBOX293mKD|3ME)B)+;qNg&6EHl2X>| zycp7A+EFl7_rIrzJDan;=*9_AF3QYFP1!HlFKQ$xurMTDG-LT3`7Z%zBZH@_pUXO@ GgeCyjZ#J|5 literal 0 HcmV?d00001 diff --git a/tools/branding/build.py b/tools/branding/build.py index ac96791..e8c5c8b 100644 --- a/tools/branding/build.py +++ b/tools/branding/build.py @@ -7,6 +7,7 @@ stored here), the key art illustration (branding/art/keyart.png) and, if given, snapped to a coarse pixel grid. Output goes to branding/ next to this repo's images. """ import io +import json import math import sys import zipfile @@ -195,8 +196,29 @@ ICON_COLOURS = { 'G': (58, 200, 18), 'g': (0, 150, 0), # server is online 'R': (224, 64, 58), 'r': (160, 38, 32), # server is offline 'A': (249, 168, 37), 'a': (190, 110, 20), # maintenance + 'Y': (255, 216, 61), 'M': (214, 222, 240), # sun and moon in the player list } +SUN_ICON = ''' +Y..Y..Y +.Y.Y.Y. +..YYY.. +YYYYYYY +..YYY.. +.Y.Y.Y. +Y..Y..Y +''' + +MOON_ICON = ''' +..MMM.. +.MM.... +MM..... +MM..... +MM..... +.MM.... +..MMM.. +''' + QUIT_ICON = ''' #######....... #............. @@ -609,6 +631,32 @@ def main() -> None: if path in meta: target.with_name(target.name + '.mcmeta').write_text(meta[path], encoding='utf-8', newline='\n') + # --- the player list (Tab): pictures shown as characters of a font of ours, createrp:tab ------------------------- + # Drawn three texels per GUI pixel, so they are pixel for pixel at GUI scale 3. The bridge mod sends the characters. + tab_logo = stack([wordmark(6), motto(3)], gap=9) + line = Image.new('RGBA', (tab_logo.width, 21)) + for x in range(tab_logo.width // 10, tab_logo.width - tab_logo.width // 10): + for y in range(9, 12): + line.putpixel((x, y), BRASS[2] + (255,)) + for y in range(12, 15): + line.putpixel((x, y), BRASS[0] + (255,)) + cog = gear(7).resize((21, 21), Image.NEAREST) + line.alpha_composite(cog, ((line.width - 21) // 2, 0)) + header = stack([tab_logo, line], gap=9) + header = stack([header, Image.new('RGBA', (1, -header.height % 3))], gap=0) + font_dir = OUT / 'resources' / 'createrp' + (font_dir / 'textures' / 'font').mkdir(parents=True, exist_ok=True) + (font_dir / 'font').mkdir(parents=True, exist_ok=True) + header.save(font_dir / 'textures' / 'font' / 'tab_header.png') + providers = [{'type': 'bitmap', 'file': 'createrp:font/tab_header.png', 'height': header.height // 3, + 'ascent': header.height // 3 - 2, 'chars': ['\ue000']}] + for char, name, rows in (('\ue001', 'sun', SUN_ICON), ('\ue002', 'moon', MOON_ICON)): + icon = button_icon(rows, canvas=8, at=0).resize((24, 24), Image.NEAREST) + icon.save(font_dir / 'textures' / 'font' / f'tab_{name}.png') + providers.append({'type': 'bitmap', 'file': f'createrp:font/tab_{name}.png', 'height': 8, 'ascent': 7, 'chars': [char]}) + (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) + 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)):