|
@@ -48,18 +48,18 @@ static const Widget _land_info_widgets[]
|
|
|
{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
|
|
|
{ WWT_CAPTION, RESIZE_NONE, COLOUR_GREY, 11, 299, 0, 13, STR_01A3_LAND_AREA_INFORMATION, STR_018C_WINDOW_TITLE_DRAG_THIS},
|
|
|
{ WWT_PANEL, RESIZE_BOTTOM, COLOUR_GREY, 0, 299, 14, 99, 0x0, STR_NULL},
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _land_info_desc = {
|
|
|
static const WindowDesc _land_info_desc(
|
|
|
WDP_AUTO, WDP_AUTO, 300, 100, 300, 100,
|
|
|
WC_LAND_INFO, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
|
|
|
_land_info_widgets,
|
|
|
};
|
|
|
_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
|
|
|
LAND_INFO_LINE_END,
|
|
@@ -280,18 +280,18 @@ static const Widget _about_widgets[] = {
|
|
|
{ WWT_CAPTION, RESIZE_NONE, COLOUR_GREY, 11, 419, 0, 13, STR_015B_OPENTTD, STR_NULL},
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_GREY, 0, 419, 14, 271, 0x0, STR_NULL},
|
|
|
{ WWT_FRAME, RESIZE_NONE, COLOUR_GREY, 5, 414, 40, 245, STR_NULL, STR_NULL},
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _about_desc = {
|
|
|
static const WindowDesc _about_desc(
|
|
|
WDP_CENTER, WDP_CENTER, 420, 272, 420, 272,
|
|
|
WC_GAME_OPTIONS, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
|
|
|
_about_widgets,
|
|
|
};
|
|
|
_about_widgets
|
|
|
);
|
|
|
|
|
|
struct AboutWindow : public Window {
|
|
|
int scroll_height;
|
|
|
uint16 counter;
|
|
|
|
|
|
AboutWindow() : Window(&_about_desc)
|
|
@@ -1175,18 +1175,18 @@ static const Widget _query_string_widget
|
|
|
{ WWT_TEXTBTN, RESIZE_NONE, COLOUR_GREY, 0, 86, 30, 41, STR_DEFAULT, STR_NULL}, // QUERY_STR_WIDGET_DEFAULT
|
|
|
{ WWT_TEXTBTN, RESIZE_NONE, COLOUR_GREY, 87, 172, 30, 41, STR_012E_CANCEL, STR_NULL}, // QUERY_STR_WIDGET_CANCEL
|
|
|
{ WWT_TEXTBTN, RESIZE_NONE, COLOUR_GREY, 173, 259, 30, 41, STR_012F_OK, STR_NULL}, // QUERY_STR_WIDGET_OK
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _query_string_desc = {
|
|
|
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,
|
|
|
_query_string_widgets,
|
|
|
};
|
|
|
_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')
|
|
|
* @param maxwidth maximum width in pixels allowed
|
|
@@ -1315,18 +1315,18 @@ static const Widget _query_widgets[] = {
|
|
|
{ WWT_PANEL, RESIZE_NONE, COLOUR_RED, 0, 209, 14, 81, 0x0, /*OVERRIDE*/STR_NULL},
|
|
|
{WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_YELLOW, 20, 90, 62, 73, STR_00C9_NO, STR_NULL},
|
|
|
{WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_YELLOW, 120, 190, 62, 73, STR_00C8_YES, STR_NULL},
|
|
|
{ WIDGETS_END },
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _query_desc = {
|
|
|
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,
|
|
|
_query_widgets,
|
|
|
};
|
|
|
_query_widgets
|
|
|
);
|
|
|
|
|
|
/** Show a modal confirmation window with standard 'yes' and 'no' buttons
|
|
|
* The window is aligned to the centre of its parent.
|
|
|
* NOTE: You cannot use BindCString as parameter for this window!
|
|
|
* @param caption string shown as window caption
|
|
|
* @param message string that will be shown for the window
|
|
@@ -1730,25 +1730,25 @@ public:
|
|
|
virtual void OnInvalidateData(int data)
|
|
|
{
|
|
|
BuildFileList();
|
|
|
}
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _load_dialog_desc = {
|
|
|
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,
|
|
|
_load_dialog_widgets,
|
|
|
};
|
|
|
_load_dialog_widgets
|
|
|
);
|
|
|
|
|
|
static const WindowDesc _save_dialog_desc = {
|
|
|
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,
|
|
|
_save_dialog_widgets,
|
|
|
};
|
|
|
_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
|
|
|
FT_SCENARIO, ///< used for SLD_LOAD_SCENARIO
|