summaryrefslogtreecommitdiff
path: root/src/guiChatConsole.h
diff options
context:
space:
mode:
authorEsteban I. Ruiz Moreno <exio4.com@gmail.com>2013-06-02 21:16:32 -0300
committerShadowNinja <shadowninja@minetest.net>2016-03-02 23:23:31 -0500
commiteffa24737d6997dc40508533635accca3ed099e9 (patch)
treed8155991eada7cab1123ec48af7c1e7c539464ff /src/guiChatConsole.h
parentda97969c9b72ea1752efb741663b727c0225795a (diff)
downloadminetest-effa24737d6997dc40508533635accca3ed099e9.tar.gz
minetest-effa24737d6997dc40508533635accca3ed099e9.tar.bz2
minetest-effa24737d6997dc40508533635accca3ed099e9.zip
Use the console instead of a dedicated window when pressing keymap_chat/cmd
keymap_console opens a full window for chat history browsing.
Diffstat (limited to 'src/guiChatConsole.h')
-rw-r--r--src/guiChatConsole.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/guiChatConsole.h b/src/guiChatConsole.h
index 652b265a4..7b9fc6732 100644
--- a/src/guiChatConsole.h
+++ b/src/guiChatConsole.h
@@ -51,11 +51,16 @@ public:
void closeConsole();
// Close the console immediately, without animation.
void closeConsoleAtOnce();
+ // Set whether to close the console after the user presses enter.
+ void setCloseOnEnter(bool close) { m_close_on_enter = close; }
// Return the desired height (fraction of screen size)
// Zero if the console is closed or getting closed
f32 getDesiredHeight() const;
+ // Replace actual line when adding the actual to the history (if there is any)
+ void replaceAndAddToHistory(std::wstring line);
+
// Change how the cursor looks
void setCursor(
bool visible,
@@ -95,6 +100,8 @@ private:
// should the console be opened or closed?
bool m_open;
+ // should it close after you press enter?
+ bool m_close_on_enter;
// current console height [pixels]
s32 m_height;
// desired height [pixels]