Fix use of unitialized variables in mouse button handling
parent
7b548cd2b5
commit
914f850d31
|
@ -2946,11 +2946,14 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if((event.EventType==EET_MOUSE_INPUT_EVENT &&
|
/* Mouse event other than movement, or crossing the border of inventory
|
||||||
event.MouseInput.Event != EMIE_MOUSE_MOVED) ||
|
field while holding right mouse button
|
||||||
(event.MouseInput.Event == EMIE_MOUSE_MOVED &&
|
*/
|
||||||
event.MouseInput.isRightPressed() && getItemAtPos(m_pointer).i != getItemAtPos(m_old_pointer).i)){
|
if (event.EventType == EET_MOUSE_INPUT_EVENT &&
|
||||||
// Mouse event other than movement or crossing the border of inventory field while holding rmb
|
(event.MouseInput.Event != EMIE_MOUSE_MOVED ||
|
||||||
|
(event.MouseInput.Event == EMIE_MOUSE_MOVED &&
|
||||||
|
event.MouseInput.isRightPressed() &&
|
||||||
|
getItemAtPos(m_pointer).i != getItemAtPos(m_old_pointer).i))) {
|
||||||
|
|
||||||
// Get selected item and hovered/clicked item (s)
|
// Get selected item and hovered/clicked item (s)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue