summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-22 19:35:29 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-22 19:35:29 +0300
commita7f215396a9278d148d3b4bffdc8e754ab5cc30c (patch)
tree4a4f8fae7705ac836fd2aa3f997e859671587ed9 /src
parentdbe4b0a70a8ccf4c3be329f168d4388ba4b029b5 (diff)
downloadmanaverse-a7f215396a9278d148d3b4bffdc8e754ab5cc30c.tar.gz
manaverse-a7f215396a9278d148d3b4bffdc8e754ab5cc30c.tar.bz2
manaverse-a7f215396a9278d148d3b4bffdc8e754ab5cc30c.tar.xz
manaverse-a7f215396a9278d148d3b4bffdc8e754ab5cc30c.zip
Add key for disable full screen mode.
Minus on numeric keyboard.
Diffstat (limited to 'src')
-rw-r--r--src/actionmanager.cpp9
-rw-r--r--src/actionmanager.h1
-rw-r--r--src/gui/setupactiondata.h5
-rw-r--r--src/keyboarddata.h7
-rw-r--r--src/keydata.h1
5 files changed, 23 insertions, 0 deletions
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index fa3c03526..28e5b9fc3 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -23,6 +23,7 @@
#include "dropshortcut.h"
#include "emoteshortcut.h"
#include "game.h"
+#include "graphics.h"
#include "inputevent.h"
#include "itemshortcut.h"
#include "inputmanager.h"
@@ -1029,4 +1030,12 @@ impHandler0(targetNPC)
return setTarget(ActorSprite::NPC);
}
+impHandler0(safeVideoMode)
+{
+ if (mainGraphics)
+ mainGraphics->setFullscreen(false);
+
+ return true;
+}
+
}
diff --git a/src/actionmanager.h b/src/actionmanager.h
index a453869d7..e415928bb 100644
--- a/src/actionmanager.h
+++ b/src/actionmanager.h
@@ -94,6 +94,7 @@ namespace ActionManager
decHandler(targetPlayer);
decHandler(targetMonster);
decHandler(targetNPC);
+ decHandler(safeVideoMode);
decHandler(hideWindows);
decHandler(helpWindowShow);
diff --git a/src/gui/setupactiondata.h b/src/gui/setupactiondata.h
index 3be3fb39f..9c516c83f 100644
--- a/src/gui/setupactiondata.h
+++ b/src/gui/setupactiondata.h
@@ -160,6 +160,11 @@ static SetupActionData setupActionData0[] =
"",
},
{
+ N_("Return to safe video mode"),
+ Input::KEY_SAFE_VIDEO,
+ "",
+ },
+ {
"",
Input::KEY_NO_VALUE,
""
diff --git a/src/keyboarddata.h b/src/keyboarddata.h
index dc261a402..6e0111ba9 100644
--- a/src/keyboarddata.h
+++ b/src/keyboarddata.h
@@ -1910,6 +1910,13 @@ static KeyData const keyData[Input::KEY_TOTAL] = {
Input::GRP_GUICHAN,
nullptr,
Input::KEY_NO_VALUE, 50,
+ COND_DEFAULT},
+ {"keySafeVideo",
+ INPUT_KEYBOARD, SDLK_KP_MINUS,
+ INPUT_UNKNOWN, Input::KEY_NO_VALUE,
+ Input::GRP_DEFAULT,
+ &ActionManager::safeVideoMode,
+ Input::KEY_NO_VALUE, 50,
COND_DEFAULT}
};
diff --git a/src/keydata.h b/src/keydata.h
index 352f61f6a..d0c99091a 100644
--- a/src/keydata.h
+++ b/src/keydata.h
@@ -335,6 +335,7 @@ namespace Input
KEY_GUI_PAGE_DOWN,
KEY_GUI_INSERT,
KEY_GUI_MOD,
+ KEY_SAFE_VIDEO,
KEY_TOTAL
};
}