Large refactor of the entire codebase
Saw that layout really should be separated from the style struct, so went ahead and pulled the trigger... A bunch of other refactors have also been done * Lifted layout out of style, its not separate in UI_Box and in UI_State there is not a UI_LayoutCombo stack. * UI_StyleTheme renamed to UI_StyleCombo * UI_Theme has both UI_StyleCombo & UI_LayoutCombo * Made files for the "project" related code * ui_layout_compute moved to its own file, ui_layout now used for layout related data structures and interfacing * Impovements to horizontal & vertical box impl * UI_Box now keeps track of how many ancestors it has
This commit is contained in:
41
code/env_scratch.odin
Normal file
41
code/env_scratch.odin
Normal file
@ -0,0 +1,41 @@
|
||||
package sectr
|
||||
|
||||
// Scratch space
|
||||
|
||||
import rl "vendor:raylib"
|
||||
|
||||
DebugData :: struct {
|
||||
square_size : i32,
|
||||
square_pos : rl.Vector2,
|
||||
|
||||
draw_debug_text_y : f32,
|
||||
|
||||
cursor_locked : b32,
|
||||
cursor_unlock_pos : Vec2, // Raylib changes the mose position on lock, we want restore the position the user would be in on screen
|
||||
mouse_vis : b32,
|
||||
last_mouse_pos : Vec2,
|
||||
|
||||
// UI Vis
|
||||
draw_ui_box_bounds_points : bool,
|
||||
draw_ui_margin_bounds : bool,
|
||||
draw_ui_anchor_bounds : bool,
|
||||
draw_UI_padding_bounds : bool,
|
||||
draw_ui_content_bounds : bool,
|
||||
|
||||
// Test First
|
||||
frame_2_created : b32,
|
||||
|
||||
// Test Draggable
|
||||
draggable_box_pos : Vec2,
|
||||
draggable_box_size : Vec2,
|
||||
box_original_size : Vec2,
|
||||
|
||||
// Test parsing
|
||||
path_lorem : string,
|
||||
lorem_content : []byte,
|
||||
lorem_parse : PWS_ParseResult,
|
||||
|
||||
// Test 3d Viewport
|
||||
cam_vp : rl.Camera3D,
|
||||
viewport_rt : rl.RenderTexture,
|
||||
}
|
Reference in New Issue
Block a user