diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-12-01 01:56:20 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-12-01 01:56:20 +0100 |
commit | 9e220bb5f64e5ce2b466a25aa7869a322726ad06 (patch) | |
tree | d7dc250d55b99d6265eb927eea4a16225620cdf9 | |
parent | 9661f0b823e7b63c4ddbcd8042c559cd5a7f7773 (diff) |
Optimization: dont draw file chooser items above scissor area
-rw-r--r-- | src/gui/FileChooser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/FileChooser.cpp b/src/gui/FileChooser.cpp index a58a582..03a44c1 100644 --- a/src/gui/FileChooser.cpp +++ b/src/gui/FileChooser.cpp @@ -106,7 +106,7 @@ namespace gsr { mouse_over_item = i; } - if(item_pos.y + item_size.y >= draw_pos.y && item_pos.y < scissor.position.y + scissor.size.y) { + if(item_pos.y + item_size.y >= scissor.position.y && item_pos.y < scissor.position.y + scissor.size.y) { window.draw(folder_sprite); // TODO: Dont allow text to go further left/right than item_pos (on the left side) and item_pos + item_size (on the right side). |