force rename lower

This commit is contained in:
Edward R. Gonzalez 2024-07-01 16:14:33 -04:00
parent d797762702
commit e793392e85
17 changed files with 12 additions and 7 deletions

View File

@ -61,6 +61,7 @@ Context :: struct {
default_curve_quality : i32,
text_shape_adv : b32,
snap_shape_pos : b32,
debug_print : b32,
debug_print_verbose : b32,
@ -135,6 +136,7 @@ startup :: proc( ctx : ^Context, parser_kind : ParserKind,
atlas_params := InitAtlasParams_Default,
glyph_draw_params := InitGlyphDrawParams_Default,
shape_cache_params := InitShapeCacheParams_Default,
snap_shape_position : b32 = true,
default_curve_quality : u32 = 3,
entires_reserve : u32 = 512,
temp_path_reserve : u32 = 1024,
@ -147,6 +149,8 @@ startup :: proc( ctx : ^Context, parser_kind : ParserKind,
ctx.backing = allocator
context.allocator = ctx.backing
snap_shape_pos = snap_shape_position
if default_curve_quality == 0 {
default_curve_quality = 3
}

View File

@ -118,11 +118,11 @@ shape_text_uncached :: proc( ctx : ^Context, font : FontID, text_utf8 : string,
advance, _ := parser_get_codepoint_horizontal_metrics( & entry.parser_info, codepoint )
append( & output.positions, Vec2 {
ceil(position.x),
ctx.snap_shape_pos ? ceil(position.x) : position.x,
position.y
})
position.x += ceil(f32(advance) * entry.size_scale)
position.x += ctx.snap_shape_pos ? ceil(f32(advance) * entry.size_scale) : f32(advance) * entry.size_scale
prev_codepoint = codepoint
}

View File

@ -173,7 +173,7 @@ render_mode_screenspace :: proc( screen_extent : Extents2, screen_ui : ^UI_State
content := str_fmt( format, ..args )
text_size := measure_text_size( content, default_font, 14.0, 0.0 )
debug_draw_text( content, position, 10.0 )
debug_draw_text( content, position, 12.0 )
debug.draw_debug_text_y += text_size.y
}
@ -186,7 +186,7 @@ render_mode_screenspace :: proc( screen_extent : Extents2, screen_ui : ^UI_State
debug_draw_text( fps_msg, fps_msg_pos, fps_size, color = Color_Red )
}
if false {
if true {
debug_text( "Screen Width : %v", screen_size.x )
debug_text( "Screen Height: %v", screen_size.y )
debug_text( "frametime_target_ms : %f ms", frametime_target_ms )
@ -200,7 +200,7 @@ render_mode_screenspace :: proc( screen_extent : Extents2, screen_ui : ^UI_State
debug_text( "Replaying Input")
}
if false
if true
{
using input_events

View File

@ -243,6 +243,7 @@ update :: proc( delta_time : f64 ) -> b32
return clamp(binary_search_closest(levels, zoom), 0, len(levels) - 1)
}
config.cam_zoom_mode = .Digital
switch config.cam_zoom_mode
{
case .Smooth:
@ -339,8 +340,8 @@ update :: proc( delta_time : f64 ) -> b32
// test_hover_n_click()
// test_draggable()
// test_text_box()
test_parenting( & default_layout, & frame_style_default )
// test_whitespace_ast( & default_layout, & frame_style_default )
// test_parenting( & default_layout, & frame_style_default )
test_whitespace_ast( & default_layout, & frame_style_default )
}
//endregion Workspace Imgui Tick