Changeset - r13686:20752ae5e661
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-11-22 14:15:50
rubidium@openttd.org
(svn r18221) -Codechange: make the NewGRF window big font aware
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/newgrf_gui.cpp
Show inline comments
 
@@ -635,12 +635,13 @@ struct NewGRFWindow : public Window {
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		switch (widget) {
 
			case SNGRFS_FILE_LIST: {
 
				uint y = r.top + WD_MATRIX_TOP;
 
				int sprite_offset_y = (FONT_HEIGHT_NORMAL - 10) / 2 - 1;
 

	
 
				bool rtl = _dynlang.text_dir == TD_RTL;
 
				uint text_left    = rtl ? r.left + WD_FRAMERECT_LEFT : r.left + 25;
 
				uint text_right   = rtl ? r.right - 25 : r.right - WD_FRAMERECT_RIGHT;
 
				uint square_left  = rtl ? r.right - 15 : r.left + 5;
 
				uint warning_left = rtl ? r.right - 30 : r.left + 20;
 
@@ -671,14 +672,14 @@ struct NewGRFWindow : public Window {
 
								pal = PALETTE_TO_GREY;
 
							} else if (HasBit(c->flags, GCF_COMPATIBLE)) {
 
								pal = PALETTE_TO_ORANGE;
 
							}
 
						}
 

	
 
						DrawSprite(SPR_SQUARE, pal, square_left, y - 1);
 
						if (c->error != NULL) DrawSprite(SPR_WARNING_SIGN, 0, warning_left, y - 1);
 
						DrawSprite(SPR_SQUARE, pal, square_left, y + sprite_offset_y);
 
						if (c->error != NULL) DrawSprite(SPR_WARNING_SIGN, 0, warning_left, y + sprite_offset_y);
 
						uint txtoffset = c->error == NULL ? 0 : 10;
 
						DrawString(text_left + (rtl ? 0 : txtoffset), text_right - (rtl ? txtoffset : 0), y, text, this->sel == c ? TC_WHITE : TC_BLACK);
 
						y += this->resize.step_height;
 
					}
 
				}
 
			} break;
0 comments (0 inline, 0 general)