mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
Add missing check for modifier of Ctrl+F hotkey
The hotkey for the "Find empty slot" button was not correctly checking for a pressed modifier, so it was already being trigger by just the key F instead of the desired Ctrl+F.
This commit is contained in:
parent
8e9b4ddcd2
commit
886ec990fe
|
@ -1514,7 +1514,7 @@ int CEditor::PopupTele(CEditor *pEditor, CUIRect View, void *pContext)
|
|||
// find empty number button
|
||||
{
|
||||
static int s_EmptySlotPid = 0;
|
||||
if(pEditor->DoButton_Editor(&s_EmptySlotPid, "F", 0, &FindEmptySlot, 0, "[ctrl+f] Find empty slot") || pEditor->Input()->KeyPress(KEY_F))
|
||||
if(pEditor->DoButton_Editor(&s_EmptySlotPid, "F", 0, &FindEmptySlot, 0, "[ctrl+f] Find empty slot") || (pEditor->Input()->ModifierIsPressed() && pEditor->Input()->KeyPress(KEY_F)))
|
||||
{
|
||||
int number = -1;
|
||||
for(int i = 1; i <= 255; i++)
|
||||
|
@ -1613,7 +1613,7 @@ int CEditor::PopupSwitch(CEditor *pEditor, CUIRect View, void *pContext)
|
|||
// find empty number button
|
||||
{
|
||||
static int s_EmptySlotPid = 0;
|
||||
if(pEditor->DoButton_Editor(&s_EmptySlotPid, "F", 0, &FindEmptySlot, 0, "[ctrl+f] Find empty slot") || pEditor->Input()->KeyPress(KEY_F))
|
||||
if(pEditor->DoButton_Editor(&s_EmptySlotPid, "F", 0, &FindEmptySlot, 0, "[ctrl+f] Find empty slot") || (pEditor->Input()->ModifierIsPressed() && pEditor->Input()->KeyPress(KEY_F)))
|
||||
{
|
||||
int number = -1;
|
||||
for(int i = 1; i <= 255; i++)
|
||||
|
|
Loading…
Reference in a new issue