File diff r5115:7edde0aba70e → r5116:6ab72109f482
main_gui.c
Show inline comments
 
@@ -25,49 +25,49 @@
 
#include "sound.h"
 
#include "network.h"
 
#include "signs.h"
 
#include "waypoint.h"
 
#include "variables.h"
 
#include "train.h"
 
#include "unmovable_map.h"
 
#include "string.h"
 
#include "screenshot.h"
 
#include "genworld.h"
 
#include "settings.h"
 
#include "date.h"
 
#include "vehicle_gui.h"
 

	
 
#include "network_data.h"
 
#include "network_client.h"
 
#include "network_server.h"
 
#include "network_gui.h"
 
#include "industry.h"
 

	
 
static int _rename_id;
 
static int _rename_what;
 

	
 
static byte _terraform_size = 1;
 
static RailType _last_built_railtype;
 
RailType _last_built_railtype;
 
static int _scengen_town_size = 2; // depress medium-sized towns per default
 

	
 
extern void GenerateIndustries(void);
 
extern bool GenerateTowns(void);
 

	
 

	
 
void HandleOnEditText(WindowEvent *e)
 
{
 
	const char *b = e->we.edittext.str;
 
	int id;
 

	
 
	_cmd_text = b;
 

	
 
	id = _rename_id;
 

	
 
	switch (_rename_what) {
 
	case 0: /* Rename a s sign, if string is empty, delete sign */
 
		DoCommandP(0, id, 0, NULL, CMD_RENAME_SIGN | CMD_MSG(STR_280C_CAN_T_CHANGE_SIGN_NAME));
 
		break;
 
	case 1: /* Rename a waypoint */
 
		if (*b == '\0') return;
 
		DoCommandP(0, id, 0, NULL, CMD_RENAME_WAYPOINT | CMD_MSG(STR_CANT_CHANGE_WAYPOINT_NAME));
 
		break;
 
#ifdef ENABLE_NETWORK
 
@@ -2427,24 +2427,25 @@ void ShowVitalWindows(void)
 
	/* Status bad only for normal games */
 
	if (_game_mode == GM_EDITOR) return;
 

	
 
	_main_status_desc.top = _screen.height - 12;
 
	w = AllocateWindowDesc(&_main_status_desc);
 
	CLRBITS(w->flags4, WF_WHITE_BORDER_MASK);
 

	
 
	WP(w,def_d).data_1 = -1280;
 
}
 

	
 
void GameSizeChanged(void)
 
{
 
	_cur_resolution[0] = _screen.width;
 
	_cur_resolution[1] = _screen.height;
 
	RelocateAllWindows(_screen.width, _screen.height);
 
	ScreenSizeChanged();
 
	MarkWholeScreenDirty();
 
}
 

	
 
void InitializeMainGui(void)
 
{
 
	/* Clean old GUI values */
 
	_last_built_railtype = 0;
 
}