|
@@ -1606,7 +1606,7 @@ void UI::HandleKeyDown(StringHash eventType, VariantMap& eventData)
|
|
|
int key = eventData[P_KEY].GetInt();
|
|
int key = eventData[P_KEY].GetInt();
|
|
|
|
|
|
|
|
// Cancel UI dragging
|
|
// Cancel UI dragging
|
|
|
- if (key == KEY_ESC && dragElementsCount_ > 0)
|
|
|
|
|
|
|
+ if (key == KEY_ESCAPE && dragElementsCount_ > 0)
|
|
|
{
|
|
{
|
|
|
ProcessDragCancel();
|
|
ProcessDragCancel();
|
|
|
|
|
|
|
@@ -1614,7 +1614,7 @@ void UI::HandleKeyDown(StringHash eventType, VariantMap& eventData)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Dismiss modal element if any when ESC key is pressed
|
|
// Dismiss modal element if any when ESC key is pressed
|
|
|
- if (key == KEY_ESC && HasModalElement())
|
|
|
|
|
|
|
+ if (key == KEY_ESCAPE && HasModalElement())
|
|
|
{
|
|
{
|
|
|
UIElement* element = rootModalElement_->GetChild(rootModalElement_->GetNumChildren() - 1);
|
|
UIElement* element = rootModalElement_->GetChild(rootModalElement_->GetNumChildren() - 1);
|
|
|
if (element->GetVars().Contains(VAR_ORIGIN))
|
|
if (element->GetVars().Contains(VAR_ORIGIN))
|
|
@@ -1664,7 +1664,7 @@ void UI::HandleKeyDown(StringHash eventType, VariantMap& eventData)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// Defocus the element
|
|
// Defocus the element
|
|
|
- else if (key == KEY_ESC && element->GetFocusMode() == FM_FOCUSABLE_DEFOCUSABLE)
|
|
|
|
|
|
|
+ else if (key == KEY_ESCAPE && element->GetFocusMode() == FM_FOCUSABLE_DEFOCUSABLE)
|
|
|
element->SetFocus(false);
|
|
element->SetFocus(false);
|
|
|
// If none of the special keys, pass the key to the focused element
|
|
// If none of the special keys, pass the key to the focused element
|
|
|
else
|
|
else
|