Oversized streamlined

This commit is contained in:
2025-01-04 20:09:59 -05:00
parent fe4f3ad14a
commit 878c419a1f
7 changed files with 117 additions and 121 deletions

View File

@ -243,9 +243,9 @@ ui_settings_menu_builder :: proc( captures : rawptr = nil ) -> ( should_raise :
digits_only = true
disallow_leading_zeros = false
disallow_decimal = false
digit_min = 0.01
digit_max = 9999
max_length = 5
digit_min = 0.001
digit_max = 1.0
max_length = 6
}
ui_text_input_box( & min_zoom_inputbox, "settings_menu.cam_min_zoom.input_box", allocator = persistent_slab_allocator() )
{
@ -260,7 +260,7 @@ ui_settings_menu_builder :: proc( captures : rawptr = nil ) -> ( should_raise :
{
value, success := parse_f32(to_string(array_to_slice(input_str)))
if success {
value = clamp(value, 0.001, 9999.0)
value = clamp(value, 0.0001, 1.0)
config.cam_min_zoom = value
}
}
@ -294,9 +294,9 @@ ui_settings_menu_builder :: proc( captures : rawptr = nil ) -> ( should_raise :
digits_only = true
disallow_leading_zeros = false
disallow_decimal = false
digit_min = 0.01
digit_max = 9999
max_length = 5
digit_min = 1.0
digit_max = 99
max_length = 2
ui_text_input_box( & max_zoom_inputbox, "settings_menu.cam_max_zoom.input_box", allocator = persistent_slab_allocator() )
{
using max_zoom_inputbox
@ -310,7 +310,7 @@ ui_settings_menu_builder :: proc( captures : rawptr = nil ) -> ( should_raise :
{
value, success := parse_f32(to_string(array_to_slice(input_str)))
if success {
value = clamp(value, 0.001, 9999.0)
value = clamp(value, 0.001, 99.0)
config.cam_max_zoom = value
}
}

View File

@ -151,7 +151,7 @@ update :: proc( delta_time : f64 ) -> b32
// TODO(Ed): This should be per workspace view
{
Digial_Zoom_Snap_Levels := []f32{
0.025, // 0.4px (not practical for text, but allows extreme zoom out)
0.0255, // 0.4px (not practical for text, but allows extreme zoom out)
0.03125, // 0.5px
0.0375, // 0.6px
0.04375, // 0.7px

View File

@ -74,6 +74,7 @@ UI_LayoutSide :: struct {
UI_LayoutFlag :: enum u32 {
// Will perform scissor pass on children to their parent's bounds (Specified in the parent)
// Most boxes don't need a scissor pass so its opt-in.
// TODO(Ed): Implement this.
Clip_Children_To_bounds,
// Enforces the box will always remain in a specific position relative to the parent.