46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
From 80ed52400f9660c715e4293d439bb6479239dba9 Mon Sep 17 00:00:00 2001
|
|
From: Juanjo <juanjo.ng.83@gmail.com>
|
|
Date: Sat, 15 Jun 2013 21:43:22 +0200
|
|
Subject: [PATCH 221/249] Add a hotkey for toggling touchscreen/mouse control.
|
|
|
|
---
|
|
src/main_gui.cpp | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
|
|
index 350439c..59cc6f1 100644
|
|
--- a/src/main_gui.cpp
|
|
+++ b/src/main_gui.cpp
|
|
@@ -225,6 +225,7 @@ enum {
|
|
GHK_TOGGLE_INVISIBILITY = GHK_TOGGLE_TRANSPARENCY + 9,
|
|
GHK_TRANSPARENCY_TOOLBAR = GHK_TOGGLE_INVISIBILITY + 8,
|
|
GHK_TRANSPARANCY,
|
|
+ GHK_TOUCHSCREEN,
|
|
GHK_CHAT,
|
|
GHK_CHAT_ALL,
|
|
GHK_CHAT_COMPANY,
|
|
@@ -385,6 +386,11 @@ struct MainWindow : Window
|
|
ResetRestoreAllTransparency();
|
|
break;
|
|
|
|
+ case GHK_TOUCHSCREEN:
|
|
+ _settings_client.gui.touchscreen_mode = CycleUp(_settings_client.gui.touchscreen_mode); // cycle through
|
|
+ ResetTabletWindow();
|
|
+ break;
|
|
+
|
|
#ifdef ENABLE_NETWORK
|
|
case GHK_CHAT: // smart chat; send to team if any, otherwise to all
|
|
if (_networking) {
|
|
@@ -503,6 +509,8 @@ static Hotkey global_hotkeys[] = {
|
|
Hotkey('8' | WKC_CTRL | WKC_SHIFT, "invisibility_catenary", GHK_TOGGLE_INVISIBILITY + 7),
|
|
Hotkey('X' | WKC_CTRL, "transparency_toolbar", GHK_TRANSPARENCY_TOOLBAR),
|
|
Hotkey('X', "toggle_transparency", GHK_TRANSPARANCY),
|
|
+ Hotkey('N', "toggle_touchscreen_control", GHK_TOUCHSCREEN),
|
|
+
|
|
#ifdef ENABLE_NETWORK
|
|
Hotkey(_ghk_chat_keys, "chat", GHK_CHAT),
|
|
Hotkey(_ghk_chat_all_keys, "chat_all", GHK_CHAT_ALL),
|
|
--
|
|
1.8.1.2
|
|
|