mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-02 09:40:35 +00:00
(svn r16259) -Codechange: Added nested widgets to the load and save dialogue windows.
This commit is contained in:
parent
904e5dc1d3
commit
20dab97717
@ -1513,6 +1513,48 @@ static const Widget _load_dialog_widgets[] = {
|
||||
{ WIDGETS_END},
|
||||
};
|
||||
|
||||
static const NWidgetPart _nested_load_dialog_widgets[] = {
|
||||
NWidget(NWID_LAYERED),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY, SLWW_CLOSE),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, SLWW_WINDOWTITLE),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_SORT_BYNAME), SetMinimalSize(128, 12), SetDataTip(STR_SORT_BY_NAME, STR_SORT_ORDER_TIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_SORT_BYDATE), SetMinimalSize(129, 12), SetDataTip(STR_SORT_BY_DATE, STR_SORT_ORDER_TIP), SetResize(1, 0),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, SLWW_BACKGROUND), SetMinimalSize(257, 22), SetResize(1, 0), EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, SLWW_FILE_BACKGROUND),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(WWT_INSET, COLOUR_GREY, SLWW_DRIVES_DIRECTORIES_LIST), SetMinimalSize(242, 90), SetPadding(2, 1, 2, 2),
|
||||
SetDataTip(0x0, STR_SAVELOAD_LIST_TOOLTIP), SetResize(2, 10), EndContainer(),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_CONTENT_DOWNLOAD), SetMinimalSize(245, 12), SetResize(1, 0),
|
||||
SetDataTip(STR_CONTENT_INTRO_BUTTON, STR_CONTENT_INTRO_BUTTON_TIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, SLWW_HOME_BUTTON), SetMinimalSize(12, 12), SetDataTip(SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON),
|
||||
NWidget(WWT_SCROLLBAR, COLOUR_GREY, SLWW_SCROLLBAR),
|
||||
NWidget(WWT_RESIZEBOX, COLOUR_GREY, SLWW_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(NWID_LAYERED),
|
||||
NWidget(WWT_EMPTY, COLOUR_GREY, SLWW_SAVE_OSK_TITLE), SetMinimalSize(1, 1), SetFill(false, false),
|
||||
NWidget(WWT_EMPTY, COLOUR_GREY, SLWW_DELETE_SELECTION), SetMinimalSize(1, 1), SetFill(false, false),
|
||||
NWidget(WWT_EMPTY, COLOUR_GREY, SLWW_SAVE_GAME), SetMinimalSize(1, 1), SetFill(false, false),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetFill(true, false), SetResize(1, 0),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetFill(true, true), SetResize(1, 1),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
static const Widget _save_dialog_widgets[] = {
|
||||
{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_BLACK_CROSS, STR_TOOLTIP_CLOSE_WINDOW}, // SLWW_CLOSE
|
||||
{ WWT_CAPTION, RESIZE_RIGHT, COLOUR_GREY, 11, 256, 0, 13, STR_NULL, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS}, // SLWW_WINDOWTITLE
|
||||
@ -1531,6 +1573,48 @@ static const Widget _save_dialog_widgets[] = {
|
||||
{ WIDGETS_END},
|
||||
};
|
||||
|
||||
static const NWidgetPart _nested_save_dialog_widgets[] = {
|
||||
NWidget(NWID_LAYERED),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY, SLWW_CLOSE),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, SLWW_WINDOWTITLE),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_SORT_BYNAME), SetMinimalSize(128, 12), SetDataTip(STR_SORT_BY_NAME, STR_SORT_ORDER_TIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_SORT_BYDATE), SetMinimalSize(129, 12), SetDataTip(STR_SORT_BY_DATE, STR_SORT_ORDER_TIP), SetResize(1, 0),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, SLWW_BACKGROUND), SetMinimalSize(257, 22), SetResize(1, 0), EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, SLWW_FILE_BACKGROUND),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_INSET, COLOUR_GREY, SLWW_DRIVES_DIRECTORIES_LIST), SetMinimalSize(242, 101), SetPadding(2, 1, 0, 2),
|
||||
SetDataTip(0x0, STR_SAVELOAD_LIST_TOOLTIP), SetResize(2, 10), EndContainer(),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, SLWW_HOME_BUTTON), SetMinimalSize(12, 12), SetDataTip(SPR_HOUSE_ICON, STR_SAVELOAD_HOME_BUTTON),
|
||||
NWidget(WWT_SCROLLBAR, COLOUR_GREY, SLWW_SCROLLBAR),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(WWT_EDITBOX, COLOUR_GREY, SLWW_SAVE_OSK_TITLE), SetMinimalSize(253, 12), SetPadding(3, 2, 2, 2), SetResize(1, 0),
|
||||
SetDataTip(STR_SAVE_OSKTITLE, STR_SAVELOAD_EDITBOX_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_DELETE_SELECTION), SetMinimalSize(128, 12),
|
||||
SetDataTip(STR_SAVELOAD_DELETE_BUTTON, STR_SAVELOAD_DELETE_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, SLWW_SAVE_GAME), SetMinimalSize(117, 12), SetResize(1, 0),
|
||||
SetDataTip(STR_SAVELOAD_SAVE_BUTTON, STR_SAVELOAD_SAVE_TOOLTIP),
|
||||
NWidget(WWT_RESIZEBOX, COLOUR_GREY, SLWW_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, COLOUR_GREY, SLWW_CONTENT_DOWNLOAD), SetMinimalSize(1, 1), SetFill(false, false),
|
||||
NWidget(NWID_SPACER), SetFill(true, false), SetResize(1, 0),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetFill(true, true), SetResize(1, 1),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
/* Colours for fios types */
|
||||
const TextColour _fios_colours[] = {
|
||||
TC_LIGHT_BLUE, TC_DARK_GREEN, TC_DARK_GREEN, TC_ORANGE, TC_LIGHT_BROWN,
|
||||
@ -1882,14 +1966,14 @@ 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, _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,
|
||||
_save_dialog_widgets
|
||||
_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.
|
||||
|
Loading…
Reference in New Issue
Block a user