Finally reached parity pre-rendering overhaul

This commit is contained in:
2024-06-29 23:49:12 -04:00
parent 72eb3a1b3b
commit 2698670890
9 changed files with 43 additions and 23 deletions

View File

@ -48,7 +48,7 @@ ui_screen_menu_bar :: proc( captures : rawptr = nil ) -> (should_raise : b32 = f
{
@static theme : UI_Theme
@static loaded : b32 = false
if ! loaded
if ! loaded || true
{
app_color := app_color_theme()
layout := UI_Layout {
@ -56,7 +56,7 @@ ui_screen_menu_bar :: proc( captures : rawptr = nil ) -> (should_raise : b32 = f
anchor = range2({},{}),
// alignment = UI_Align_Presets.text_centered,
text_alignment = {0.0, 0},
font_size = 12,
font_size = 10,
margins = {0, 0, 0, 0},
padding = {0, 0, 0, 0},
border_width = 1.0,
@ -232,7 +232,7 @@ ui_screen_settings_menu :: proc( captures : rawptr = nil ) -> ( should_raise : b
using input_box
layout.flags = {.Fixed_Width}
layout.margins.left = 5
layout.padding.right = 10
layout.padding.right = 5
layout.size.min.x = 80
style.corner_radii[0] = 0.35
@ -273,11 +273,11 @@ ui_screen_settings_menu :: proc( captures : rawptr = nil ) -> ( should_raise : b
scope(theme_text)
value_txt = ui_text("settings_menu.engine_refresh.input_box.value", to_str_runes_pair(array_to_slice(value_str)))
using value_txt
layout.alignment = {1, 0.0}
layout.text_alignment = {0, 0.5}
layout.anchor.left = 1.0
layout.flags = {.Fixed_Width}
// layout.size.min = cast(Vec2) measure_text_size( value_txt.text.str, value_txt.style.font, value_txt.layout.font_size, 0 )
layout.alignment = {0.0, 0.0}
layout.text_alignment = {1.0, 0.5}
layout.anchor.left = 0.0
// layout.flags = {.Fixed_Width}
layout.size.min = cast(Vec2) measure_text_size( value_txt.text.str, value_txt.style.font, value_txt.layout.font_size, 0 )
}
}
}

View File

@ -22,7 +22,7 @@ theme_button :: proc() -> UI_Theme
anchor = range2_zero,
alignment = {0, 0},
text_alignment = {0.5, 0.5},
font_size = 16,
font_size = 12,
margins = {0, 0, 0, 0},
padding = {0, 0, 0, 0},
border_width = 1,
@ -113,7 +113,7 @@ theme_table_row :: proc( is_even : bool ) -> UI_Theme
{
@static theme : UI_Theme
@static loaded : b32 = false
if ! loaded
if ! loaded || true
{
app_color := app_color_theme()
table_bg : RGBA8
@ -127,7 +127,7 @@ theme_table_row :: proc( is_even : bool ) -> UI_Theme
flags = {},
anchor = range2({},{}),
alignment = {0, 0},
text_alignment = {0.0, 0.0},
text_alignment = {0.5, 0.0},
font_size = 16,
margins = {0, 0, 0, 0},
padding = {0, 0, 0, 0},
@ -276,12 +276,12 @@ theme_window_bar_btn :: proc() -> UI_Theme
anchor = range2({1, 0},{}),
alignment = {0, 0},
text_alignment = {0.5, 0.5},
font_size = 16,
font_size = 12,
margins = {0, 0, 0, 0},
padding = {0, 0, 0, 0},
border_width = 1,
pos = {0, 0},
size = range2({50,0},{})
size = range2({60,0},{})
}
style := UI_Style {
bg_color = app_color.btn_bg_default,