ludic/examples/library/ui_theme.ludic
Orkuncakilkaya 19fcf60599 wip(0.S3): packages and examples migrated again from their pre-0.S sources in one run
ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic
  1804 vars into 126 states, 64 into lets; 23498 edits in 460 files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 15:31:34 +03:00

15 lines
594 B
Text

# ui_theme.ludic — a component with no stylesheet of its own still reads the theme's :root variables,
# inherited from the screen that uses it, in its style="..." declarations.
import "ludic.ui"
import "ui_theme_parts/Bare.ludic"
import "ui_theme_parts/Shell.ludic"
program UiTheme {
numbers float
entry (ui_st: mut UiState) {
ui_backend(ui_st, new UiBackend)
let root: UiNode = ui_nodes(ui_st, "Shell", null)
ui_place(ui_st, root, 0.0, 0.0, 400.0, 400.0)
let bare = root.children[0].children[0]
print(`accent {ui_hex(bare.children[0].fg)} gap {int(bare.gap)}`)
}
}