Changeset - r19773:f2288a8eab2a
[Not reviewed]
master
0 3 0
frosch - 12 years ago 2012-11-13 21:46:40
frosch@openttd.org
(svn r24728) -Codechange: Unify usage of OnOSKInput.
3 files changed with 15 insertions and 13 deletions:
0 comments (0 inline, 0 general)
src/network/network_content_gui.cpp
Show inline comments
 
@@ -788,10 +788,12 @@ public:
 

	
 
	virtual void OnOSKInput(int wid)
 
	{
 
		this->string_filter.SetFilterTerm(this->edit_str_buf);
 
		this->content.SetFilterState(!this->string_filter.IsEmpty());
 
		this->content.ForceRebuild();
 
		this->InvalidateData();
 
		if (wid == WID_NCL_FILTER) {
 
			this->string_filter.SetFilterTerm(this->edit_str_buf);
 
			this->content.SetFilterState(!this->string_filter.IsEmpty());
 
			this->content.ForceRebuild();
 
			this->InvalidateData();
 
		}
 
	}
 

	
 
	virtual void OnResize()
src/settings_gui.cpp
Show inline comments
 
@@ -2418,13 +2418,15 @@ struct GameSettingsWindow : QueryStringB
 

	
 
	virtual void OnOSKInput(int wid)
 
	{
 
		string_filter.SetFilterTerm(this->edit_str_buf);
 
		if (!string_filter.IsEmpty() && !this->manually_changed_folding) {
 
			/* User never expanded/collapsed single pages and entered a filter term.
 
			 * Expand everything, to save weird expand clicks, */
 
			_settings_main_page.UnFoldAll();
 
		if (wid == WID_GS_FILTER) {
 
			string_filter.SetFilterTerm(this->edit_str_buf);
 
			if (!string_filter.IsEmpty() && !this->manually_changed_folding) {
 
				/* User never expanded/collapsed single pages and entered a filter term.
 
				 * Expand everything, to save weird expand clicks, */
 
				_settings_main_page.UnFoldAll();
 
			}
 
			this->InvalidateData();
 
		}
 
		this->InvalidateData();
 
	}
 

	
 
	virtual void OnResize()
src/signs_gui.cpp
Show inline comments
 
@@ -298,7 +298,7 @@ struct SignListWindow : QueryStringBaseW
 
		EventState state = ES_NOT_HANDLED;
 
		switch (this->HandleEditBoxKey(WID_SIL_FILTER_TEXT, key, keycode, state)) {
 
			case HEBR_EDITING:
 
				this->SetFilterString(this->text.buf);
 
				this->OnOSKInput(WID_SIL_FILTER_TEXT);
 
				break;
 

	
 
			case HEBR_CONFIRM: // Enter pressed -> goto first sign in list
 
@@ -325,8 +325,6 @@ struct SignListWindow : QueryStringBaseW
 
				NOT_REACHED();
 
		}
 

	
 
		if (state == ES_HANDLED) OnOSKInput(WID_SIL_FILTER_TEXT);
 

	
 
		return state;
 
	}
 

	
0 comments (0 inline, 0 general)