Readable value names for all Intelligent types; TextSelect lines follow dis

Value lists read from the Editor's attribute notes with an Intelligent model: drag, load effect
(page has two more), transparency background, switch direction, ComboBox arrow/expansion,
TextSelect lines, scroll bars, DataRecord options, media source/state/looping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-11-16 00:34:11 +01:00
1 parent 49fee337d7
commit 6616b47cb4
5 files changed
+61 -5

No files matched your search

+29
View File
@@ -18,8 +18,18 @@ GENERAL = {
"ycen": {0: "up", 1: "center", 2: "down"},
"isbr": {0: "false", 1: "true"},
"pw": {0: "character", 1: "password"},
# Intelligent series (every visible component has these)
"drag": {0: "no", 1: "yes"},
"effect": {0: "load", 1: "top fly into", 2: "bottom fly into", 3: "left fly into", 4: "right fly into",
5: "top left fly into", 6: "top right fly into", 7: "bottom left fly into",
8: "bottom right fly into"},
}
_STA4 = {0: "crop image", 1: "solid color", 2: "image", 3: "transparency"} # Intelligent widgets
_SCROLLBAR = {0: "no display", 1: "operation time display", 2: "continuous display"}
_MEDIA = {"from": {0: "internal file", 1: "external file"}, "en": {0: "stop", 1: "play", 2: "pause"},
"loop": {0: "no", 1: "yes"}}
# component type -> attribute -> {value: label}
BY_TYPE = {
121: {"sta": {0: "no background", 1: "solid color", 2: "image"}}, # page
@@ -35,8 +45,27 @@ BY_TYPE = {
106: {"sta": {0: "solid color", 1: "image"}, "dez": {0: "horizontal", 1: "vertical"}}, # progress bar
0: {"dir": {0: "left to right", 1: "right to left", 2: "right align"}}, # waveform
58: {"sta": {0: "none", 1: "has"}}, # qrcode (logo)
# Intelligent-only types (notes read from the Editor with an Intelligent model)
67: {"dez": {0: "horizontal", 1: "vertical"}}, # switch
61: {"sta": _STA4, "up": {0: "not display", 1: "display"}, # combobox
"dir": {0: "up", 1: "down", 2: "left", 3: "right"}, "down": {0: "contraction", 1: "expansion"},
"mode": {0: "no display", 1: "only display triangle", 2: "display background + triangle"}},
68: {"sta": _STA4, "style": {0: "flat", 1: "border", 2: "3D_Down"}, # text select
"dis": {0: "no", 1: "yes"}},
62: {"sta": _STA4, "left": _SCROLLBAR}, # SLText
66: {"sta": _STA4, "left": _SCROLLBAR, "mode": {0: "not allowed", 1: "allowed"}, # data record
"dis": {0: "not allowed", 1: "allowed"}, "order": {0: "new data before", 1: "new data after"}},
65: {"sta": _STA4, "left": _SCROLLBAR, "psta": {0: "no", 1: "yes"}, # file browser
"fwarning": {0: "not prompt", 1: "prompt"}},
2: {"en": _MEDIA["en"], "loop": _MEDIA["loop"]}, # Gmov
3: dict(_MEDIA), # video
4: dict(_MEDIA), # audio
}
# page "load effect" has two more entries than components
BY_TYPE[121] = dict(BY_TYPE[121], effect={**GENERAL["effect"], 9: "fade into the gradual change",
10: "middle zoom in"})
COLOR_ATTRS = {"bco", "bco1", "bco2", "pco", "pco0", "pco1", "pco2", "pco3", "borderc", "gdc"}
+5 -4
View File
@@ -559,10 +559,11 @@ class Renderer:
hig = c.get("hig") or 1
x, y, w, h = self._inner(c, x, y, w, h) # items, lines and fade inside the border
top = y + (h - hig) // 2
lc = self.rgb(c.get("pco1") or 0)
img.paste(lc, (x, top, x + w, top + 1))
bot = y + h - 1 - (h - hig) // 2 # mirrors the top line
img.paste(lc, (x, bot, x + w, bot + 1))
if c.get("dis") != 0: # dis: selected item with horizontal lines
lc = self.rgb(c.get("pco1") or 0)
img.paste(lc, (x, top, x + w, top + 1))
bot = y + h - 1 - (h - hig) // 2 # mirrors the top line
img.paste(lc, (x, bot, x + w, bot + 1))
bg = self.rgb(c.get("bco") or 0)
val = c.get("val") or 0
if val >= len(items):