Changeset - r20630:ef21f6deaa7e
[Not reviewed]
master
0 12 0
michi_cc - 11 years ago 2013-08-05 20:36:24
michi_cc@openttd.org
(svn r25668) -Codechange: Pass proper Unicode UCS-4 characters instead of just UCS-2 to the window key press handlers.
12 files changed with 13 insertions and 12 deletions:
0 comments (0 inline, 0 general)
src/bridge_gui.cpp
Show inline comments
 
@@ -241,7 +241,7 @@ public:
 
		}
 
	}
 

	
 
	virtual EventState OnKeyPress(uint16 key, uint16 keycode)
 
	virtual EventState OnKeyPress(WChar key, uint16 keycode)
 
	{
 
		const uint8 i = keycode - '1';
 
		if (i < 9 && i < this->bridges->Length()) {
src/console_gui.cpp
Show inline comments
 
@@ -236,7 +236,7 @@ struct IConsoleWindow : Window
 
		if (_iconsole_cmdline.HandleCaret()) this->SetDirty();
 
	}
 

	
 
	virtual EventState OnKeyPress(uint16 key, uint16 keycode)
 
	virtual EventState OnKeyPress(WChar key, uint16 keycode)
 
	{
 
		if (_focused_window != this) return ES_NOT_HANDLED;
 

	
src/error_gui.cpp
Show inline comments
 
@@ -300,7 +300,7 @@ public:
 
		if (_window_system_initialized) ShowFirstError();
 
	}
 

	
 
	virtual EventState OnKeyPress(uint16 key, uint16 keycode)
 
	virtual EventState OnKeyPress(WChar key, uint16 keycode)
 
	{
 
		if (keycode != WKC_SPACE) return ES_NOT_HANDLED;
 
		delete this;
src/fios_gui.cpp
Show inline comments
 
@@ -618,7 +618,7 @@ public:
 
		}
 
	}
 

	
 
	virtual EventState OnKeyPress(uint16 key, uint16 keycode)
 
	virtual EventState OnKeyPress(WChar key, uint16 keycode)
 
	{
 
		if (keycode == WKC_ESC) {
 
			delete this;
src/highscore_gui.cpp
Show inline comments
 
@@ -63,7 +63,7 @@ struct EndGameHighScoreBaseWindow : Wind
 
		delete this;
 
	}
 

	
 
	virtual EventState OnKeyPress(uint16 key, uint16 keycode)
 
	virtual EventState OnKeyPress(WChar key, uint16 keycode)
 
	{
 
		/* All keys are 'handled' by this window but we want to make
 
		 * sure that 'quit' still works correctly. Not handling the
src/misc_gui.cpp
Show inline comments
 
@@ -1027,7 +1027,7 @@ struct QueryWindow : public Window {
 
		}
 
	}
 

	
 
	virtual EventState OnKeyPress(uint16 key, uint16 keycode)
 
	virtual EventState OnKeyPress(WChar key, uint16 keycode)
 
	{
 
		/* ESC closes the window, Enter confirms the action */
 
		switch (keycode) {
src/network/network_chat_gui.cpp
Show inline comments
 
@@ -491,7 +491,7 @@ struct NetworkChatWindow : public Window
 
		}
 
	}
 

	
 
	virtual EventState OnKeyPress(uint16 key, uint16 keycode)
 
	virtual EventState OnKeyPress(WChar key, uint16 keycode)
 
	{
 
		EventState state = ES_NOT_HANDLED;
 
		if (keycode == WKC_TAB) {
src/network/network_content_gui.cpp
Show inline comments
 
@@ -800,7 +800,7 @@ public:
 
		}
 
	}
 

	
 
	virtual EventState OnKeyPress(uint16 key, uint16 keycode)
 
	virtual EventState OnKeyPress(WChar key, uint16 keycode)
 
	{
 
		switch (keycode) {
 
			case WKC_UP:
src/network/network_gui.cpp
Show inline comments
 
@@ -799,7 +799,7 @@ public:
 
		this->SetDirty();
 
	}
 

	
 
	virtual EventState OnKeyPress(uint16 key, uint16 keycode)
 
	virtual EventState OnKeyPress(WChar key, uint16 keycode)
 
	{
 
		EventState state = ES_NOT_HANDLED;
 

	
src/newgrf_gui.cpp
Show inline comments
 
@@ -1235,7 +1235,7 @@ struct NewGRFWindow : public Window, New
 
		this->SetWidgetDisabledState(WID_NS_PRESET_SAVE, has_missing);
 
	}
 

	
 
	virtual EventState OnKeyPress(uint16 key, uint16 keycode)
 
	virtual EventState OnKeyPress(WChar key, uint16 keycode)
 
	{
 
		if (!this->editable) return ES_NOT_HANDLED;
 

	
src/news_gui.cpp
Show inline comments
 
@@ -449,7 +449,7 @@ struct NewsWindow : Window {
 
		}
 
	}
 

	
 
	virtual EventState OnKeyPress(uint16 key, uint16 keycode)
 
	virtual EventState OnKeyPress(WChar key, uint16 keycode)
 
	{
 
		if (keycode == WKC_SPACE) {
 
			/* Don't continue. */
src/window_gui.h
Show inline comments
 
@@ -19,6 +19,7 @@
 
#include "widget_type.h"
 
#include "core/smallvec_type.hpp"
 
#include "core/smallmap_type.hpp"
 
#include "string_type.h"
 

	
 
/**
 
 * Flags to describe the look of the frame
 
@@ -593,7 +594,7 @@ public:
 
	 * @return #ES_HANDLED if the key press has been handled and no other
 
	 *         window should receive the event.
 
	 */
 
	virtual EventState OnKeyPress(uint16 key, uint16 keycode) { return ES_NOT_HANDLED; }
 
	virtual EventState OnKeyPress(WChar key, uint16 keycode) { return ES_NOT_HANDLED; }
 

	
 
	virtual EventState OnHotkey(int hotkey);
 

	
0 comments (0 inline, 0 general)