File diff r14398:461a80e5f996 → r14399:3f819c0da60a
src/osk_gui.cpp
Show inline comments
 
@@ -139,13 +139,13 @@ struct OskWindow : public Window {
 
	{
 
		this->DrawWidgets();
 

	
 
		this->qs->DrawEditBox(this, OSK_WIDGET_TEXT);
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget)
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		/* clicked a letter */
 
		if (widget >= OSK_WIDGET_LETTERS) {
 
			WChar c = _keyboard[this->shift][widget - OSK_WIDGET_LETTERS];
 

	
 
			if (!IsValidChar(c, this->qs->afilter)) return;
 
@@ -204,23 +204,23 @@ struct OskWindow : public Window {
 
				break;
 

	
 
			case OSK_WIDGET_OK:
 
				if (this->qs->orig == NULL || strcmp(this->qs->text.buf, this->qs->orig) != 0) {
 
					/* pass information by simulating a button press on parent window */
 
					if (this->ok_btn != 0) {
 
						this->parent->OnClick(pt, this->ok_btn);
 
						this->parent->OnClick(pt, this->ok_btn, 1);
 
						/* Window gets deleted when the parent window removes itself. */
 
						return;
 
					}
 
				}
 
				delete this;
 
				break;
 

	
 
			case OSK_WIDGET_CANCEL:
 
				if (this->cancel_btn != 0) { // pass a cancel event to the parent window
 
					this->parent->OnClick(pt, this->cancel_btn);
 
					this->parent->OnClick(pt, this->cancel_btn, 1);
 
					/* Window gets deleted when the parent window removes itself. */
 
					return;
 
				} else { // or reset to original string
 
					strcpy(qs->text.buf, this->orig_str_buf);
 
					UpdateTextBufferSize(&qs->text);
 
					MoveTextBufferPos(&qs->text, WKC_END);