made intial impl for UI_TextInputBox, used it with min and max cam zoom settings ui
This commit is contained in:
@ -153,7 +153,7 @@ startup :: proc( prof : ^SpallProfiler, persistent_mem, frame_mem, transient_mem
|
||||
|
||||
color_theme = App_Thm_Dusk
|
||||
|
||||
font_size_canvas_scalar = 2.0
|
||||
font_size_canvas_scalar = 1.0
|
||||
}
|
||||
|
||||
Desired_OS_Scheduler_MS :: 1
|
||||
|
@ -261,7 +261,7 @@ render_mode_screenspace :: proc( screen_extent : Extents2, screen_ui : ^UI_State
|
||||
}
|
||||
|
||||
if true {
|
||||
state.config.font_size_canvas_scalar = 1.5
|
||||
state.config.font_size_canvas_scalar = 2.0
|
||||
zoom_adjust_size := 16 * state.project.workspace.cam.zoom
|
||||
over_sample := f32(state.config.font_size_canvas_scalar)
|
||||
debug_text("font_size_canvas_scalar: %v", config.font_size_canvas_scalar)
|
||||
|
@ -270,7 +270,16 @@ update :: proc( delta_time : f64 ) -> b32
|
||||
}
|
||||
|
||||
if target_index != current_index {
|
||||
workspace.zoom_target = Digial_Zoom_Snap_Levels[target_index]
|
||||
proposed_target := Digial_Zoom_Snap_Levels[target_index]
|
||||
if proposed_target < config.cam_min_zoom {
|
||||
workspace.zoom_target = Digial_Zoom_Snap_Levels[find_closest_zoom_index(config.cam_min_zoom, Digial_Zoom_Snap_Levels)]
|
||||
}
|
||||
else if proposed_target > config.cam_max_zoom {
|
||||
workspace.zoom_target = Digial_Zoom_Snap_Levels[find_closest_zoom_index(config.cam_max_zoom, Digial_Zoom_Snap_Levels)]
|
||||
}
|
||||
else {
|
||||
workspace.zoom_target = proposed_target
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -341,7 +350,7 @@ update :: proc( delta_time : f64 ) -> b32
|
||||
// test_draggable()
|
||||
// test_text_box()
|
||||
// test_parenting( & default_layout, & frame_style_default )
|
||||
// test_whitespace_ast( & default_layout, & frame_style_default )
|
||||
test_whitespace_ast( & default_layout, & frame_style_default )
|
||||
}
|
||||
//endregion Workspace Imgui Tick
|
||||
|
||||
|
Reference in New Issue
Block a user