Update GUI2 schema to match existing implementation of text attributes

This commit is contained in:
Celtic Minstrel 2024-08-18 22:32:52 -04:00 committed by Celtic Minstrel
parent 6eed9522e4
commit 586fbec882
2 changed files with 40 additions and 4 deletions

View File

@ -140,10 +140,6 @@
{DEFAULT_KEY "highlight_start" string ""}
{DEFAULT_KEY "highlight_end" string ""}
{DEFAULT_KEY "actions" string ""}
{DEFAULT_KEY "attr_name" string ""}
{DEFAULT_KEY "attr_start" string ""}
{DEFAULT_KEY "attr_end" string ""}
{DEFAULT_KEY "attr_data" string ""}
{DEFAULT_KEY "maximum_height" f_int -1}
{DEFAULT_KEY "maximum_width" f_int -1}
{DEFAULT_KEY "text" f_t_string ""}
@ -157,6 +153,42 @@
{DEFAULT_KEY "w" f_unsigned 0}
{DEFAULT_KEY "x" f_unsigned 0}
{DEFAULT_KEY "y" f_unsigned 0}
[tag]
name="attribute"
min="0"
max="infinite"
{REQUIRED_KEY "name" string}
{DEFAULT_KEY "start" unsigned 0}
{SIMPLE_KEY "end" unsigned}
[switch]
key="name"
[case]
value="color,fgcolor,bgcolor,foreground,background"
{REQUIRED_KEY "value" string}
[/case]
[case]
value="font_size,size"
{REQUIRED_KEY "value" unsigned}
[/case]
[case]
value="font_family,face"
{REQUIRED_KEY "value" font_family}
[/case]
[case]
value="weight"
{REQUIRED_KEY "value" font_weight}
[/case]
[case]
value="style"
{REQUIRED_KEY "value" font_style}
[/case]
[case]
value="bold,b,italic,i,underline,u,normal"
# Nothing here
[/case]
# TODO: Forbid any other value
[/switch]
[/tag]
[/tag]
[/tag]
[/tag]

View File

@ -23,6 +23,10 @@
name=font_style
value="normal|bold|italic|underline|light|"
[/type]
[type]
name=font_weight
value="normal|thin|light|semibold|bold|heavy|"
[/type]
[type]
name=grow_direction