Changeset - r4727:8181e87539cd
[Not reviewed]
master
0 8 0
belugas - 18 years ago 2006-10-04 19:11:43
belugas@openttd.org
(svn r6639) -CodeChange : Conversion of SetWidgetLoweredState to SetWindowWidgetLoweredState, in order to follow pre-established standard
8 files changed with 30 insertions and 30 deletions:
0 comments (0 inline, 0 general)
airport_gui.c
Show inline comments
 
@@ -143,8 +143,8 @@ static void BuildAirportPickerWndProc(Wi
 
{
 
	switch (e->event) {
 
	case WE_CREATE:
 
		SetWidgetLoweredState(w, 16, !_station_show_coverage);
 
		SetWidgetLoweredState(w, 17, _station_show_coverage);
 
		SetWindowWidgetLoweredState(w, 16, !_station_show_coverage);
 
		SetWindowWidgetLoweredState(w, 17, _station_show_coverage);
 
		LowerWindowWidget(w, _selected_airport_type + 7);
 
		break;
 

	
 
@@ -210,8 +210,8 @@ static void BuildAirportPickerWndProc(Wi
 
			break;
 
		case 16: case 17:
 
			_station_show_coverage = e->we.click.widget - 16;
 
			SetWidgetLoweredState(w, 16, !_station_show_coverage);
 
			SetWidgetLoweredState(w, 17, _station_show_coverage);
 
			SetWindowWidgetLoweredState(w, 16, !_station_show_coverage);
 
			SetWindowWidgetLoweredState(w, 17, _station_show_coverage);
 
			SndPlayFx(SND_15_BEEP);
 
			SetWindowDirty(w);
 
			break;
genworld_gui.c
Show inline comments
 
@@ -241,10 +241,10 @@ void GenerateLandscapeWndProc(Window *w,
 
		SetWindowWidgetDisabledState(w, 21, _patches_newgame.snow_line_height <= 2 || _opt_newgame.landscape != LT_HILLY);
 
		SetWindowWidgetDisabledState(w, 23, _patches_newgame.snow_line_height >= 13 || _opt_newgame.landscape != LT_HILLY);
 

	
 
		SetWidgetLoweredState(w, 3, _opt_newgame.landscape == LT_NORMAL);
 
		SetWidgetLoweredState(w, 4, _opt_newgame.landscape == LT_HILLY);
 
		SetWidgetLoweredState(w, 5, _opt_newgame.landscape == LT_DESERT);
 
		SetWidgetLoweredState(w, 6, _opt_newgame.landscape == LT_CANDY);
 
		SetWindowWidgetLoweredState(w, 3, _opt_newgame.landscape == LT_NORMAL);
 
		SetWindowWidgetLoweredState(w, 4, _opt_newgame.landscape == LT_HILLY);
 
		SetvWidgetLoweredState(w, 5, _opt_newgame.landscape == LT_DESERT);
 
		SetWindowWidgetLoweredState(w, 6, _opt_newgame.landscape == LT_CANDY);
 
		DrawWindowWidgets(w);
 

	
 
		y = (mode == GLWP_HEIGHTMAP) ? 22 : 0;
 
@@ -594,10 +594,10 @@ void CreateScenarioWndProc(Window *w, Wi
 
		SetWindowWidgetDisabledState(w, 17, _patches_newgame.se_flat_world_height <= 0);
 
		SetWindowWidgetDisabledState(w, 19, _patches_newgame.se_flat_world_height >= 15);
 

	
 
		SetWidgetLoweredState(w, 3, _opt_newgame.landscape == LT_NORMAL);
 
		SetWidgetLoweredState(w, 4, _opt_newgame.landscape == LT_HILLY);
 
		SetWidgetLoweredState(w, 5, _opt_newgame.landscape == LT_DESERT);
 
		SetWidgetLoweredState(w, 6, _opt_newgame.landscape == LT_CANDY);
 
		SetWindowWidgetLoweredState(w, 3, _opt_newgame.landscape == LT_NORMAL);
 
		SetWindowWidgetLoweredState(w, 4, _opt_newgame.landscape == LT_HILLY);
 
		SetWindowWidgetLoweredState(w, 5, _opt_newgame.landscape == LT_DESERT);
 
		SetWindowWidgetLoweredState(w, 6, _opt_newgame.landscape == LT_CANDY);
 
		DrawWindowWidgets(w);
 

	
 
		DrawString( 12,  96, STR_MAPSIZE, 0);
intro_gui.c
Show inline comments
 
@@ -50,10 +50,10 @@ static void SelectGameWndProc(Window *w,
 
	case WE_CREATE: LowerWindowWidget(w, _opt_newgame.landscape + 8); break;
 

	
 
	case WE_PAINT:
 
		SetWidgetLoweredState(w, 8,  _opt_newgame.landscape == LT_NORMAL);
 
		SetWidgetLoweredState(w, 9,  _opt_newgame.landscape == LT_HILLY);
 
		SetWidgetLoweredState(w, 10, _opt_newgame.landscape == LT_DESERT);
 
		SetWidgetLoweredState(w, 11, _opt_newgame.landscape == LT_CANDY);
 
		SetWindowWidgetLoweredState(w, 8,  _opt_newgame.landscape == LT_NORMAL);
 
		SetWindowWidgetLoweredState(w, 9,  _opt_newgame.landscape == LT_HILLY);
 
		SetWindowWidgetLoweredState(w, 10, _opt_newgame.landscape == LT_DESERT);
 
		SetWindowWidgetLoweredState(w, 11, _opt_newgame.landscape == LT_CANDY);
 
		SetDParam(0, STR_6801_EASY + _opt_newgame.diff_level);
 
		DrawWindowWidgets(w);
 
		break;
rail_gui.c
Show inline comments
 
@@ -621,8 +621,8 @@ static void StationBuildWndProc(Window *
 
			LowerWindowWidget(w, _railstation.numtracks + 4);
 
			LowerWindowWidget(w, _railstation.platlength + 11);
 
		}
 
		SetWidgetLoweredState(w, 20, !_station_show_coverage);
 
		SetWidgetLoweredState(w, 21, _station_show_coverage);
 
		SetWindowWidgetLoweredState(w, 20, !_station_show_coverage);
 
		SetWindowWidgetLoweredState(w, 21, _station_show_coverage);
 
		break;
 

	
 
	case WE_PAINT: {
 
@@ -768,8 +768,8 @@ static void StationBuildWndProc(Window *
 
		case 19:
 
			_railstation.dragdrop ^= true;
 
			ToggleWidgetLoweredState(w, 19);
 
			SetWidgetLoweredState(w, _railstation.numtracks + 4, !_railstation.dragdrop);
 
			SetWidgetLoweredState(w, _railstation.platlength + 11, !_railstation.dragdrop);
 
			SetWindowWidgetLoweredState(w, _railstation.numtracks + 4, !_railstation.dragdrop);
 
			SetWindowWidgetLoweredState(w, _railstation.platlength + 11, !_railstation.dragdrop);
 
			SndPlayFx(SND_15_BEEP);
 
			SetWindowDirty(w);
 
			break;
 
@@ -777,8 +777,8 @@ static void StationBuildWndProc(Window *
 
		case 20:
 
		case 21:
 
			_station_show_coverage = e->we.click.widget - 20;
 
			SetWidgetLoweredState(w, 20, !_station_show_coverage);
 
			SetWidgetLoweredState(w, 21, _station_show_coverage);
 
			SetWindowWidgetLoweredState(w, 20, !_station_show_coverage);
 
			SetWindowWidgetLoweredState(w, 21, _station_show_coverage);
 
			SndPlayFx(SND_15_BEEP);
 
			SetWindowDirty(w);
 
			break;
settings_gui.c
Show inline comments
 
@@ -108,7 +108,7 @@ static void GameOptionsWndProc(Window *w
 
		i = GetCurRes();
 
		SetDParam(7, i == _num_resolutions ? STR_RES_OTHER : SPECSTR_RESOLUTION_START + i);
 
		SetDParam(8, SPECSTR_SCREENSHOT_START + _cur_screenshot_format);
 
		SetWidgetLoweredState(w, 28, _fullscreen);
 
		SetWindowWidgetLoweredState(w, 28, _fullscreen);
 

	
 
		DrawWindowWidgets(w);
 
		DrawString(20, 175, STR_OPTIONS_FULLSCREEN, 0); // fullscreen
 
@@ -152,7 +152,7 @@ static void GameOptionsWndProc(Window *w
 
			ShowDropDownMenu(w, BuildDynamicDropdown(SPECSTR_RESOLUTION_START, _num_resolutions), GetCurRes(), 27, 0, 0);
 
			return;
 
		case 28: /* Click fullscreen on/off */
 
			SetWidgetLoweredState(w, 28, !_fullscreen);
 
			SetWindowWidgetLoweredState(w, 28, !_fullscreen);
 
			ToggleFullScreen(!_fullscreen); // toggle full-screen on/off
 
			SetWindowDirty(w);
 
			return;
smallmap_gui.c
Show inline comments
 
@@ -983,7 +983,7 @@ void ShowSmallMap(void)
 
	if (w == NULL) return;
 

	
 
	LowerWindowWidget(w, _smallmap_type + 5);
 
	SetWidgetLoweredState(w, 12, _smallmap_show_towns);
 
	SetWindowWidgetLoweredState(w, 12, _smallmap_show_towns);
 
	w->resize.width = 350;
 
	w->resize.height = 250;
 

	
station_gui.c
Show inline comments
 
@@ -355,7 +355,7 @@ static void PlayerStationsWndProc(Window
 
				SETBIT(facilities, e->we.click.widget - 6);
 
				LowerWindowWidget(w, e->we.click.widget);
 
			}
 
			SetWidgetLoweredState(w, 26, facilities == (FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK));
 
			SetWindowWidgetLoweredState(w, 26, facilities == (FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK));
 
			sl->flags |= SL_REBUILD;
 
			SetWindowDirty(w);
 
		break;
 
@@ -405,7 +405,7 @@ static void PlayerStationsWndProc(Window
 
					LowerWindowWidget(w, e->we.click.widget);
 
				}
 
				sl->flags |= SL_REBUILD;
 
				SetWidgetLoweredState(w, 27, cargo_filter == 0x1FFF);
 
				SetWindowWidgetLoweredState(w, 27, cargo_filter == 0x1FFF);
 
				SetWindowDirty(w);
 
			}
 
		}
 
@@ -436,8 +436,8 @@ static void PlayerStationsWndProc(Window
 
		for (i = 0; i < NUM_CARGO; i++) {
 
			if (HASBIT(cargo_filter, i)) LowerWindowWidget(w, i + 12);
 
		}
 
		SetWidgetLoweredState(w, 26, facilities == (FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK));
 
		SetWidgetLoweredState(w, 27, cargo_filter == 0x1FFF);
 
		SetWindowWidgetLoweredState(w, 26, facilities == (FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK));
 
		SetWindowWidgetLoweredState(w, 27, cargo_filter == 0x1FFF);
 
		sl->sort_list = NULL;
 
		sl->flags = SL_REBUILD;
 
		sl->sort_type = 0;
window.h
Show inline comments
 
@@ -695,7 +695,7 @@ static inline bool IsWindowWidgetHidden(
 
 * @param widget_index : index of this widget in the window
 
 * @param hidden_stat : status to use ie: lowered = true, raised = false
 
 */
 
static inline void SetWidgetLoweredState(Window *w, byte widget_index, bool lowered_stat)
 
static inline void SetWindowWidgetLoweredState(Window *w, byte widget_index, bool lowered_stat)
 
{
 
	SB(w->click_state, widget_index, 1, !!lowered_stat);
 
}
0 comments (0 inline, 0 general)