Changeset - r9770:55a5aeabf960
[Not reviewed]
master
0 8 0
belugas - 16 years ago 2008-08-01 03:43:53
belugas@openttd.org
(svn r13907) -Codechange: Replace a number with Colours enum on DrawFrameRect usage
8 files changed with 10 insertions and 10 deletions:
0 comments (0 inline, 0 general)
src/aircraft_gui.cpp
Show inline comments
 
@@ -72,7 +72,7 @@ void DrawAircraftImage(const Vehicle *v,
 
		DrawSprite(rotor_sprite, PAL_NONE, x + 25, y + 5);
 
	}
 
	if (v->index == selection) {
 
		DrawFrameRect(x - 1, y - 1, x + 58, y + 21, 0xF, FR_BORDERONLY);
 
		DrawFrameRect(x - 1, y - 1, x + 58, y + 21, COLOUR_WHITE, FR_BORDERONLY);
 
	}
 
}
 

	
src/cheat_gui.cpp
Show inline comments
 
@@ -148,7 +148,7 @@ struct CheatWindow : Window {
 
				case SLE_BOOL: {
 
					bool on = (*(bool*)ce->variable);
 

	
 
					DrawFrameRect(x + 20, y + 1, x + 30 + 9, y + 9, on ? 6 : 4, on ? FR_LOWERED : FR_NONE);
 
					DrawFrameRect(x + 20, y + 1, x + 30 + 9, y + 9, on ? COLOUR_GREEN : COLOUR_RED, on ? FR_LOWERED : FR_NONE);
 
					SetDParam(0, on ? STR_CONFIG_PATCHES_ON : STR_CONFIG_PATCHES_OFF);
 
				} break;
 

	
src/network/network_gui.cpp
Show inline comments
 
@@ -1691,7 +1691,7 @@ struct NetworkJoinStatusWindow : Window 
 
		}
 

	
 
		/* Draw nice progress bar :) */
 
		DrawFrameRect(20, 18, (int)((this->width - 20) * progress / 100), 28, 10, FR_NONE);
 
		DrawFrameRect(20, 18, (int)((this->width - 20) * progress / 100), 28, COLOUR_MAUVE, FR_NONE);
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget)
src/roadveh_gui.cpp
Show inline comments
 
@@ -132,7 +132,7 @@ void DrawRoadVehImage(const Vehicle *v, 
 
	}
 

	
 
	if (highlight_w != 0) {
 
		DrawFrameRect(x - 1, y - 1, x - 1 + highlight_w, y + 12, 15, FR_BORDERONLY);
 
		DrawFrameRect(x - 1, y - 1, x - 1 + highlight_w, y + 12, COLOUR_WHITE, FR_BORDERONLY);
 
	}
 
}
 

	
src/settings_gui.cpp
Show inline comments
 
@@ -1056,19 +1056,19 @@ struct CustomCurrencyWindow : Window {
 
		y += 12;
 

	
 
		/* separator */
 
		DrawFrameRect(10, y + 1, 29, y + 9, 0, GB(this->click, 2, 2) ? FR_LOWERED : FR_NONE);
 
		DrawFrameRect(10, y + 1, 29, y + 9, COLOUR_DARK_BLUE, GB(this->click, 2, 2) ? FR_LOWERED : FR_NONE);
 
		x = DrawString(35, y + 1, STR_CURRENCY_SEPARATOR, TC_FROMSTRING);
 
		DoDrawString(this->separator, x + 4, y + 1, TC_ORANGE);
 
		y += 12;
 

	
 
		/* prefix */
 
		DrawFrameRect(10, y + 1, 29, y + 9, 0, GB(this->click, 4, 2) ? FR_LOWERED : FR_NONE);
 
		DrawFrameRect(10, y + 1, 29, y + 9, COLOUR_DARK_BLUE, GB(this->click, 4, 2) ? FR_LOWERED : FR_NONE);
 
		x = DrawString(35, y + 1, STR_CURRENCY_PREFIX, TC_FROMSTRING);
 
		DoDrawString(_custom_currency.prefix, x + 4, y + 1, TC_ORANGE);
 
		y += 12;
 

	
 
		/* suffix */
 
		DrawFrameRect(10, y + 1, 29, y + 9, 0, GB(this->click, 6, 2) ? FR_LOWERED : FR_NONE);
 
		DrawFrameRect(10, y + 1, 29, y + 9, COLOUR_DARK_BLUE, GB(this->click, 6, 2) ? FR_LOWERED : FR_NONE);
 
		x = DrawString(35, y + 1, STR_CURRENCY_SUFFIX, TC_FROMSTRING);
 
		DoDrawString(_custom_currency.suffix, x + 4, y + 1, TC_ORANGE);
 
		y += 12;
src/ship_gui.cpp
Show inline comments
 
@@ -24,7 +24,7 @@ void DrawShipImage(const Vehicle *v, int
 
	DrawSprite(v->GetImage(DIR_W), GetVehiclePalette(v), x + 32, y + 10);
 

	
 
	if (v->index == selection) {
 
		DrawFrameRect(x - 5, y - 1, x + 67, y + 21, 15, FR_BORDERONLY);
 
		DrawFrameRect(x - 5, y - 1, x + 67, y + 21, COLOUR_WHITE, FR_BORDERONLY);
 
	}
 
}
 

	
src/train_gui.cpp
Show inline comments
 
@@ -109,7 +109,7 @@ void DrawTrainImage(const Vehicle *v, in
 
	if (highlight_l != highlight_r) {
 
		/* Draw the highlight. Now done after drawing all the engines, as
 
		 * the next engine after the highlight could overlap it. */
 
		DrawFrameRect(highlight_l, 0, highlight_r, 13, 15, FR_BORDERONLY);
 
		DrawFrameRect(highlight_l, 0, highlight_r, 13, COLOUR_WHITE, FR_BORDERONLY);
 
	}
 

	
 
	_cur_dpi = old_dpi;
src/widget.cpp
Show inline comments
 
@@ -496,7 +496,7 @@ void Window::DrawWidgets() const
 

	
 

	
 
	if (this->flags4 & WF_WHITE_BORDER_MASK) {
 
		DrawFrameRect(0, 0, this->width - 1, this->height - 1, 0xF, FR_BORDERONLY);
 
		DrawFrameRect(0, 0, this->width - 1, this->height - 1, COLOUR_WHITE, FR_BORDERONLY);
 
	}
 

	
 
}
0 comments (0 inline, 0 general)