src/genworld_gui.cpp
changeset 9273 35e0224ea8f1
parent 9266 9502b91d38ee
child 9285 235e5e2d7f55
equal deleted inserted replaced
9272:e64b518a7b54 9273:35e0224ea8f1
   313 		SetDParam(0, ConvertYMDToDate(_patches_newgame.starting_year, 0, 1)); // GLAND_START_DATE_TEXT
   313 		SetDParam(0, ConvertYMDToDate(_patches_newgame.starting_year, 0, 1)); // GLAND_START_DATE_TEXT
   314 		SetDParam(1, 1 << _patches_newgame.map_x); // GLAND_MAPSIZE_X_PULLDOWN
   314 		SetDParam(1, 1 << _patches_newgame.map_x); // GLAND_MAPSIZE_X_PULLDOWN
   315 		SetDParam(2, 1 << _patches_newgame.map_y); // GLAND_MAPSIZE_Y_PULLDOWN
   315 		SetDParam(2, 1 << _patches_newgame.map_y); // GLAND_MAPSIZE_Y_PULLDOWN
   316 		SetDParam(3, _patches_newgame.snow_line_height); // GLAND_SNOW_LEVEL_TEXT
   316 		SetDParam(3, _patches_newgame.snow_line_height); // GLAND_SNOW_LEVEL_TEXT
   317 
   317 
   318 		DrawWindowWidgets(this);
   318 		this->DrawWidgets();
   319 
   319 
   320 		this->DrawEditBox(GLAND_RANDOM_EDITBOX);
   320 		this->DrawEditBox(GLAND_RANDOM_EDITBOX);
   321 
   321 
   322 		if (mode != GLWP_GENERATE) {
   322 		if (mode != GLWP_GENERATE) {
   323 			char buffer[512];
   323 			char buffer[512];
   665 		SetDParam(0, ConvertYMDToDate(_patches_newgame.starting_year, 0, 1)); // CSCEN_START_DATE_TEXT
   665 		SetDParam(0, ConvertYMDToDate(_patches_newgame.starting_year, 0, 1)); // CSCEN_START_DATE_TEXT
   666 		SetDParam(1, 1 << _patches_newgame.map_x); // CSCEN_MAPSIZE_X_PULLDOWN
   666 		SetDParam(1, 1 << _patches_newgame.map_x); // CSCEN_MAPSIZE_X_PULLDOWN
   667 		SetDParam(2, 1 << _patches_newgame.map_y); // CSCEN_MAPSIZE_Y_PULLDOWN
   667 		SetDParam(2, 1 << _patches_newgame.map_y); // CSCEN_MAPSIZE_Y_PULLDOWN
   668 		SetDParam(3, _patches_newgame.se_flat_world_height); // CSCEN_FLAT_LAND_HEIGHT_TEXT
   668 		SetDParam(3, _patches_newgame.se_flat_world_height); // CSCEN_FLAT_LAND_HEIGHT_TEXT
   669 
   669 
   670 		DrawWindowWidgets(this);
   670 		this->DrawWidgets();
   671 	}
   671 	}
   672 
   672 
   673 	virtual void OnClick(Point pt, int widget)
   673 	virtual void OnClick(Point pt, int widget)
   674 	{
   674 	{
   675 		switch (widget) {
   675 		switch (widget) {
   871 		}
   871 		}
   872 	}
   872 	}
   873 
   873 
   874 	virtual void OnPaint()
   874 	virtual void OnPaint()
   875 	{
   875 	{
   876 		DrawWindowWidgets(this);
   876 		this->DrawWidgets();
   877 
   877 
   878 		/* Draw the % complete with a bar and a text */
   878 		/* Draw the % complete with a bar and a text */
   879 		DrawFrameRect(19, 20, (this->width - 18), 37, 14, FR_BORDERONLY);
   879 		DrawFrameRect(19, 20, (this->width - 18), 37, 14, FR_BORDERONLY);
   880 		DrawFrameRect(20, 21, (int)((this->width - 40) * _tp.percent / 100) + 20, 36, 10, FR_NONE);
   880 		DrawFrameRect(20, 21, (int)((this->width - 40) * _tp.percent / 100) + 20, 36, 10, FR_NONE);
   881 		SetDParam(0, _tp.percent);
   881 		SetDParam(0, _tp.percent);