Skip to content

Commit d3cb4f5

Browse files
committed
Allow UI elements to receive mouse button press events
1 parent e3e7a9e commit d3cb4f5

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

source/engine/ui.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3927,17 +3927,23 @@ namespace UI
39273927
if(isdown)
39283928
{
39293929
if(hold) world->clearstate(hold);
3930-
if(world->setstate(action, cursorx, cursory, 0, true, action|hold)) return true;
3930+
if(world->setstate(action, cursorx, cursory, 0, true, action|hold))
3931+
{
3932+
world->key(code, isdown);
3933+
return true;
3934+
}
39313935
}
39323936
else if(hold)
39333937
{
39343938
if(world->setstate(action, cursorx, cursory, hold, true, action))
39353939
{
39363940
world->clearstate(hold);
3941+
world->key(code, isdown);
39373942
return true;
39383943
}
39393944
world->clearstate(hold);
39403945
}
3946+
world->key(code, isdown);
39413947
return world->allowinput();
39423948
}
39433949
return world->key(code, isdown);

0 commit comments

Comments
 (0)