change console binding, now its Ctrl+F8, fix console focus issues
This commit is contained in:
parent
f3ad9f84de
commit
21b355a012
|
@ -11,6 +11,7 @@ RectPanel
|
||||||
UIWidget
|
UIWidget
|
||||||
id: consoleBuffer
|
id: consoleBuffer
|
||||||
layout: verticalBox
|
layout: verticalBox
|
||||||
|
focusable: false
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: commandSymbolLabel.top
|
anchors.bottom: commandSymbolLabel.top
|
||||||
|
|
|
@ -91,7 +91,6 @@ void Platform::init(PlatformListener* platformListener, const char *appName)
|
||||||
win32.keyMap[VK_MENU] = Fw::KeyMenu;
|
win32.keyMap[VK_MENU] = Fw::KeyMenu;
|
||||||
|
|
||||||
// ascii characters
|
// ascii characters
|
||||||
/*
|
|
||||||
win32.keyMap['!'] = Fw::KeyExclamation;
|
win32.keyMap['!'] = Fw::KeyExclamation;
|
||||||
win32.keyMap['"'] = Fw::KeyQuote;
|
win32.keyMap['"'] = Fw::KeyQuote;
|
||||||
win32.keyMap['#'] = Fw::KeyNumberSign;
|
win32.keyMap['#'] = Fw::KeyNumberSign;
|
||||||
|
@ -107,7 +106,6 @@ void Platform::init(PlatformListener* platformListener, const char *appName)
|
||||||
win32.keyMap['-'] = Fw::KeyMinus;
|
win32.keyMap['-'] = Fw::KeyMinus;
|
||||||
win32.keyMap['.'] = Fw::KeyPeriod;
|
win32.keyMap['.'] = Fw::KeyPeriod;
|
||||||
win32.keyMap['/'] = Fw::KeySlash;
|
win32.keyMap['/'] = Fw::KeySlash;
|
||||||
*/
|
|
||||||
|
|
||||||
win32.keyMap['0'] = Fw::Key0;
|
win32.keyMap['0'] = Fw::Key0;
|
||||||
win32.keyMap['1'] = Fw::Key1;
|
win32.keyMap['1'] = Fw::Key1;
|
||||||
|
@ -120,7 +118,6 @@ void Platform::init(PlatformListener* platformListener, const char *appName)
|
||||||
win32.keyMap['8'] = Fw::Key8;
|
win32.keyMap['8'] = Fw::Key8;
|
||||||
win32.keyMap['9'] = Fw::Key9;
|
win32.keyMap['9'] = Fw::Key9;
|
||||||
|
|
||||||
/*
|
|
||||||
win32.keyMap[':'] = Fw::KeyColon;
|
win32.keyMap[':'] = Fw::KeyColon;
|
||||||
win32.keyMap[';'] = Fw::KeySemicolon;
|
win32.keyMap[';'] = Fw::KeySemicolon;
|
||||||
win32.keyMap['<'] = Fw::KeyLess;
|
win32.keyMap['<'] = Fw::KeyLess;
|
||||||
|
@ -128,7 +125,6 @@ void Platform::init(PlatformListener* platformListener, const char *appName)
|
||||||
win32.keyMap['>'] = Fw::KeyGreater;
|
win32.keyMap['>'] = Fw::KeyGreater;
|
||||||
win32.keyMap['?'] = Fw::KeyQuestion;
|
win32.keyMap['?'] = Fw::KeyQuestion;
|
||||||
win32.keyMap['@'] = Fw::KeyAtSign;
|
win32.keyMap['@'] = Fw::KeyAtSign;
|
||||||
*/
|
|
||||||
|
|
||||||
win32.keyMap['A'] = Fw::KeyA;
|
win32.keyMap['A'] = Fw::KeyA;
|
||||||
win32.keyMap['B'] = Fw::KeyB;
|
win32.keyMap['B'] = Fw::KeyB;
|
||||||
|
@ -157,7 +153,6 @@ void Platform::init(PlatformListener* platformListener, const char *appName)
|
||||||
win32.keyMap['Y'] = Fw::KeyY;
|
win32.keyMap['Y'] = Fw::KeyY;
|
||||||
win32.keyMap['Z'] = Fw::KeyZ;
|
win32.keyMap['Z'] = Fw::KeyZ;
|
||||||
|
|
||||||
/*
|
|
||||||
win32.keyMap['['] = Fw::KeyLeftBracket;
|
win32.keyMap['['] = Fw::KeyLeftBracket;
|
||||||
win32.keyMap['\\'] = Fw::KeyBackslash;
|
win32.keyMap['\\'] = Fw::KeyBackslash;
|
||||||
win32.keyMap[']'] = Fw::KeyRightBracket;
|
win32.keyMap[']'] = Fw::KeyRightBracket;
|
||||||
|
@ -168,7 +163,6 @@ void Platform::init(PlatformListener* platformListener, const char *appName)
|
||||||
win32.keyMap['|'] = Fw::KeyBar;
|
win32.keyMap['|'] = Fw::KeyBar;
|
||||||
win32.keyMap['}'] = Fw::KeyRightCurly;
|
win32.keyMap['}'] = Fw::KeyRightCurly;
|
||||||
win32.keyMap['~'] = Fw::KeyTilde;
|
win32.keyMap['~'] = Fw::KeyTilde;
|
||||||
*/
|
|
||||||
|
|
||||||
// keypad
|
// keypad
|
||||||
win32.keyMap[VK_ADD] = Fw::KeyPlus;
|
win32.keyMap[VK_ADD] = Fw::KeyPlus;
|
||||||
|
|
|
@ -828,7 +828,7 @@ void UIWidget::onGeometryUpdate(const Rect& oldRect, const Rect& newRect)
|
||||||
|
|
||||||
void UIWidget::onFocusChange(bool focused, Fw::FocusReason reason)
|
void UIWidget::onFocusChange(bool focused, Fw::FocusReason reason)
|
||||||
{
|
{
|
||||||
callLuaField("onHoverChange", focused, reason);
|
callLuaField("onFocusChange", focused, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UIWidget::onHoverChange(bool hovered)
|
void UIWidget::onHoverChange(bool hovered)
|
||||||
|
|
|
@ -289,7 +289,7 @@ void OTClient::onPlatformEvent(const PlatformEvent& event)
|
||||||
{
|
{
|
||||||
bool fireUi = true;
|
bool fireUi = true;
|
||||||
|
|
||||||
if(event.type == EventKeyDown && event.ctrl && !event.alt && !event.shift && event.keycode == Fw::KeyApostrophe) {
|
if(event.type == EventKeyDown && event.ctrl && !event.alt && !event.shift && event.keycode == Fw::KeyF8) {
|
||||||
// TODO: move this events to lua
|
// TODO: move this events to lua
|
||||||
UIWidgetPtr console = g_ui.getRootWidget()->getChildById("consolePanel");
|
UIWidgetPtr console = g_ui.getRootWidget()->getChildById("consolePanel");
|
||||||
if(!console->isExplicitlyVisible()) {
|
if(!console->isExplicitlyVisible()) {
|
||||||
|
|
Loading…
Reference in New Issue