This commit is contained in:
agra
2026-02-24 18:17:33 +02:00
parent 630e76c319
commit 7a381e1b4c
4 changed files with 90 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
#import "modules/std.sx";
Color :: struct {
r, g, b, a: u8;
}
COLOR_WHITE :: Color.{ r = 255, g = 255, b = 255, a = 255 };
// Additional case: struct constant with enum-typed fields
HAlign :: enum { leading; center; trailing; }
VAlign :: enum { top; center; bottom; }
Alignment :: struct {
h: HAlign;
v: VAlign;
}
ALIGN_CENTER :: Alignment.{ h = .center, v = .center };