File diff r13553:fe51d1a866c1 → r13554:d1964ead02ee
src/misc_gui.cpp
Show inline comments
 
@@ -72,13 +72,13 @@ static const NWidgetPart _nested_land_in
 
};
 

	
 
static const WindowDesc _land_info_desc(
 
	WDP_AUTO, WDP_AUTO, 0, 0, 0, 0,
 
	WC_LAND_INFO, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 
	NULL, _nested_land_info_widgets, lengthof(_nested_land_info_widgets)
 
	_nested_land_info_widgets, lengthof(_nested_land_info_widgets)
 
);
 

	
 
class LandInfoWindow : public Window {
 
	enum {
 
		LAND_INFO_CENTERED_LINES   = 12,                       ///< Up to 12 centered lines
 
		LAND_INFO_MULTICENTER_LINE = LAND_INFO_CENTERED_LINES, ///< One multicenter line
 
@@ -346,13 +346,13 @@ static const NWidgetPart _nested_about_w
 
};
 

	
 
static const WindowDesc _about_desc(
 
	WDP_CENTER, WDP_CENTER, 0, 0, 0, 0,
 
	WC_GAME_OPTIONS, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 
	NULL, _nested_about_widgets, lengthof(_nested_about_widgets)
 
	_nested_about_widgets, lengthof(_nested_about_widgets)
 
);
 

	
 
static const char * const _credits[] = {
 
	"Original design by Chris Sawyer",
 
	"Original graphics by Simon Foster",
 
	"",
 
@@ -506,13 +506,13 @@ static const NWidgetPart _nested_errmsg_
 
};
 

	
 
static const WindowDesc _errmsg_desc(
 
	0, 0, 240, 46, 240, 46, // x/y position is not used.
 
	WC_ERRMSG, WC_NONE,
 
	WDF_STD_BTN | WDF_DEF_WIDGET,
 
	NULL, _nested_errmsg_widgets, lengthof(_nested_errmsg_widgets)
 
	_nested_errmsg_widgets, lengthof(_nested_errmsg_widgets)
 
);
 

	
 
static const NWidgetPart _nested_errmsg_face_widgets[] = {
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_CLOSEBOX, COLOUR_RED, EMW_CLOSE),
 
		NWidget(WWT_CAPTION, COLOUR_RED, EMW_CAPTION), SetDataTip(STR_ERROR_MESSAGE_CAPTION_OTHER_COMPANY, STR_NULL),
 
@@ -526,13 +526,13 @@ static const NWidgetPart _nested_errmsg_
 
};
 

	
 
static const WindowDesc _errmsg_face_desc(
 
	0, 0, 334, 137, 334, 137, // x/y position is not used.
 
	WC_ERRMSG, WC_NONE,
 
	WDF_STD_BTN | WDF_DEF_WIDGET,
 
	NULL, _nested_errmsg_face_widgets, lengthof(_nested_errmsg_face_widgets)
 
	_nested_errmsg_face_widgets, lengthof(_nested_errmsg_face_widgets)
 
);
 

	
 
/** Window class for displaying an error message window. */
 
struct ErrmsgWindow : public Window {
 
private:
 
	uint duration;                  ///< Length of display of the message. 0 means forever,
 
@@ -773,13 +773,13 @@ static const NWidgetPart _nested_tooltip
 
};
 

	
 
static const WindowDesc _tool_tips_desc(
 
	100, 100, 0, 0, 0, 0, // Coordinates and sizes are not used,
 
	WC_TOOLTIPS, WC_NONE,
 
	0,
 
	NULL, _nested_tooltips_widgets, lengthof(_nested_tooltips_widgets)
 
	_nested_tooltips_widgets, lengthof(_nested_tooltips_widgets)
 
);
 

	
 
/** Window for displaying a tooltip. */
 
struct TooltipsWindow : public Window
 
{
 
	StringID string_id;         ///< String to display as tooltip.
 
@@ -1456,13 +1456,13 @@ static const NWidgetPart _nested_query_s
 
};
 

	
 
static const WindowDesc _query_string_desc(
 
	190, 219, 260, 42, 260, 42,
 
	WC_QUERY_STRING, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 
	NULL, _nested_query_string_widgets, lengthof(_nested_query_string_widgets)
 
	_nested_query_string_widgets, lengthof(_nested_query_string_widgets)
 
);
 

	
 
/** Show a query popup window with a textbox in it.
 
 * @param str StringID for the text shown in the textbox
 
 * @param caption StringID of text shown in caption of querywindow
 
 * @param maxsize maximum size in bytes (including terminating '\0')
 
@@ -1611,13 +1611,13 @@ static const NWidgetPart _nested_query_w
 
};
 

	
 
static const WindowDesc _query_desc(
 
	WDP_CENTER, WDP_CENTER, 210, 82, 210, 82,
 
	WC_CONFIRM_POPUP_QUERY, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_DEF_WIDGET | WDF_MODAL,
 
	NULL, _nested_query_widgets, lengthof(_nested_query_widgets)
 
	_nested_query_widgets, lengthof(_nested_query_widgets)
 
);
 

	
 
/** Show a modal confirmation window with standard 'yes' and 'no' buttons
 
 * The window is aligned to the centre of its parent.
 
 * @param caption string shown as window caption
 
 * @param message string that will be shown for the window
 
@@ -2059,20 +2059,20 @@ public:
 
};
 

	
 
static const WindowDesc _load_dialog_desc(
 
	WDP_CENTER, WDP_CENTER, 257, 154, 257, 294,
 
	WC_SAVELOAD, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
 
	NULL, _nested_load_dialog_widgets, lengthof(_nested_load_dialog_widgets)
 
	_nested_load_dialog_widgets, lengthof(_nested_load_dialog_widgets)
 
);
 

	
 
static const WindowDesc _save_dialog_desc(
 
	WDP_CENTER, WDP_CENTER, 257, 180, 257, 320,
 
	WC_SAVELOAD, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
 
	NULL, _nested_save_dialog_widgets, lengthof(_nested_save_dialog_widgets)
 
	_nested_save_dialog_widgets, lengthof(_nested_save_dialog_widgets)
 
);
 

	
 
/** These values are used to convert the file/operations mode into a corresponding file type.
 
 * So each entry, as expressed by the related comment, is based on the enum   */
 
static const FileType _file_modetotype[] = {
 
	FT_SAVEGAME,  ///< used for SLD_LOAD_GAME