mirror of https://github.com/OpenTTD/OpenTTD
(svn r25670) -Codechange: Pass UCS-4 characters to the edit box key handler.
parent
1567e32d89
commit
270d8aa639
|
@ -362,7 +362,7 @@ bool Textbuf::HandleCaret()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
HandleKeyPressResult Textbuf::HandleKeyPress(uint16 key, uint16 keycode)
|
HandleKeyPressResult Textbuf::HandleKeyPress(WChar key, uint16 keycode)
|
||||||
{
|
{
|
||||||
bool edited = false;
|
bool edited = false;
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ struct Textbuf {
|
||||||
bool DeleteChar(uint16 keycode);
|
bool DeleteChar(uint16 keycode);
|
||||||
bool MovePos(uint16 keycode);
|
bool MovePos(uint16 keycode);
|
||||||
|
|
||||||
HandleKeyPressResult HandleKeyPress(uint16 key, uint16 keycode);
|
HandleKeyPressResult HandleKeyPress(WChar key, uint16 keycode);
|
||||||
|
|
||||||
bool HandleCaret();
|
bool HandleCaret();
|
||||||
void UpdateSize();
|
void UpdateSize();
|
||||||
|
|
|
@ -2378,7 +2378,7 @@ static bool MaybeBringWindowToFront(Window *w)
|
||||||
* @return #ES_HANDLED if the key press has been handled and no other
|
* @return #ES_HANDLED if the key press has been handled and no other
|
||||||
* window should receive the event.
|
* window should receive the event.
|
||||||
*/
|
*/
|
||||||
EventState Window::HandleEditBoxKey(int wid, uint16 key, uint16 keycode)
|
EventState Window::HandleEditBoxKey(int wid, WChar key, uint16 keycode)
|
||||||
{
|
{
|
||||||
QueryString *query = this->GetQueryString(wid);
|
QueryString *query = this->GetQueryString(wid);
|
||||||
if (query == NULL) return ES_NOT_HANDLED;
|
if (query == NULL) return ES_NOT_HANDLED;
|
||||||
|
|
|
@ -488,7 +488,7 @@ public:
|
||||||
void UnfocusFocusedWidget();
|
void UnfocusFocusedWidget();
|
||||||
bool SetFocusedWidget(int widget_index);
|
bool SetFocusedWidget(int widget_index);
|
||||||
|
|
||||||
EventState HandleEditBoxKey(int wid, uint16 key, uint16 keycode);
|
EventState HandleEditBoxKey(int wid, WChar key, uint16 keycode);
|
||||||
|
|
||||||
void HandleButtonClick(byte widget);
|
void HandleButtonClick(byte widget);
|
||||||
int GetRowFromWidget(int clickpos, int widget, int padding, int line_height = -1) const;
|
int GetRowFromWidget(int clickpos, int widget, int padding, int line_height = -1) const;
|
||||||
|
|
Loading…
Reference in New Issue