mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
allow to exit editor valueselectors with mouseclicks
This commit is contained in:
parent
76481a139a
commit
b97954f635
|
@ -685,7 +685,8 @@ int CEditor::UiDoValueSelector(void *pID, CUIRect *pRect, const char *pLabel, in
|
|||
|
||||
UI()->SetActiveItem(&s_NumberBoxID);
|
||||
|
||||
if(Input()->KeyPressed(KEY_RETURN) || Input()->KeyPressed(KEY_KP_ENTER))
|
||||
if(Input()->KeyPressed(KEY_RETURN) || Input()->KeyPressed(KEY_KP_ENTER) ||
|
||||
((UI()->MouseButton(1) || UI()->MouseButton(0)) && !Inside))
|
||||
{
|
||||
Current = clamp(str_toint(s_NumStr), Min, Max);
|
||||
UI()->SetActiveItem(0);
|
||||
|
|
Loading…
Reference in a new issue