functional scrollbar thumb bounds

This commit is contained in:
jacob 2026-03-29 22:49:13 -05:00
parent 122741f580
commit 629d03a24e
3 changed files with 110 additions and 832 deletions

File diff suppressed because it is too large Load Diff

View File

@ -212,8 +212,23 @@ Struct(V_Palette)
UI_Key key; UI_Key key;
b32 is_showing; b32 is_showing;
f32 show; f32 show;
f32 scroll; f32 scroll;
f32 scroll_begin; // f32 scroll_begin;
// f32 drag_thumb_offset;
// f32 drag_scrollbar_container_start;
// f32 drag_scrollbar_container_end;
Rng2 drag_lister;
Rng2 drag_container;
Vec2 drag_cursor;
f32 drag_scroll;
V_TextboxState search_state; V_TextboxState search_state;
}; };

View File

@ -1113,10 +1113,10 @@ ComputeShader(V_CompositeCS)
Vec4 grid_color = 0; Vec4 grid_color = 0;
if (is_in_world) if (is_in_world)
{ {
b32 debug_draw = !!frame.show_console; b32 draw_grid = frame.show_console || frame.is_editing;
// Grid outline // Grid outline
if (frame.show_console) if (draw_grid)
{ {
const Vec4 line_color = LinearFromSrgb(Vec4(1, 1, 1, 0.1)); const Vec4 line_color = LinearFromSrgb(Vec4(1, 1, 1, 0.1));
Vec2 line_screen_p0 = mul(frame.af.world_to_screen, Vec3(floor(world_pos), 1)); Vec2 line_screen_p0 = mul(frame.af.world_to_screen, Vec3(floor(world_pos), 1));
@ -1133,7 +1133,7 @@ ComputeShader(V_CompositeCS)
} }
// Axis // Axis
if (frame.show_console) if (draw_grid)
{ {
const Vec4 x_axis_color = LinearFromSrgb(Vec4(0.75, 0, 0, 1)); const Vec4 x_axis_color = LinearFromSrgb(Vec4(0.75, 0, 0, 1));
const Vec4 y_axis_color = LinearFromSrgb(Vec4(0, 0.75, 0, 1)); const Vec4 y_axis_color = LinearFromSrgb(Vec4(0, 0.75, 0, 1));
@ -1152,7 +1152,7 @@ ComputeShader(V_CompositeCS)
} }
// World bounds // World bounds
if (frame.show_console || frame.is_editing) if (draw_grid || frame.is_editing)
{ {
const Vec4 bounds_color = LinearFromSrgb(Vec4(0.75, 0.75, 0, 1)); const Vec4 bounds_color = LinearFromSrgb(Vec4(0.75, 0.75, 0, 1));
f32 bounds_dist = 100000; f32 bounds_dist = 100000;