Changeset - r10358:8e9ac02d839a
[Not reviewed]
master
0 1 0
peter1138 - 16 years ago 2008-11-23 12:35:02
peter1138@openttd.org
(svn r14609) -Codechange: Use supplied button colour instead of hardcoded yellow, for 'greyed out' arrow buttons. (Yorick)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/settings_gui.cpp
Show inline comments
 
@@ -1006,25 +1006,25 @@ void ShowPatchesSelection()
 

	
 
/**
 
 * Draw [<][>] boxes.
 
 * @param x the x position to draw
 
 * @param y the y position to draw
 
 * @param button_colour the colour of the button
 
 * @param state 0 = none clicked, 1 = first clicked, 2 = second clicked
 
 * @param clickable_left is the left button clickable?
 
 * @param clickable_right is the right button clickable?
 
 */
 
void DrawArrowButtons(int x, int y, Colours button_colour, byte state, bool clickable_left, bool clickable_right)
 
{
 
	int colour = _colour_gradient[COLOUR_YELLOW][2];
 
	int colour = _colour_gradient[button_colour][2];
 

	
 
	DrawFrameRect(x,      y + 1, x +  9, y + 9, button_colour, (state == 1) ? FR_LOWERED : FR_NONE);
 
	DrawFrameRect(x + 10, y + 1, x + 19, y + 9, button_colour, (state == 2) ? FR_LOWERED : FR_NONE);
 
	DrawStringCentered(x +  5, y + 1, STR_6819, TC_FROMSTRING); // [<]
 
	DrawStringCentered(x + 15, y + 1, STR_681A, TC_FROMSTRING); // [>]
 

	
 
	/* Grey out the buttons that aren't clickable */
 
	if (!clickable_left) {
 
		GfxFillRect(x +  1, y + 1, x +  1 + 8, y + 8, colour, FILLRECT_CHECKER);
 
	}
 
	if (!clickable_right) {
 
		GfxFillRect(x + 11, y + 1, x + 11 + 8, y + 8, colour, FILLRECT_CHECKER);
0 comments (0 inline, 0 general)