Some cleanup
need todo string interning next....
This commit is contained in:
11
code/ui.odin
11
code/ui.odin
@ -148,8 +148,6 @@ UI_Layout :: struct {
|
||||
}
|
||||
|
||||
UI_Signal :: struct {
|
||||
box : ^ UI_Box,
|
||||
|
||||
cursor_pos : Vec2,
|
||||
drag_delta : Vec2,
|
||||
scroll : Vec2,
|
||||
@ -274,8 +272,8 @@ UI_State :: struct {
|
||||
layout_dirty : b32,
|
||||
|
||||
// TODO(Ed) : Look into using a build arena like Ryan does for these possibly (and thus have a linked-list stack)
|
||||
theme_stack : StackFixed( UI_StyleTheme, UI_Style_Stack_Size ),
|
||||
parent_stack : StackFixed( ^UI_Box, UI_Parent_Stack_Size ),
|
||||
theme_stack : StackFixed( UI_StyleTheme, UI_Style_Stack_Size ),
|
||||
parent_stack : StackFixed( ^UI_Box, UI_Parent_Stack_Size ),
|
||||
// flag_stack : Stack( UI_BoxFlags, UI_BoxFlags_Stack_Size ),
|
||||
|
||||
hot : UI_Key,
|
||||
@ -333,6 +331,11 @@ ui_box_equal :: proc( a, b : ^ UI_Box ) -> b32 {
|
||||
return result
|
||||
}
|
||||
|
||||
UI_Widget :: struct {
|
||||
using box : ^UI_Box,
|
||||
using signal : UI_Signal,
|
||||
}
|
||||
|
||||
ui_box_make :: proc( flags : UI_BoxFlags, label : string ) -> (^ UI_Box)
|
||||
{
|
||||
using ui := get_state().ui_context
|
||||
|
Reference in New Issue
Block a user