Make scrollbar movable with mouse, limit filechooser content to inside of file item

This commit is contained in:
dec05eba
2024-09-11 00:54:57 +02:00
parent 747344b858
commit dd906c6a9d
8 changed files with 104 additions and 43 deletions

View File

@@ -78,7 +78,7 @@ namespace gsr {
const bool mouse_inside = mgl::FloatRect(draw_pos, item_size).contains(window.get_mouse_position().to_vec2f());
if(can_select_item && mouse_inside) {
const int border_size = std::max(1.0f, border_scale * get_theme().window_height);
const mgl::Color border_color = get_theme().tint_color;
const mgl::Color border_color = i == selected_item ? mgl::Color(255, 255, 255) : get_theme().tint_color;
draw_rectangle_outline(window, draw_pos.floor(), item_size.floor(), border_color, border_size);
}