Changeset - r15424:b7d300036f10
[Not reviewed]
master
0 1 0
yexo - 14 years ago 2010-07-04 12:49:51
yexo@openttd.org
(svn r20077) -Codechange: remove the space between "open" and "ttd" in the title screen
1 file changed with 11 insertions and 8 deletions:
0 comments (0 inline, 0 general)
src/main_gui.cpp
Show inline comments
 
@@ -245,16 +245,19 @@ struct MainWindow : Window
 
	{
 
		this->DrawWidgets();
 
		if (_game_mode == GM_MENU) {
 
			int off_x = this->width / 2;
 
			static const SpriteID title_sprites[] = {SPR_OTTD_O, SPR_OTTD_P, SPR_OTTD_E, SPR_OTTD_N, SPR_OTTD_T, SPR_OTTD_T, SPR_OTTD_D};
 
			static const uint LETTER_SPACING = 10;
 
			uint name_width = (lengthof(title_sprites) - 1) * LETTER_SPACING;
 

	
 
			DrawSprite(SPR_OTTD_O, PAL_NONE, off_x - 120, 50);
 
			DrawSprite(SPR_OTTD_P, PAL_NONE, off_x -  86, 50);
 
			DrawSprite(SPR_OTTD_E, PAL_NONE, off_x -  53, 50);
 
			DrawSprite(SPR_OTTD_N, PAL_NONE, off_x -  22, 50);
 
			for (uint i = 0; i < lengthof(title_sprites); i++) {
 
				name_width += GetSpriteSize(title_sprites[i]).width;
 
			}
 
			int off_x = (this->width - name_width) / 2;
 

	
 
			DrawSprite(SPR_OTTD_T, PAL_NONE, off_x +  34, 50);
 
			DrawSprite(SPR_OTTD_T, PAL_NONE, off_x +  65, 50);
 
			DrawSprite(SPR_OTTD_D, PAL_NONE, off_x +  96, 50);
 
			for (uint i = 0; i < lengthof(title_sprites); i++) {
 
				DrawSprite(title_sprites[i], PAL_NONE, off_x, 50);
 
				off_x += GetSpriteSize(title_sprites[i]).width + LETTER_SPACING;
 
			}
 
		}
 
	}
 

	
0 comments (0 inline, 0 general)