From 8ba2cc3a63acfdc6f2f4fbe1589e2ed956de575f Mon Sep 17 00:00:00 2001 From: Josh Engebretson Date: Fri, 16 Jun 2017 09:57:07 -0700 Subject: [PATCH] A couple PR tweaks --- Script/AtomicEditor/ui/Shortcuts.ts | 7 +++++++ Source/Atomic/Resource/Image.cpp | 5 +++-- Source/Atomic/UI/UI.h | 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Script/AtomicEditor/ui/Shortcuts.ts b/Script/AtomicEditor/ui/Shortcuts.ts index c6a9f8824c..b98ff4e0fd 100644 --- a/Script/AtomicEditor/ui/Shortcuts.ts +++ b/Script/AtomicEditor/ui/Shortcuts.ts @@ -206,6 +206,13 @@ class Shortcuts extends Atomic.ScriptObject { if (!Atomic.ui.focusedWidget && !this.cmdKeyDown()) { + if (ev.key == Atomic.KEY_ESCAPE) { + + if (Atomic.ui.consoleIsVisible) { + Atomic.ui.showConsole(false); + } + } + if (ev.key == Atomic.KEY_W) { this.invokeGizmoEditModeChanged(Editor.EditMode.EDIT_MOVE); } else if (ev.key == Atomic.KEY_E) { diff --git a/Source/Atomic/Resource/Image.cpp b/Source/Atomic/Resource/Image.cpp index 51c4ddd7bc..50235405a0 100644 --- a/Source/Atomic/Resource/Image.cpp +++ b/Source/Atomic/Resource/Image.cpp @@ -38,11 +38,12 @@ #include #endif -// ATOMIC END - #include #include +// ATOMIC END + + #include "../DebugNew.h" #ifndef MAKEFOURCC diff --git a/Source/Atomic/UI/UI.h b/Source/Atomic/UI/UI.h index fd74aa6b39..e384709201 100644 --- a/Source/Atomic/UI/UI.h +++ b/Source/Atomic/UI/UI.h @@ -109,6 +109,9 @@ class ATOMIC_API UI : public Object, private tb::TBWidgetListener void ShowConsole(bool value); void ToggleConsole(); + /// Get whether the console is currently visible + bool GetConsoleIsVisible() const { return consoleVisible_; } + bool GetFocusedWidget(); /// request exit on next frame