|
|
@ -27,6 +27,7 @@
|
|
|
|
#include "gui.h"
|
|
|
|
#include "gui.h"
|
|
|
|
#include "group_cmd.h"
|
|
|
|
#include "group_cmd.h"
|
|
|
|
#include "vehicle_cmd.h"
|
|
|
|
#include "vehicle_cmd.h"
|
|
|
|
|
|
|
|
#include "gfx_func.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "widgets/group_widget.h"
|
|
|
|
#include "widgets/group_widget.h"
|
|
|
|
|
|
|
|
|
|
|
@ -72,15 +73,21 @@ static const NWidgetPart _nested_group_widgets[] = {
|
|
|
|
/* right part */
|
|
|
|
/* right part */
|
|
|
|
NWidget(NWID_VERTICAL),
|
|
|
|
NWidget(NWID_VERTICAL),
|
|
|
|
NWidget(NWID_HORIZONTAL),
|
|
|
|
NWidget(NWID_HORIZONTAL),
|
|
|
|
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_GL_GROUP_BY_ORDER), SetMinimalSize(81, 12), SetDataTip(STR_STATION_VIEW_GROUP, STR_TOOLTIP_GROUP_ORDER),
|
|
|
|
NWidget(NWID_VERTICAL),
|
|
|
|
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_GROUP_BY_DROPDOWN), SetMinimalSize(167, 12), SetDataTip(0x0, STR_TOOLTIP_GROUP_ORDER),
|
|
|
|
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_GL_GROUP_BY_ORDER), SetFill(1, 0), SetMinimalSize(0, 12), SetDataTip(STR_STATION_VIEW_GROUP, STR_TOOLTIP_GROUP_ORDER),
|
|
|
|
NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(12, 12), SetResize(1, 0), EndContainer(),
|
|
|
|
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_GL_SORT_BY_ORDER), SetFill(1, 0), SetMinimalSize(0, 12), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
|
|
|
|
EndContainer(),
|
|
|
|
EndContainer(),
|
|
|
|
NWidget(NWID_HORIZONTAL),
|
|
|
|
NWidget(NWID_VERTICAL),
|
|
|
|
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_GL_SORT_BY_ORDER), SetMinimalSize(81, 12), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
|
|
|
|
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_GROUP_BY_DROPDOWN), SetFill(1, 0), SetMinimalSize(0, 12), SetDataTip(0x0, STR_TOOLTIP_GROUP_ORDER),
|
|
|
|
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_SORT_BY_DROPDOWN), SetMinimalSize(167, 12), SetDataTip(0x0, STR_TOOLTIP_SORT_CRITERIA),
|
|
|
|
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_SORT_BY_DROPDOWN), SetFill(1, 0), SetMinimalSize(0, 12), SetDataTip(0x0, STR_TOOLTIP_SORT_CRITERIA),
|
|
|
|
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_FILTER_BY_CARGO), SetMinimalSize(167, 12), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_FILTER_CRITERIA),
|
|
|
|
EndContainer(),
|
|
|
|
NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(12, 12), SetResize(1, 0), EndContainer(),
|
|
|
|
NWidget(NWID_VERTICAL),
|
|
|
|
|
|
|
|
NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(0, 12), SetResize(1, 0), EndContainer(),
|
|
|
|
|
|
|
|
NWidget(NWID_HORIZONTAL),
|
|
|
|
|
|
|
|
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_FILTER_BY_CARGO), SetMinimalSize(0, 12), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_FILTER_CRITERIA),
|
|
|
|
|
|
|
|
NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(0, 12), SetResize(1, 0), EndContainer(),
|
|
|
|
|
|
|
|
EndContainer(),
|
|
|
|
|
|
|
|
EndContainer(),
|
|
|
|
EndContainer(),
|
|
|
|
EndContainer(),
|
|
|
|
NWidget(NWID_HORIZONTAL),
|
|
|
|
NWidget(NWID_HORIZONTAL),
|
|
|
|
NWidget(WWT_MATRIX, COLOUR_GREY, WID_GL_LIST_VEHICLE), SetMinimalSize(248, 0), SetMatrixDataTip(1, 0, STR_NULL), SetResize(1, 1), SetFill(1, 0), SetScrollbar(WID_GL_LIST_VEHICLE_SCROLLBAR),
|
|
|
|
NWidget(WWT_MATRIX, COLOUR_GREY, WID_GL_LIST_VEHICLE), SetMinimalSize(248, 0), SetMatrixDataTip(1, 0, STR_NULL), SetResize(1, 1), SetFill(1, 0), SetScrollbar(WID_GL_LIST_VEHICLE_SCROLLBAR),
|
|
|
@ -406,6 +413,20 @@ public:
|
|
|
|
size->height = 4 * resize->height;
|
|
|
|
size->height = 4 * resize->height;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WID_GL_GROUP_BY_DROPDOWN:
|
|
|
|
|
|
|
|
size->width = GetStringListWidth(this->vehicle_group_by_names) + padding.width;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WID_GL_SORT_BY_DROPDOWN:
|
|
|
|
|
|
|
|
size->width = GetStringListWidth(this->vehicle_group_none_sorter_names);
|
|
|
|
|
|
|
|
size->width = std::max(size->width, GetStringListWidth(this->vehicle_group_shared_orders_sorter_names));
|
|
|
|
|
|
|
|
size->width += padding.width;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WID_GL_FILTER_BY_CARGO:
|
|
|
|
|
|
|
|
size->width = GetStringListWidth(this->cargo_filter_texts) + padding.width;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case WID_GL_MANAGE_VEHICLES_DROPDOWN: {
|
|
|
|
case WID_GL_MANAGE_VEHICLES_DROPDOWN: {
|
|
|
|
Dimension d = this->GetActionDropdownSize(true, true);
|
|
|
|
Dimension d = this->GetActionDropdownSize(true, true);
|
|
|
|
d.height += padding.height;
|
|
|
|
d.height += padding.height;
|
|
|
|