From 81c26caaf86f439ed3f1699f13252afd45c52e18 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 31 Jul 2017 20:01:39 +0200 Subject: [PATCH] GRAPHICS: MACGUI: Exposed input text from the MacTextWindow --- graphics/macgui/mactextwindow.cpp | 7 +++++++ graphics/macgui/mactextwindow.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp index bba49292e03..d7c97c033b6 100644 --- a/graphics/macgui/mactextwindow.cpp +++ b/graphics/macgui/mactextwindow.cpp @@ -184,6 +184,13 @@ void MacTextWindow::drawInput() { updateCursorPos(); } +void MacTextWindow::clearInput() { + undrawCursor(); + + _cursorX = 0; + _inputText.clear(); +} + ////////////////// // Cursor stuff static void cursorTimerHandler(void *refCon) { diff --git a/graphics/macgui/mactextwindow.h b/graphics/macgui/mactextwindow.h index ddd6c44d35b..00bca8bdccf 100644 --- a/graphics/macgui/mactextwindow.h +++ b/graphics/macgui/mactextwindow.h @@ -72,6 +72,9 @@ public: void undrawCursor(); + const Common::String getInput() { return _inputText; } + void clearInput(); + private: void drawInput(); void updateCursorPos();