Commit Graph
14 Commits
Author SHA1 Message Date
waozi 81867525a6 ui: retain selected font for deferred text 2026-08-17 19:06:15 -03:00
waozi f8f5cd4c71 ui: add retained declarative tree and typed events 2026-08-17 18:55:05 -03:00
waozi 442c868b66 widgets: PickerDialog; Spinbox value text + wrap; public ButtonRow height
- PickerDialog: the standard scrim + panel + option-rows modal with
  optional per-option icons, cancel button, outside-click/ESC dismissal;
  returns the picked option index (1-based), -1 when dismissed
- SpinboxProps gains value_text (caller-formatted display like "08:00")
  and wrap (modulo instead of clamping, for time-of-day steppers)
- GetUIButtonRowHeight is public now: the fit-or-stack row already
  measures itself, apps no longer need their own height math
2026-08-15 18:00:04 -05:00
waozi f8d011e615 Add Column/Row layout nodes with flexbox-style auto-positioning
Add ColumnProps/RowProps structs and Column/Row/EndColumn/EndRow
widget API functions. These wrap BeginNodeGroup/EndNodeGroup and
maintain a layout cursor stack for auto-positioning children.

Add UILayoutNextChildHeight/UILayoutNextChildX for children to query
their auto-computed position. Add UILayoutActive/UILayoutBounds for
context awareness.
2026-08-12 16:52:50 -05:00
waozi 2bb8640279 Add retained scene tree foundation and rename UI Sprite to Picture
- include/kry_math.h: Vector2 math and KryTransform2D (compose/point/camera)
- include/scene_tree.h + src/scene/scene_tree.c: KryScene/KryNode retained
  node tree with array arena, parent/child links, world-transform update,
  lifecycle vtable (ready/process/physics_process/draw), KrySceneTick/
  PhysicsTick/Draw driver
- include/node2d_props.h: Camera2DProps, Sprite2DProps
- Rename UI Sprite widget to Picture (raylib owns Image as a struct):
  ui_sprite.h -> ui_picture.h, SpriteProps -> PictureProps,
  UISpriteFit -> UIPictureFit, UI_SPRITE_FIT_* -> UI_PICTURE_FIT_*,
  Sprite() -> Picture(); extract shared texture cache to
  src/ui/ui_picture_cache.c (KryLoadPictureTexture, KryPictureFitRect)
  shared by the Picture widget and the upcoming Sprite2D scene node
- Migrate example, docs, node registry to the Picture name
2026-08-11 03:11:34 -05:00
waozi 92ae0b4786 Allow custom value text on Slider widget
Add an optional value_text_override parameter to DrawUISlider, UISliderNode, and Slider. When non-NULL it is rendered instead of the default "%d + suffix" formatting, so callers can display values like "1.8x". Passing NULL preserves the existing behavior.
2026-08-11 02:46:04 -05:00
waozi c9b8e27e4c Canonicalize widget API 2026-08-09 19:52:01 -03:00
waozi 0d360a0160 clean kryon app api 2026-08-09 12:44:52 -03:00
waozi eb8c1d359a Add Material theme style widgets 2026-08-08 15:05:02 -03:00
waozi 8f6578386f Fix UI transition declaration 2026-08-06 08:03:09 -03:00
waozi 84bb98f7e2 Add clean node measurement constructors 2026-08-06 07:38:25 -03:00
waozi 7e79000fd9 Store measurement data on widget nodes 2026-08-06 07:26:04 -03:00
waozi 1f89ed90d2 Measure widget nodes generically 2026-08-06 07:24:18 -03:00
waozi d07078d2b2 Move UI runtime to declarative nodes 2026-08-06 07:15:55 -03:00