Changeset - r19830:115afe4d0f91
[Not reviewed]
master
0 6 0
frosch - 12 years ago 2012-12-05 19:34:25
frosch@openttd.org
(svn r24785) -Add: Various methods to open the OSK. (based on patch by Eagle_rainbow)
6 files changed with 36 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/lang/english.txt
Show inline comments
 
@@ -1332,6 +1332,12 @@ STR_CONFIG_SETTING_SCROLLWHEEL_SCROLL   
 
STR_CONFIG_SETTING_SCROLLWHEEL_OFF                              :Off
 
STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER                       :Map scrollwheel speed: {STRING2}
 
STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER_HELPTEXT              :Control the sensitivity of mouse-wheel scrolling
 
STR_CONFIG_SETTING_OSK_ACTIVATION                               :On screen keyboard: {STRING2}
 
STR_CONFIG_SETTING_OSK_ACTIVATION_HELPTEXT                      :Select the method to open the on screen keyboard for entering text into editboxes only using the pointing device. This is meant for small devices without actual keyboard
 
STR_CONFIG_SETTING_OSK_ACTIVATION_DISABLED                      :Disabled
 
STR_CONFIG_SETTING_OSK_ACTIVATION_DOUBLE_CLICK                  :Double click
 
STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK_FOCUS            :Single click (when focussed)
 
STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK                  :Single click (immediately)
 

	
 
STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU                          :Right-click emulation: {STRING2}
 
STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_HELPTEXT                 :Select the method to emulate right mouse-button clicks
src/misc_gui.cpp
Show inline comments
 
@@ -30,6 +30,15 @@
 

	
 
#include "table/strings.h"
 

	
 
/** Method to open the OSK. */
 
enum OskActivation {
 
	OSKA_DISABLED,           ///< The OSK shall not be activated at all.
 
	OSKA_DOUBLE_CLICK,       ///< Double click on the edit box opens OSK.
 
	OSKA_SINGLE_CLICK,       ///< Single click after focus click opens OSK.
 
	OSKA_IMMEDIATELY,        ///< Focussing click already opens OSK.
 
};
 

	
 

	
 
static const NWidgetPart _nested_land_info_widgets[] = {
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_CLOSEBOX, COLOUR_GREY),
 
@@ -835,8 +844,10 @@ void QueryString::ClickEditBox(Window *w
 
		return;
 
	}
 

	
 
	if (!focus_changed && w->window_class != WC_OSK) {
 
		/* Open the OSK window if clicked on an edit box, while not changing focus */
 
	if (w->window_class != WC_OSK && _settings_client.gui.osk_activation != OSKA_DISABLED &&
 
		(!focus_changed || _settings_client.gui.osk_activation == OSKA_IMMEDIATELY) &&
 
		(click_count == 2 || _settings_client.gui.osk_activation != OSKA_DOUBLE_CLICK)) {
 
		/* Open the OSK window */
 
		ShowOnScreenKeyboard(w, wid);
 
	}
 
}
src/settings_gui.cpp
Show inline comments
 
@@ -1728,6 +1728,7 @@ static SettingEntry _settings_ui_interac
 
	 *  Since it's also able to completely disable the scrollwheel will we display it on all platforms anyway */
 
	SettingEntry("gui.scrollwheel_scrolling"),
 
	SettingEntry("gui.scrollwheel_multiplier"),
 
	SettingEntry("gui.osk_activation"),
 
#ifdef __APPLE__
 
	/* We might need to emulate a right mouse button on mac */
 
	SettingEntry("gui.right_mouse_btn_emulation"),
src/settings_type.h
Show inline comments
 
@@ -117,6 +117,7 @@ struct GUISettings {
 
	uint32 last_newgrf_count;                ///< the numbers of NewGRFs we found during the last scan
 
	byte   missing_strings_threshold;        ///< the number of missing strings before showing the warning
 
	uint8  graph_line_thickness;             ///< the thickness of the lines in the various graph guis
 
	uint8  osk_activation;                   ///< Mouse gesture to trigger the OSK.
 

	
 
	uint16 console_backlog_timeout;          ///< the minimum amount of time items should be in the console backlog before they will be removed in ~3 seconds granularity.
 
	uint16 console_backlog_length;           ///< the minimum amount of items in the console backlog before items will be removed.
src/table/gameopt_settings.ini
Show inline comments
 
@@ -22,6 +22,7 @@ static const char *_savegame_date = "lon
 
#ifdef ENABLE_NETWORK
 
static const char *_server_langs = "ANY|ENGLISH|GERMAN|FRENCH|BRAZILIAN|BULGARIAN|CHINESE|CZECH|DANISH|DUTCH|ESPERANTO|FINNISH|HUNGARIAN|ICELANDIC|ITALIAN|JAPANESE|KOREAN|LITHUANIAN|NORWEGIAN|POLISH|PORTUGUESE|ROMANIAN|RUSSIAN|SLOVAK|SLOVENIAN|SPANISH|SWEDISH|TURKISH|UKRAINIAN|AFRIKAANS|CROATIAN|CATALAN|ESTONIAN|GALICIAN|GREEK|LATVIAN";
 
#endif /* ENABLE_NETWORK */
 
static const char *_osk_activation = "disabled|double|single|immediately";
 

	
 
static const SettingDesc _gameopt_settings[] = {
 
	/* In version 4 a new difficulty setting has been added to the difficulty settings,
src/table/settings.ini
Show inline comments
 
@@ -2324,6 +2324,20 @@ str      = STR_CONFIG_SETTING_HOVER_DELA
 
strhelp  = STR_CONFIG_SETTING_HOVER_DELAY_HELPTEXT
 
strval   = STR_CONFIG_SETTING_HOVER_DELAY_VALUE
 

	
 
[SDTC_OMANY]
 
var      = gui.osk_activation
 
type     = SLE_UINT8
 
flags    = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
 
str      = STR_CONFIG_SETTING_OSK_ACTIVATION
 
strhelp  = STR_CONFIG_SETTING_OSK_ACTIVATION_HELPTEXT
 
strval   = STR_CONFIG_SETTING_OSK_ACTIVATION_DISABLED
 
guiflags = SGF_MULTISTRING
 
full     = _osk_activation
 
def      = 1
 
min      = 0
 
max      = 3
 
cat      = SC_BASIC
 

	
 
[SDTC_VAR]
 
var      = gui.toolbar_pos
 
type     = SLE_UINT8
0 comments (0 inline, 0 general)