label work part 1
This commit is contained in:
parent
16d456a10f
commit
26407a14b1
2 changed files with 37 additions and 17 deletions
|
|
@ -39,6 +39,10 @@ UiElementData_FloatInput :: struct {
|
|||
value_string: cstring,
|
||||
}
|
||||
|
||||
ui_measure_text :: proc(str: cstring) -> ui.v2 {
|
||||
return rl.MeasureTextEx(rl.GetFontDefault(), str, 18.0, 1.0)
|
||||
}
|
||||
|
||||
main :: proc() {
|
||||
back.register_segfault_handler()
|
||||
_register_illegal_instruction_handler()
|
||||
|
|
@ -49,7 +53,7 @@ main :: proc() {
|
|||
rl.SetTargetFPS(WINDOW_FRAMERATE)
|
||||
|
||||
ctx: ui.Context
|
||||
ui.init(&ctx, 4000)
|
||||
ui.init(&ctx, 4000, ui_measure_text)
|
||||
|
||||
outer_container_config := ui.ElementConfiguration {margin = {4.0, 8.0}, padding = {12.0, 24.0}, color = ui.col(rl.RED), label = ""}
|
||||
outer_container_margin_value_string_x := cstring(make([^]u8, INPUT_FLOAT_CHARACTERS))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue