Changeset - r18721:4348d1b17036
[Not reviewed]
master
0 3 0
frosch - 13 years ago 2011-12-17 20:52:07
frosch@openttd.org
(svn r23579) -Fix (r23525): Most up/down arrows stopped working.
3 files changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/genworld_gui.cpp
Show inline comments
 
@@ -590,13 +590,13 @@ struct GenerateLandscapeWindow : public 
 
				break;
 
			}
 

	
 
			case WID_GL_START_DATE_DOWN:
 
			case WID_GL_START_DATE_UP: // Year buttons
 
				/* Don't allow too fast scrolling */
 
				if ((this->flags & WF_TIMEOUT) && this->timeout_timer <= 1) {
 
				if (!(this->flags & WF_TIMEOUT) || this->timeout_timer <= 1) {
 
					this->HandleButtonClick(widget);
 

	
 
					_settings_newgame.game_creation.starting_year = Clamp(_settings_newgame.game_creation.starting_year + widget - WID_GL_START_DATE_TEXT, MIN_YEAR, MAX_YEAR);
 
					this->InvalidateData();
 
				}
 
				_left_button_clicked = false;
 
@@ -608,13 +608,13 @@ struct GenerateLandscapeWindow : public 
 
				ShowQueryString(STR_JUST_INT, STR_MAPGEN_START_DATE_QUERY_CAPT, 8, this, CS_NUMERAL, QSF_ENABLE_DEFAULT);
 
				break;
 

	
 
			case WID_GL_SNOW_LEVEL_DOWN:
 
			case WID_GL_SNOW_LEVEL_UP: // Snow line buttons
 
				/* Don't allow too fast scrolling */
 
				if ((this->flags & WF_TIMEOUT) && this->timeout_timer <= 1) {
 
				if (!(this->flags & WF_TIMEOUT) || this->timeout_timer <= 1) {
 
					this->HandleButtonClick(widget);
 

	
 
					_settings_newgame.game_creation.snow_line_height = Clamp(_settings_newgame.game_creation.snow_line_height + widget - WID_GL_SNOW_LEVEL_TEXT, MIN_SNOWLINE_HEIGHT, MAX_SNOWLINE_HEIGHT);
 
					this->InvalidateData();
 
				}
 
				_left_button_clicked = false;
 
@@ -981,13 +981,13 @@ struct CreateScenarioWindow : public Win
 
				ShowGenerateLandscape();
 
				break;
 

	
 
			case WID_CS_START_DATE_DOWN:
 
			case WID_CS_START_DATE_UP: // Year buttons
 
				/* Don't allow too fast scrolling */
 
				if ((this->flags & WF_TIMEOUT) && this->timeout_timer <= 1) {
 
				if (!(this->flags & WF_TIMEOUT) || this->timeout_timer <= 1) {
 
					this->HandleButtonClick(widget);
 
					this->SetDirty();
 

	
 
					_settings_newgame.game_creation.starting_year = Clamp(_settings_newgame.game_creation.starting_year + widget - WID_CS_START_DATE_TEXT, MIN_YEAR, MAX_YEAR);
 
				}
 
				_left_button_clicked = false;
 
@@ -999,13 +999,13 @@ struct CreateScenarioWindow : public Win
 
				ShowQueryString(STR_JUST_INT, STR_MAPGEN_START_DATE_QUERY_CAPT, 8, this, CS_NUMERAL, QSF_NONE);
 
				break;
 

	
 
			case WID_CS_FLAT_LAND_HEIGHT_DOWN:
 
			case WID_CS_FLAT_LAND_HEIGHT_UP: // Height level buttons
 
				/* Don't allow too fast scrolling */
 
				if ((this->flags & WF_TIMEOUT) && this->timeout_timer <= 1) {
 
				if (!(this->flags & WF_TIMEOUT) || this->timeout_timer <= 1) {
 
					this->HandleButtonClick(widget);
 
					this->SetDirty();
 

	
 
					_settings_newgame.game_creation.se_flat_world_height = Clamp(_settings_newgame.game_creation.se_flat_world_height + widget - WID_CS_FLAT_LAND_HEIGHT_TEXT, 0, MAX_TILE_HEIGHT);
 
				}
 
				_left_button_clicked = false;
src/network/network_gui.cpp
Show inline comments
 
@@ -1084,13 +1084,13 @@ struct NetworkStartServerWindow : public
 
				break;
 

	
 
			case WID_NSS_CLIENTS_BTND:    case WID_NSS_CLIENTS_BTNU:    // Click on up/down button for number of clients
 
			case WID_NSS_COMPANIES_BTND:  case WID_NSS_COMPANIES_BTNU:  // Click on up/down button for number of companies
 
			case WID_NSS_SPECTATORS_BTND: case WID_NSS_SPECTATORS_BTNU: // Click on up/down button for number of spectators
 
				/* Don't allow too fast scrolling */
 
				if ((this->flags & WF_TIMEOUT) && this->timeout_timer <= 1) {
 
				if (!(this->flags & WF_TIMEOUT) || this->timeout_timer <= 1) {
 
					this->HandleButtonClick(widget);
 
					this->SetDirty();
 
					switch (widget) {
 
						default: NOT_REACHED();
 
						case WID_NSS_CLIENTS_BTND: case WID_NSS_CLIENTS_BTNU:
 
							_settings_client.network.max_clients    = Clamp(_settings_client.network.max_clients    + widget - WID_NSS_CLIENTS_TXT,    2, MAX_CLIENTS);
src/toolbar_gui.cpp
Show inline comments
 
@@ -1036,13 +1036,13 @@ static CallBackFunction ToolbarScenDateP
 
	return CBF_NONE;
 
}
 

	
 
static CallBackFunction ToolbarScenDateBackward(Window *w)
 
{
 
	/* don't allow too fast scrolling */
 
	if ((w->flags & WF_TIMEOUT) && w->timeout_timer <= 1) {
 
	if (!(w->flags & WF_TIMEOUT) || w->timeout_timer <= 1) {
 
		w->HandleButtonClick(WID_TE_DATE_BACKWARD);
 
		w->SetDirty();
 

	
 
		_settings_game.game_creation.starting_year = Clamp(_settings_game.game_creation.starting_year - 1, MIN_YEAR, MAX_YEAR);
 
		SetDate(ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1), 0);
 
	}
 
@@ -1050,13 +1050,13 @@ static CallBackFunction ToolbarScenDateB
 
	return CBF_NONE;
 
}
 

	
 
static CallBackFunction ToolbarScenDateForward(Window *w)
 
{
 
	/* don't allow too fast scrolling */
 
	if ((w->flags & WF_TIMEOUT) && w->timeout_timer <= 1) {
 
	if (!(w->flags & WF_TIMEOUT) || w->timeout_timer <= 1) {
 
		w->HandleButtonClick(WID_TE_DATE_FORWARD);
 
		w->SetDirty();
 

	
 
		_settings_game.game_creation.starting_year = Clamp(_settings_game.game_creation.starting_year + 1, MIN_YEAR, MAX_YEAR);
 
		SetDate(ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1), 0);
 
	}
0 comments (0 inline, 0 general)