Commit Graph

10 Commits

Author SHA1 Message Date
Martin Fouilleul 1212d714d5 [platform/canvas]
- Changed canvas coordinate system to match UI coord system (origin at top left, y axis down)
- Changed mouse coordinate system to match UI and canvas
- No need to pass width/height to ui_begin_frame() anymore
2023-03-08 13:19:18 +01:00
Martin Fouilleul 7b2ef080e8 [util, formatting] shorten list loop names to for_list_xxx 2023-03-08 12:03:33 +01:00
Martin Fouilleul 3682605f97 [util, formatting] changed list api to snakecase for consistency with the rest of the codebase 2023-03-08 12:00:10 +01:00
Martin Fouilleul bfc19665ce [util]
- shorten str8_lit macro to STR8
- use strlen() in STR8 and remove str8_from_cstring(). Usage with string literal seem to always be optimized by compile-time constant, so there's little need for a confusing macro that only works with literals and breaks with pointers.
- replaced str8_unbox() with str8_lp/str8_ip
2023-03-08 11:40:40 +01:00
Martin Fouilleul f07f56948d [ui] shorten ui styling api names 2023-03-08 11:13:32 +01:00
Martin Fouilleul 8b06cb31ba [ui, styling]
- Put all styling calls _before_ the styled box.
- Renamed full pattern matching API to ui_style_match_next_before/after
- Helper to style next box only (ui_style_next())
2023-03-08 11:09:28 +01:00
Martin Fouilleul c551135933 [ui] remove the need to pass a default style to ui_frame() 2023-03-07 19:44:22 +01:00
Martin Fouilleul 2466241b1e [ui, styling] finished first pass on core layout/styling system 2023-03-07 19:27:01 +01:00
Martin Fouilleul 8032c7340b [ui, styling] revisiting layout/sizing 2023-03-07 19:06:04 +01:00
Martin Fouilleul 7b10a99a8c [ui, styling] First draft of rule-based styling to replace old stack-based system 2023-03-06 19:33:01 +01:00