Design: profiles (Who's watching, PIN, pictures, Kids settings)
Paul, 5 November 2026: Grown-ups behind the PIN and a Kids profile with chosen channels and content; profile pictures from the cast, a few favourite things and silhouettes in Orbit's colours. For approval only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,184 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Profiles, design proposal (Paul, 5 November 2026): "Who's watching?" when Orbit opens, Grown-ups behind the PIN and a Kids
|
||||
profile with chosen channels; profile pictures to choose from (the cast, a football, a fairy wand and so on, or a silhouette in a
|
||||
few colours); the Kids settings. The cast is drawn from the model sheet (design/arcade/orbit-cast.md) by build-cast.py's own
|
||||
drawing code. A design for approval only: nothing in the app yet."""
|
||||
import ast, math
|
||||
from pathlib import Path
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
HERE = Path(__file__).resolve().parent
|
||||
ROOT = HERE.parent.parent
|
||||
F = HERE.parent / 'channels' / 'network-fonts'
|
||||
RES = ROOT / 'android' / 'app' / 'src' / 'main' / 'res' / 'drawable-nodpi'
|
||||
def font(n, s): return ImageFont.truetype(str(F / n), s)
|
||||
anton, semi, reg = (lambda s: font('anton-regular.ttf', s * SS)), (lambda s: font('barlow-semibold.ttf', s * SS)), (lambda s: font('barlow-regular.ttf', s * SS))
|
||||
W, H, SS = 1920, 1080, 2
|
||||
NAVY, PANEL, BLUE, MUTED, YELLOW, WHITE, INK, DEEP = (7, 22, 50), (18, 53, 107), (25, 76, 145), (183, 203, 232), (255, 222, 89), (255, 255, 255), (20, 33, 61), (12, 33, 72)
|
||||
|
||||
# The cast's drawing, taken from build-cast.py so they match exactly.
|
||||
cast_src = ast.parse((HERE.parent / 'arcade' / 'build-cast.py').read_text())
|
||||
exec(compile(ast.Module([n for n in cast_src.body if isinstance(n, ast.FunctionDef) and n.name in
|
||||
('S', 'circ', 'eyes', 'mascot', 'blaze', 'zip_', 'drift', 'luna', 'bumble')], []), 'build-cast', 'exec'))
|
||||
|
||||
def screen():
|
||||
global im, d
|
||||
im = Image.new('RGB', (W * SS, H * SS), NAVY); d = ImageDraw.Draw(im)
|
||||
stars = __import__('random').Random(5)
|
||||
for _ in range(120): circ((stars.random() * W, stars.random() * H), .8 + stars.random() * 1.6, (60, 80, 120))
|
||||
def box(x, y, w, h, fill=PANEL, r=14, outline=None, width=3): d.rounded_rectangle((S(x), S(y), S(x + w), S(y + h)), S(r), fill=fill, outline=outline, width=SW(width) if outline else 0)
|
||||
def text(xy, s, f, fill=WHITE, anchor='la'): d.text((S(xy[0]), S(xy[1])), s, font=f, fill=fill, anchor=anchor)
|
||||
def logo(path, x, y, w):
|
||||
img = Image.open(path).convert('RGBA'); h = int(img.height * w / img.width)
|
||||
im.paste(img.resize((S(w), S(h)), Image.LANCZOS), (S(x), S(y)), img.resize((S(w), S(h)), Image.LANCZOS))
|
||||
def tri(x, y, kind, col=WHITE):
|
||||
"""One arrow key as a shape (the fonts have no arrow glyphs); returns its width."""
|
||||
s = 22
|
||||
pts = {'◄': [(x, y + s / 2), (x + s, y), (x + s, y + s)], '►': [(x, y), (x + s, y + s / 2), (x, y + s)],
|
||||
'▲': [(x, y + s), (x + s / 2, y), (x + s, y + s)], '▼': [(x, y), (x + s, y), (x + s / 2, y + s)]}[kind]
|
||||
d.polygon([(S(px), S(py + 10)) for px, py in pts], fill=col)
|
||||
return s + 6
|
||||
def keys(items, y=1010):
|
||||
x = 80
|
||||
for k, label in items:
|
||||
if all(ch in '◄►▲▼' for ch in k):
|
||||
for ch in k: x += tri(x, y, ch)
|
||||
x += 8
|
||||
else: text((x, y), k, semi(30)); x += d.textlength(k, font=semi(30)) / SS + 12
|
||||
text((x, y), label, reg(30), MUTED); x += d.textlength(label, font=reg(30)) / SS + 46
|
||||
def save(name): im.resize((W, H), Image.LANCZOS).save(HERE / name); print(name)
|
||||
|
||||
# Profile pictures: the cast, a few favourite things, and silhouettes in Orbit's colours.
|
||||
def silhouette(c, r, col):
|
||||
circ((c[0], c[1] - r * .22), r * .34, col)
|
||||
d.pieslice((S(c[0] - r * .62), S(c[1] + r * .12), S(c[0] + r * .62), S(c[1] + r * 1.2)), 180, 360, fill=col)
|
||||
def football(c, r):
|
||||
circ(c, r * .7, WHITE)
|
||||
for k in range(5):
|
||||
a = -math.pi / 2 + k * 2 * math.pi / 5
|
||||
p = (c[0] + math.cos(a) * r * .46, c[1] + math.sin(a) * r * .46)
|
||||
d.regular_polygon((S(p[0]), S(p[1]), S(r * .13)), 5, rotation=k * 72, fill=INK)
|
||||
d.regular_polygon((S(c[0]), S(c[1]), S(r * .2)), 5, fill=INK)
|
||||
def wand(c, r):
|
||||
d.line((S(c[0] - r * .5), S(c[1] + r * .55), S(c[0] + r * .1), S(c[1] - r * .05)), fill=(240, 240, 255), width=SW(r * .1))
|
||||
pts = [(S(c[0] + r * .22 + math.cos(-math.pi / 2 + k * math.pi / 5) * (r * .42 if k % 2 == 0 else r * .18)), S(c[1] - r * .18 + math.sin(-math.pi / 2 + k * math.pi / 5) * (r * .42 if k % 2 == 0 else r * .18))) for k in range(10)]
|
||||
d.polygon(pts, fill=(255, 158, 222))
|
||||
for (ox, oy, s) in ((-.4, -.45, .07), (.6, .35, .06), (-.1, .5, .05)): circ((c[0] + ox * r, c[1] + oy * r), r * s, (255, 236, 150))
|
||||
def rocket(c, r):
|
||||
d.polygon([(S(c[0]), S(c[1] - r * .7)), (S(c[0] + r * .25), S(c[1] - r * .2)), (S(c[0] + r * .25), S(c[1] + r * .4)), (S(c[0] - r * .25), S(c[1] + r * .4)), (S(c[0] - r * .25), S(c[1] - r * .2))], fill=(235, 240, 250))
|
||||
circ((c[0], c[1] - r * .12), r * .12, (69, 184, 245))
|
||||
d.polygon([(S(c[0] - r * .25), S(c[1] + r * .1)), (S(c[0] - r * .45), S(c[1] + r * .45)), (S(c[0] - r * .25), S(c[1] + r * .4))], fill=(255, 107, 94))
|
||||
d.polygon([(S(c[0] + r * .25), S(c[1] + r * .1)), (S(c[0] + r * .45), S(c[1] + r * .45)), (S(c[0] + r * .25), S(c[1] + r * .4))], fill=(255, 107, 94))
|
||||
d.polygon([(S(c[0] - r * .14), S(c[1] + r * .42)), (S(c[0]), S(c[1] + r * .72)), (S(c[0] + r * .14), S(c[1] + r * .42))], fill=(255, 194, 61))
|
||||
def crown(c, r):
|
||||
d.polygon([(S(c[0] - r * .55), S(c[1] + r * .35)), (S(c[0] - r * .55), S(c[1] - r * .3)), (S(c[0] - r * .25), S(c[1] + r * .02)), (S(c[0]), S(c[1] - r * .45)),
|
||||
(S(c[0] + r * .25), S(c[1] + r * .02)), (S(c[0] + r * .55), S(c[1] - r * .3)), (S(c[0] + r * .55), S(c[1] + r * .35))], fill=(255, 216, 74))
|
||||
for ox in (-.3, 0, .3): circ((c[0] + ox * r, c[1] + r * .2), r * .07, (255, 79, 163))
|
||||
def rainbow(c, r):
|
||||
for k, col in enumerate(((255, 107, 94), (247, 169, 40), (255, 216, 74), (110, 220, 170), (69, 184, 245), (167, 123, 255))):
|
||||
rr = r * (.7 - k * .08)
|
||||
d.arc((S(c[0] - rr), S(c[1] - rr + r * .25), S(c[0] + rr), S(c[1] + rr + r * .25)), 180, 360, fill=col, width=SW(r * .08))
|
||||
def paw(c, r):
|
||||
col = (255, 255, 255)
|
||||
circ((c[0], c[1] + r * .15), r * .3, col)
|
||||
for (ox, oy) in ((-.38, -.12), (-.14, -.4), (.14, -.4), (.38, -.12)): circ((c[0] + ox * r, c[1] + oy * r), r * .13, col)
|
||||
def guitar(c, r):
|
||||
circ((c[0] - r * .1, c[1] + r * .25), r * .32, (255, 138, 61)); circ((c[0] + r * .08, c[1] - r * .02), r * .22, (255, 138, 61))
|
||||
circ((c[0] - r * .1, c[1] + r * .25), r * .09, INK)
|
||||
d.line((S(c[0] + r * .05), S(c[1]), S(c[0] + r * .5), S(c[1] - r * .55)), fill=(120, 72, 40), width=SW(r * .1))
|
||||
def avatar(kind, c, r, ring=None):
|
||||
bg = {'ollie': (40, 90, 160), 'blaze': (60, 40, 90), 'zip': (50, 40, 100), 'drift': (30, 70, 120), 'luna': (40, 30, 90), 'bumble': (40, 90, 80),
|
||||
'football': (46, 140, 80), 'wand': (120, 60, 160), 'rocket': (30, 50, 110), 'crown': (120, 40, 80), 'rainbow': (60, 140, 220), 'paw': (200, 120, 60)}
|
||||
if kind.startswith('sil:'): circ(c, r, tuple(int(v * .45) for v in eval(kind[4:]))); silhouette(c, r, eval(kind[4:]))
|
||||
else:
|
||||
circ(c, r, bg[kind])
|
||||
draw = {'ollie': lambda: mascot(c, r * .5), 'blaze': lambda: blaze((c[0] + r * .12, c[1]), r * .55, (255, 138, 61)), 'zip': lambda: zip_(c, r * .55, (255, 79, 163)),
|
||||
'drift': lambda: drift(c, r * .58, (53, 214, 242)), 'luna': lambda: luna(c, r * .58, (167, 123, 255)), 'bumble': lambda: bumble((c[0], c[1] + r * .12), r * .5, None),
|
||||
'football': lambda: football(c, r), 'wand': lambda: wand(c, r), 'rocket': lambda: rocket(c, r), 'crown': lambda: crown(c, r), 'rainbow': lambda: rainbow(c, r), 'paw': lambda: paw(c, r)}[kind]
|
||||
draw()
|
||||
if ring: d.ellipse((S(c[0] - r - 8), S(c[1] - r - 8), S(c[0] + r + 8), S(c[1] + r + 8)), outline=ring, width=SW(7))
|
||||
def lock(c, s, col=WHITE):
|
||||
d.rounded_rectangle((S(c[0] - s * .5), S(c[1] - s * .1), S(c[0] + s * .5), S(c[1] + s * .6)), S(s * .1), fill=col)
|
||||
d.arc((S(c[0] - s * .32), S(c[1] - s * .55), S(c[0] + s * .32), S(c[1] + s * .2)), 180, 360, fill=col, width=SW(s * .12))
|
||||
|
||||
SW = lambda v: max(1, int(round(v * SS)))
|
||||
GROWNUP = 'sil:(69, 184, 245)'
|
||||
|
||||
# 1. Who's watching?
|
||||
screen()
|
||||
logo(RES / 'orbit_logo.webp', 820, 70, 280)
|
||||
text((960, 230), "Who's watching?", anton(76), WHITE, 'ma')
|
||||
cards = [('Grown-ups', GROWNUP, True, False), ('Kids', 'ollie', False, True), ('Add a profile', None, False, False)]
|
||||
for i, (name, kind, locked, focus) in enumerate(cards):
|
||||
cx = 560 + i * 400; cy = 520
|
||||
if kind: avatar(kind, (cx, cy), 130, ring=YELLOW if focus else None)
|
||||
else:
|
||||
d.ellipse((S(cx - 130), S(cy - 130), S(cx + 130), S(cy + 130)), outline=MUTED, width=SW(4))
|
||||
d.line((S(cx - 40), S(cy), S(cx + 40), S(cy)), fill=MUTED, width=SW(8)); d.line((S(cx), S(cy - 40), S(cx), S(cy + 40)), fill=MUTED, width=SW(8))
|
||||
text((cx, cy + 170), name, semi(40), YELLOW if focus else (WHITE if kind else MUTED), 'ma')
|
||||
if locked: lock((cx + 100, cy + 95), 38, YELLOW); text((cx, cy + 222), 'PIN', reg(26), MUTED, 'ma')
|
||||
text((960, 880), 'Kids sees only the channels and games chosen for it. Grown-ups needs the PIN.', reg(30), MUTED, 'ma')
|
||||
keys([('◄►', 'Choose'), ('OK', 'Watch'), ('Back', 'Close Orbit')])
|
||||
save('profiles-1-whos-watching.png')
|
||||
|
||||
# 2. Grown-ups asks for the PIN.
|
||||
screen()
|
||||
for i, kind in enumerate((GROWNUP, 'ollie')): avatar(kind, (760 + i * 400, 520), 130)
|
||||
d.rectangle((0, 0, S(W), S(H)), fill=None) if False else None
|
||||
overlay = Image.new('RGBA', im.size, (7, 22, 50, 200)); im.paste(Image.alpha_composite(im.convert('RGBA'), overlay).convert('RGB'))
|
||||
d = ImageDraw.Draw(im)
|
||||
box(610, 250, 700, 520, fill=DEEP, r=18, outline=YELLOW)
|
||||
avatar(GROWNUP, (960, 380), 80)
|
||||
text((960, 485), 'Grown-ups', semi(40), WHITE, 'ma')
|
||||
text((960, 540), 'Enter the PIN', reg(30), MUTED, 'ma')
|
||||
for k in range(4):
|
||||
x = 790 + k * 90
|
||||
box(x, 600, 70, 84, fill=YELLOW if k == 2 else PANEL, r=8)
|
||||
text((x + 35, 612), '•' if k < 2 else ('7' if k == 2 else ''), semi(48), NAVY if k == 2 else WHITE, 'ma')
|
||||
text((960, 712), 'Up and down change a digit, or type it', reg(24), MUTED, 'ma')
|
||||
keys([('▲▼', 'Change'), ('OK', 'Next'), ('Back', 'Cancel')])
|
||||
save('profiles-2-pin.png')
|
||||
|
||||
# 3. Choose a picture.
|
||||
screen()
|
||||
text((80, 70), 'Settings', semi(44))
|
||||
text((80, 150), 'CHOOSE A PICTURE FOR KIDS', anton(44), YELLOW)
|
||||
text((80, 214), 'The cast, a few favourite things, or a silhouette in a colour of your own.', reg(30), MUTED)
|
||||
kinds = [('ollie', 'Ollie'), ('blaze', 'Blaze'), ('zip', 'Zip'), ('drift', 'Drift'), ('luna', 'Luna'), ('bumble', 'Bumble'),
|
||||
('football', 'Football'), ('wand', 'Fairy wand'), ('rocket', 'Rocket'), ('crown', 'Crown'), ('rainbow', 'Rainbow'), ('paw', 'Paw print'),
|
||||
('sil:(69, 184, 245)', 'Blue'), ('sil:(255, 79, 163)', 'Pink'), ('sil:(110, 220, 170)', 'Green'), ('sil:(255, 216, 74)', 'Yellow'), ('sil:(167, 123, 255)', 'Purple'), ('sil:(255, 138, 61)', 'Orange')]
|
||||
for i, (kind, name) in enumerate(kinds):
|
||||
cx = 200 + (i % 6) * 300; cy = 360 + (i // 6) * 220
|
||||
chosen = kind == 'ollie'; focus = kind == 'wand'
|
||||
avatar(kind, (cx, cy), 72, ring=YELLOW if focus else ((110, 220, 170) if chosen else None))
|
||||
text((cx, cy + 86), name + (' (now)' if chosen else ''), semi(26) if focus or chosen else reg(26), YELLOW if focus else WHITE, 'ma')
|
||||
keys([('◄►▲▼', 'Choose'), ('OK', 'Use this picture'), ('Back', 'Profiles')])
|
||||
save('profiles-3-pictures.png')
|
||||
|
||||
# 4. The Kids settings.
|
||||
screen()
|
||||
text((80, 70), 'Settings', semi(44))
|
||||
rail = ['Channels', 'Watching', 'New arrivals', "Director's Chair", 'Profiles', 'Emby account']
|
||||
for i, item in enumerate(rail):
|
||||
on = item == 'Profiles'
|
||||
box(80, 140 + i * 74, 330, 60, fill=YELLOW if on else PANEL, r=10)
|
||||
text((104, 152 + i * 74), item, semi(30), NAVY if on else WHITE)
|
||||
x0 = 450
|
||||
avatar('ollie', (x0 + 70, 210), 62)
|
||||
text((x0 + 150, 160), 'KIDS', anton(52), WHITE)
|
||||
text((x0 + 150, 230), 'Change picture · Rename', reg(28), MUTED)
|
||||
box(x0 + 1060, 165, 360, 64, fill=PANEL, r=10); text((x0 + 1240, 178), 'Grown-ups: PIN set', semi(28), WHITE, 'ma')
|
||||
text((x0, 300), 'CHANNELS FOR KIDS', semi(28), MUTED)
|
||||
kids = [('orbit_tots_epg', True), ('orbit_junior_epg', True), ('wonder_epg', True), ('orbit_pixelz_epg', True), ('toonz_epg', True), ('heroes_epg', True),
|
||||
('rewind_epg', True), ('vortex_epg', True), ('orbit_x_epg', False), ('orbit_terra_epg', True), ('orbit_wild_epg', True), ('orbit_odyssey_epg', False)]
|
||||
for i, (name, on) in enumerate(kids):
|
||||
cx = x0 + (i % 4) * 352; cy = 340 + (i // 4) * 120
|
||||
box(cx, cy, 332, 100, fill=PANEL if not (i == 1) else NAVY, r=12, outline=YELLOW if i == 1 else None)
|
||||
logo(RES / f'{name}.webp', cx + 22, cy + 22, 180)
|
||||
box(cx + 262, cy + 30, 46, 40, fill=(110, 220, 170) if on else (40, 60, 100), r=8)
|
||||
if on: d.line([(S(cx + 273), S(cy + 50)), (S(cx + 283), S(cy + 61)), (S(cx + 299), S(cy + 39))], fill=NAVY, width=SW(6))
|
||||
rows = [('Arcade', 'On: every game'), ('Drive-In', 'Family films only, never The Late Show'), ('What\'s On and Catch Up', 'Only what\'s on Kids\' channels'), ('Leaving Kids', 'Needs the Grown-ups PIN')]
|
||||
for i, (label, value) in enumerate(rows):
|
||||
y = 720 + i * 62
|
||||
text((x0, y), label, semi(30)); text((x0 + 430, y), value, reg(30), MUTED)
|
||||
keys([('▲▼◄►', 'Move'), ('OK', 'Tick or change'), ('Back', 'Settings')])
|
||||
save('profiles-4-kids-settings.png')
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 178 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 281 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 283 KiB |
Reference in New Issue
Block a user