Changeset - r10674:cd3481e9e96f
[Not reviewed]
master
0 1 0
rubidium - 16 years ago 2009-01-10 19:22:05
rubidium@openttd.org
(svn r14978) -Codechange: simplify the control flow of the OnClick of the settings window
1 file changed with 3 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/settings_gui.cpp
Show inline comments
 
@@ -1269,8 +1269,8 @@ struct PatchesSelectionWindow : Window {
 

	
 
	virtual void OnClick(Point pt, int widget)
 
	{
 
		switch (widget) {
 
			case PATCHSEL_OPTIONSPANEL: {
 
		if (widget != PATCHSEL_OPTIONSPANEL) return;
 

	
 
				int y = pt.y - SETTINGTREE_TOP_OFFSET;  // Shift y coordinate
 
				if (y < 0) return;  // Clicked above first entry
 

	
 
@@ -1347,6 +1347,7 @@ struct PatchesSelectionWindow : Window {
 
							_left_button_clicked = false;
 
						}
 
					} break;
 

	
 
					default: NOT_REACHED();
 
					}
 

	
 
@@ -1365,8 +1366,6 @@ struct PatchesSelectionWindow : Window {
 
						ShowQueryString(STR_CONFIG_PATCHES_INT32, STR_CONFIG_PATCHES_QUERY_CAPT, 10, 100, this, CS_NUMERAL, QSF_NONE);
 
					}
 
				}
 
			} break;
 
		}
 
	}
 

	
 
	virtual void OnTimeout()
0 comments (0 inline, 0 general)