aboutsummaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-12-01 01:56:20 +0100
committerdec05eba <dec05eba@protonmail.com>2024-12-01 01:56:20 +0100
commit9e220bb5f64e5ce2b466a25aa7869a322726ad06 (patch)
treed7dc250d55b99d6265eb927eea4a16225620cdf9 /src/gui
parent9661f0b823e7b63c4ddbcd8042c559cd5a7f7773 (diff)
Optimization: dont draw file chooser items above scissor area
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/FileChooser.cpp2
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).