Fix: Listbox was sometimes sending EGET_LISTBOX_SELECTED_AGAIN instead of EGET_LISTBOX_CHANGED.

When pressed mouse was moved over an item before releasing the mouse button it was sending immediately EGET_LISTBOX_SELECTED_AGAIN instead of expected EGET_LISTBOX_CHANGED (mouse  move changes do not send any events).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6454 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2023-03-06 14:34:16 +00:00
committed by sfan5
parent c5373262ca
commit 1967d71cfb
2 changed files with 25 additions and 16 deletions

View File

@ -154,6 +154,7 @@ namespace gui
core::array< ListItem > Items;
s32 Selected;
s32 HoverSelected; // When >= 0 we're in the middle of changing selection while mouse is pressed. We need to know so selected again isn't called too often.
s32 ItemHeight;
s32 ItemHeightOverride;
s32 TotalItemHeight;
@ -161,7 +162,7 @@ namespace gui
gui::IGUIFont* Font;
gui::IGUISpriteBank* IconBank;
gui::IGUIScrollBar* ScrollBar;
u32 selectTime;
u32 SelectTime;
u32 LastKeyTime;
core::stringw KeyBuffer;
bool Selecting;