Update to 1.10.0-beta1
This commit is contained in:
@@ -34,9 +34,11 @@ enum ReplaceVehicleWidgets {
|
||||
WID_RV_INFO_TAB, ///< Info tab.
|
||||
WID_RV_STOP_REPLACE, ///< Stop Replacing button.
|
||||
|
||||
/* Train/road only widgets */
|
||||
WID_RV_RAIL_ROAD_TYPE_DROPDOWN, ///< Dropdown menu about the rail/roadtype.
|
||||
|
||||
/* Train only widgets. */
|
||||
WID_RV_TRAIN_ENGINEWAGON_DROPDOWN, ///< Dropdown to select engines and/or wagons.
|
||||
WID_RV_TRAIN_RAILTYPE_DROPDOWN, ///< Dropdown menu about the railtype.
|
||||
WID_RV_TRAIN_WAGONREMOVE_TOGGLE, ///< Button to toggle removing wagons.
|
||||
};
|
||||
|
||||
|
||||
@@ -177,6 +177,8 @@ enum CompanyInfrastructureWidgets {
|
||||
WID_CI_RAIL_COUNT, ///< Count of rail.
|
||||
WID_CI_ROAD_DESC, ///< Description of road.
|
||||
WID_CI_ROAD_COUNT, ///< Count of road.
|
||||
WID_CI_TRAM_DESC, ///< Description of tram.
|
||||
WID_CI_TRAM_COUNT, ///< Count of tram.
|
||||
WID_CI_WATER_DESC, ///< Description of water.
|
||||
WID_CI_WATER_COUNT, ///< Count of water.
|
||||
WID_CI_STATION_DESC, ///< Description of station.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "../safeguards.h"
|
||||
|
||||
|
||||
void DropDownListItem::Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
|
||||
void DropDownListItem::Draw(int left, int right, int top, int bottom, bool sel, Colours bg_colour) const
|
||||
{
|
||||
int c1 = _colour_gradient[bg_colour][3];
|
||||
int c2 = _colour_gradient[bg_colour][7];
|
||||
@@ -39,7 +39,7 @@ uint DropDownListStringItem::Width() const
|
||||
return GetStringBoundingBox(buffer).width;
|
||||
}
|
||||
|
||||
void DropDownListStringItem::Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
|
||||
void DropDownListStringItem::Draw(int left, int right, int top, int bottom, bool sel, Colours bg_colour) const
|
||||
{
|
||||
DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, this->String(), sel ? TC_WHITE : TC_BLACK);
|
||||
}
|
||||
@@ -51,12 +51,12 @@ void DropDownListStringItem::Draw(int left, int right, int top, int bottom, bool
|
||||
* @return true if \a first precedes \a second.
|
||||
* @warning All items in the list need to be derivates of DropDownListStringItem.
|
||||
*/
|
||||
/* static */ int DropDownListStringItem::NatSortFunc(const DropDownListItem * const *first, const DropDownListItem * const * second)
|
||||
/* static */ bool DropDownListStringItem::NatSortFunc(std::unique_ptr<const DropDownListItem> const &first, std::unique_ptr<const DropDownListItem> const &second)
|
||||
{
|
||||
char buffer1[512], buffer2[512];
|
||||
GetString(buffer1, static_cast<const DropDownListStringItem*>(*first)->String(), lastof(buffer1));
|
||||
GetString(buffer2, static_cast<const DropDownListStringItem*>(*second)->String(), lastof(buffer2));
|
||||
return strnatcmp(buffer1, buffer2);
|
||||
GetString(buffer1, static_cast<const DropDownListStringItem*>(first.get())->String(), lastof(buffer1));
|
||||
GetString(buffer2, static_cast<const DropDownListStringItem*>(second.get())->String(), lastof(buffer2));
|
||||
return strnatcmp(buffer1, buffer2) < 0;
|
||||
}
|
||||
|
||||
StringID DropDownListParamStringItem::String() const
|
||||
@@ -71,6 +71,40 @@ StringID DropDownListCharStringItem::String() const
|
||||
return this->string;
|
||||
}
|
||||
|
||||
DropDownListIconItem::DropDownListIconItem(SpriteID sprite, PaletteID pal, StringID string, int result, bool masked) : DropDownListParamStringItem(string, result, masked), sprite(sprite), pal(pal)
|
||||
{
|
||||
this->dim = GetSpriteSize(sprite);
|
||||
if (this->dim.height < (uint)FONT_HEIGHT_NORMAL) {
|
||||
this->sprite_y = (FONT_HEIGHT_NORMAL - dim.height) / 2;
|
||||
this->text_y = 0;
|
||||
} else {
|
||||
this->sprite_y = 0;
|
||||
this->text_y = (dim.height - FONT_HEIGHT_NORMAL) / 2;
|
||||
}
|
||||
}
|
||||
|
||||
uint DropDownListIconItem::Height(uint width) const
|
||||
{
|
||||
return max(this->dim.height, (uint)FONT_HEIGHT_NORMAL);
|
||||
}
|
||||
|
||||
uint DropDownListIconItem::Width() const
|
||||
{
|
||||
return DropDownListStringItem::Width() + this->dim.width + WD_FRAMERECT_LEFT;
|
||||
}
|
||||
|
||||
void DropDownListIconItem::Draw(int left, int right, int top, int bottom, bool sel, Colours bg_colour) const
|
||||
{
|
||||
bool rtl = _current_text_dir == TD_RTL;
|
||||
DrawSprite(this->sprite, this->pal, rtl ? right - this->dim.width - WD_FRAMERECT_RIGHT : left + WD_FRAMERECT_LEFT, top + this->sprite_y);
|
||||
DrawString(left + WD_FRAMERECT_LEFT + (rtl ? 0 : (this->dim.width + WD_FRAMERECT_LEFT)), right - WD_FRAMERECT_RIGHT - (rtl ? (this->dim.width + WD_FRAMERECT_RIGHT) : 0), top + this->text_y, this->String(), sel ? TC_WHITE : TC_BLACK);
|
||||
}
|
||||
|
||||
void DropDownListIconItem::SetDimension(Dimension d)
|
||||
{
|
||||
this->dim = d;
|
||||
}
|
||||
|
||||
static const NWidgetPart _nested_dropdown_menu_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PANEL, COLOUR_END, WID_DM_ITEMS), SetMinimalSize(1, 1), SetScrollbar(WID_DM_SCROLL), EndContainer(),
|
||||
@@ -81,7 +115,7 @@ static const NWidgetPart _nested_dropdown_menu_widgets[] = {
|
||||
};
|
||||
|
||||
static WindowDesc _dropdown_desc(
|
||||
WDP_MANUAL, NULL, 0, 0,
|
||||
WDP_MANUAL, nullptr, 0, 0,
|
||||
WC_DROPDOWN_MENU, WC_NONE,
|
||||
WDF_NO_FOCUS,
|
||||
_nested_dropdown_menu_widgets, lengthof(_nested_dropdown_menu_widgets)
|
||||
@@ -92,7 +126,7 @@ struct DropdownWindow : Window {
|
||||
WindowClass parent_wnd_class; ///< Parent window class.
|
||||
WindowNumber parent_wnd_num; ///< Parent window number.
|
||||
int parent_button; ///< Parent widget number where the window is dropped from.
|
||||
const DropDownList *list; ///< List with dropdown menu items.
|
||||
const DropDownList list; ///< List with dropdown menu items.
|
||||
int selected_index; ///< Index of the selected item in the list.
|
||||
byte click_delay; ///< Timer to delay selection.
|
||||
bool drag_mode;
|
||||
@@ -114,10 +148,10 @@ struct DropdownWindow : Window {
|
||||
* @param wi_colour Colour of the parent widget.
|
||||
* @param scroll Dropdown menu has a scrollbar.
|
||||
*/
|
||||
DropdownWindow(Window *parent, const DropDownList *list, int selected, int button, bool instant_close, const Point &position, const Dimension &size, Colours wi_colour, bool scroll)
|
||||
: Window(&_dropdown_desc)
|
||||
DropdownWindow(Window *parent, DropDownList &&list, int selected, int button, bool instant_close, const Point &position, const Dimension &size, Colours wi_colour, bool scroll)
|
||||
: Window(&_dropdown_desc), list(std::move(list))
|
||||
{
|
||||
assert(list->Length() > 0);
|
||||
assert(this->list.size() > 0);
|
||||
|
||||
this->position = position;
|
||||
|
||||
@@ -140,19 +174,17 @@ struct DropdownWindow : Window {
|
||||
|
||||
/* Total length of list */
|
||||
int list_height = 0;
|
||||
for (const DropDownListItem * const *it = list->Begin(); it != list->End(); ++it) {
|
||||
const DropDownListItem *item = *it;
|
||||
for (const auto &item : this->list) {
|
||||
list_height += item->Height(items_width);
|
||||
}
|
||||
|
||||
/* Capacity is the average number of items visible */
|
||||
this->vscroll->SetCapacity(size.height * (uint16)list->Length() / list_height);
|
||||
this->vscroll->SetCount((uint16)list->Length());
|
||||
this->vscroll->SetCapacity(size.height * (uint16)this->list.size() / list_height);
|
||||
this->vscroll->SetCount((uint16)this->list.size());
|
||||
|
||||
this->parent_wnd_class = parent->window_class;
|
||||
this->parent_wnd_num = parent->window_number;
|
||||
this->parent_button = button;
|
||||
this->list = list;
|
||||
this->selected_index = selected;
|
||||
this->click_delay = 0;
|
||||
this->drag_mode = true;
|
||||
@@ -168,13 +200,12 @@ struct DropdownWindow : Window {
|
||||
this->SetDirty();
|
||||
|
||||
Window *w2 = FindWindowById(this->parent_wnd_class, this->parent_wnd_num);
|
||||
if (w2 != NULL) {
|
||||
if (w2 != nullptr) {
|
||||
Point pt = _cursor.pos;
|
||||
pt.x -= w2->left;
|
||||
pt.y -= w2->top;
|
||||
w2->OnDropdownClose(pt, this->parent_button, this->selected_index, this->instant_close);
|
||||
}
|
||||
delete this->list;
|
||||
}
|
||||
|
||||
virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)
|
||||
@@ -196,13 +227,10 @@ struct DropdownWindow : Window {
|
||||
int width = nwi->current_x - 4;
|
||||
int pos = this->vscroll->GetPosition();
|
||||
|
||||
const DropDownList *list = this->list;
|
||||
|
||||
for (const DropDownListItem * const *it = list->Begin(); it != list->End(); ++it) {
|
||||
for (const auto &item : this->list) {
|
||||
/* Skip items that are scrolled up */
|
||||
if (--pos >= 0) continue;
|
||||
|
||||
const DropDownListItem *item = *it;
|
||||
int item_height = item->Height(width);
|
||||
|
||||
if (y < item_height) {
|
||||
@@ -225,8 +253,7 @@ struct DropdownWindow : Window {
|
||||
|
||||
int y = r.top + 2;
|
||||
int pos = this->vscroll->GetPosition();
|
||||
for (const DropDownListItem * const *it = this->list->Begin(); it != this->list->End(); ++it) {
|
||||
const DropDownListItem *item = *it;
|
||||
for (const auto &item : this->list) {
|
||||
int item_height = item->Height(r.right - r.left + 1);
|
||||
|
||||
/* Skip items that are scrolled up */
|
||||
@@ -277,7 +304,7 @@ struct DropdownWindow : Window {
|
||||
virtual void OnMouseLoop()
|
||||
{
|
||||
Window *w2 = FindWindowById(this->parent_wnd_class, this->parent_wnd_num);
|
||||
if (w2 == NULL) {
|
||||
if (w2 == nullptr) {
|
||||
delete this;
|
||||
return;
|
||||
}
|
||||
@@ -328,8 +355,7 @@ struct DropdownWindow : Window {
|
||||
/**
|
||||
* Show a drop down list.
|
||||
* @param w Parent window for the list.
|
||||
* @param list Prepopulated DropDownList. Will be deleted when the list is
|
||||
* closed.
|
||||
* @param list Prepopulated DropDownList.
|
||||
* @param selected The initially selected list item.
|
||||
* @param button The widget which is passed to Window::OnDropdownSelect and OnDropdownClose.
|
||||
* Unless you override those functions, this should be then widget index of the dropdown button.
|
||||
@@ -339,7 +365,7 @@ struct DropdownWindow : Window {
|
||||
* @param instant_close Set to true if releasing mouse button should close the
|
||||
* list regardless of where the cursor is.
|
||||
*/
|
||||
void ShowDropDownListAt(Window *w, const DropDownList *list, int selected, int button, Rect wi_rect, Colours wi_colour, bool auto_width, bool instant_close)
|
||||
void ShowDropDownListAt(Window *w, DropDownList &&list, int selected, int button, Rect wi_rect, Colours wi_colour, bool auto_width, bool instant_close)
|
||||
{
|
||||
DeleteWindowById(WC_DROPDOWN_MENU, 0);
|
||||
|
||||
@@ -355,8 +381,7 @@ void ShowDropDownListAt(Window *w, const DropDownList *list, int selected, int b
|
||||
/* Total height of list */
|
||||
uint height = 0;
|
||||
|
||||
for (const DropDownListItem * const *it = list->Begin(); it != list->End(); ++it) {
|
||||
const DropDownListItem *item = *it;
|
||||
for (const auto &item : list) {
|
||||
height += item->Height(width);
|
||||
if (auto_width) max_item_width = max(max_item_width, item->Width() + 5);
|
||||
}
|
||||
@@ -384,7 +409,7 @@ void ShowDropDownListAt(Window *w, const DropDownList *list, int selected, int b
|
||||
/* If the dropdown doesn't fully fit, we need a dropdown. */
|
||||
if (height > available_height) {
|
||||
scroll = true;
|
||||
uint avg_height = height / list->Length();
|
||||
uint avg_height = height / (uint)list.size();
|
||||
|
||||
/* Check at least there is space for one item. */
|
||||
assert(available_height >= avg_height);
|
||||
@@ -407,7 +432,7 @@ void ShowDropDownListAt(Window *w, const DropDownList *list, int selected, int b
|
||||
|
||||
Point dw_pos = { w->left + (_current_text_dir == TD_RTL ? wi_rect.right + 1 - (int)width : wi_rect.left), top};
|
||||
Dimension dw_size = {width, height};
|
||||
DropdownWindow *dropdown = new DropdownWindow(w, list, selected, button, instant_close, dw_pos, dw_size, wi_colour, scroll);
|
||||
DropdownWindow *dropdown = new DropdownWindow(w, std::move(list), selected, button, instant_close, dw_pos, dw_size, wi_colour, scroll);
|
||||
|
||||
/* The dropdown starts scrolling downwards when opening it towards
|
||||
* the top and holding down the mouse button. It can be fooled by
|
||||
@@ -418,8 +443,7 @@ void ShowDropDownListAt(Window *w, const DropDownList *list, int selected, int b
|
||||
/**
|
||||
* Show a drop down list.
|
||||
* @param w Parent window for the list.
|
||||
* @param list Prepopulated DropDownList. Will be deleted when the list is
|
||||
* closed.
|
||||
* @param list Prepopulated DropDownList.
|
||||
* @param selected The initially selected list item.
|
||||
* @param button The widget within the parent window that is used to determine
|
||||
* the list's location.
|
||||
@@ -428,7 +452,7 @@ void ShowDropDownListAt(Window *w, const DropDownList *list, int selected, int b
|
||||
* @param instant_close Set to true if releasing mouse button should close the
|
||||
* list regardless of where the cursor is.
|
||||
*/
|
||||
void ShowDropDownList(Window *w, const DropDownList *list, int selected, int button, uint width, bool auto_width, bool instant_close)
|
||||
void ShowDropDownList(Window *w, DropDownList &&list, int selected, int button, uint width, bool auto_width, bool instant_close)
|
||||
{
|
||||
/* Our parent's button widget is used to determine where to place the drop
|
||||
* down list window. */
|
||||
@@ -455,7 +479,7 @@ void ShowDropDownList(Window *w, const DropDownList *list, int selected, int but
|
||||
}
|
||||
}
|
||||
|
||||
ShowDropDownListAt(w, list, selected, button, wi_rect, wi_colour, auto_width, instant_close);
|
||||
ShowDropDownListAt(w, std::move(list), selected, button, wi_rect, wi_colour, auto_width, instant_close);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -471,21 +495,15 @@ void ShowDropDownList(Window *w, const DropDownList *list, int selected, int but
|
||||
*/
|
||||
void ShowDropDownMenu(Window *w, const StringID *strings, int selected, int button, uint32 disabled_mask, uint32 hidden_mask, uint width)
|
||||
{
|
||||
DropDownList *list = new DropDownList();
|
||||
DropDownList list;
|
||||
|
||||
for (uint i = 0; strings[i] != INVALID_STRING_ID; i++) {
|
||||
if (!HasBit(hidden_mask, i)) {
|
||||
*list->Append() = new DropDownListStringItem(strings[i], i, HasBit(disabled_mask, i));
|
||||
list.emplace_back(new DropDownListStringItem(strings[i], i, HasBit(disabled_mask, i)));
|
||||
}
|
||||
}
|
||||
|
||||
/* No entries in the list? */
|
||||
if (list->Length() == 0) {
|
||||
delete list;
|
||||
return;
|
||||
}
|
||||
|
||||
ShowDropDownList(w, list, selected, button, width);
|
||||
if (!list.empty()) ShowDropDownList(w, std::move(list), selected, button, width);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -500,7 +518,7 @@ int HideDropDownMenu(Window *pw)
|
||||
if (w->window_class != WC_DROPDOWN_MENU) continue;
|
||||
|
||||
DropdownWindow *dw = dynamic_cast<DropdownWindow*>(w);
|
||||
assert(dw != NULL);
|
||||
assert(dw != nullptr);
|
||||
if (pw->window_class == dw->parent_wnd_class &&
|
||||
pw->window_number == dw->parent_wnd_num) {
|
||||
int parent_button = dw->parent_button;
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
virtual bool Selectable() const { return false; }
|
||||
virtual uint Height(uint width) const { return FONT_HEIGHT_NORMAL; }
|
||||
virtual uint Width() const { return 0; }
|
||||
virtual void Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const;
|
||||
virtual void Draw(int left, int right, int top, int bottom, bool sel, Colours bg_colour) const;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -43,14 +43,13 @@ public:
|
||||
StringID string; ///< String ID of item
|
||||
|
||||
DropDownListStringItem(StringID string, int result, bool masked) : DropDownListItem(result, masked), string(string) {}
|
||||
virtual ~DropDownListStringItem() {}
|
||||
|
||||
virtual bool Selectable() const { return true; }
|
||||
virtual uint Width() const;
|
||||
virtual void Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const;
|
||||
bool Selectable() const override { return true; }
|
||||
uint Width() const override;
|
||||
void Draw(int left, int right, int top, int bottom, bool sel, Colours bg_colour) const override;
|
||||
virtual StringID String() const { return this->string; }
|
||||
|
||||
static int CDECL NatSortFunc(const DropDownListItem * const *first, const DropDownListItem * const *second);
|
||||
static bool NatSortFunc(std::unique_ptr<const DropDownListItem> const &first, std::unique_ptr<const DropDownListItem> const &second);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -61,10 +60,9 @@ public:
|
||||
uint64 decode_params[10]; ///< Parameters of the string
|
||||
|
||||
DropDownListParamStringItem(StringID string, int result, bool masked) : DropDownListStringItem(string, result, masked) {}
|
||||
virtual ~DropDownListParamStringItem() {}
|
||||
|
||||
virtual StringID String() const;
|
||||
virtual void SetParam(uint index, uint64 value) { decode_params[index] = value; }
|
||||
StringID String() const override;
|
||||
void SetParam(uint index, uint64 value) { decode_params[index] = value; }
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -75,18 +73,35 @@ public:
|
||||
const char *raw_string;
|
||||
|
||||
DropDownListCharStringItem(const char *raw_string, int result, bool masked) : DropDownListStringItem(STR_JUST_RAW_STRING, result, masked), raw_string(raw_string) {}
|
||||
virtual ~DropDownListCharStringItem() {}
|
||||
|
||||
virtual StringID String() const;
|
||||
StringID String() const override;
|
||||
};
|
||||
|
||||
/**
|
||||
* List item with icon and string.
|
||||
*/
|
||||
class DropDownListIconItem : public DropDownListParamStringItem {
|
||||
SpriteID sprite;
|
||||
PaletteID pal;
|
||||
Dimension dim;
|
||||
uint sprite_y;
|
||||
uint text_y;
|
||||
public:
|
||||
DropDownListIconItem(SpriteID sprite, PaletteID pal, StringID string, int result, bool masked);
|
||||
|
||||
uint Height(uint width) const override;
|
||||
uint Width() const override;
|
||||
void Draw(int left, int right, int top, int bottom, bool sel, Colours bg_colour) const override;
|
||||
void SetDimension(Dimension d);
|
||||
};
|
||||
|
||||
/**
|
||||
* A drop down list is a collection of drop down list items.
|
||||
*/
|
||||
typedef AutoDeleteSmallVector<const DropDownListItem *, 4> DropDownList;
|
||||
typedef std::vector<std::unique_ptr<const DropDownListItem>> DropDownList;
|
||||
|
||||
void ShowDropDownListAt(Window *w, const DropDownList *list, int selected, int button, Rect wi_rect, Colours wi_colour, bool auto_width = false, bool instant_close = false);
|
||||
void ShowDropDownListAt(Window *w, DropDownList &&list, int selected, int button, Rect wi_rect, Colours wi_colour, bool auto_width = false, bool instant_close = false);
|
||||
|
||||
void ShowDropDownList(Window *w, const DropDownList *list, int selected, int button, uint width = 0, bool auto_width = false, bool instant_close = false);
|
||||
void ShowDropDownList(Window *w, DropDownList &&list, int selected, int button, uint width = 0, bool auto_width = false, bool instant_close = false);
|
||||
|
||||
#endif /* WIDGETS_DROPDOWN_TYPE_H */
|
||||
|
||||
@@ -22,6 +22,8 @@ enum FramerateWindowWidgets {
|
||||
WID_FRW_TIMES_NAMES,
|
||||
WID_FRW_TIMES_CURRENT,
|
||||
WID_FRW_TIMES_AVERAGE,
|
||||
WID_FRW_ALLOCSIZE,
|
||||
WID_FRW_SEL_MEMORY,
|
||||
WID_FRW_SCROLLBAR,
|
||||
};
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ enum AboutWidgets {
|
||||
enum QueryStringWidgets {
|
||||
WID_QS_CAPTION, ///< Caption of the window.
|
||||
WID_QS_TEXT, ///< Text of the query.
|
||||
WID_QS_WARNING, ///< Warning label about password security
|
||||
WID_QS_DEFAULT, ///< Default button.
|
||||
WID_QS_CANCEL, ///< Cancel button.
|
||||
WID_QS_OK, ///< OK button.
|
||||
|
||||
@@ -122,6 +122,7 @@ enum NetworkCompanyPasswordWidgets {
|
||||
WID_NCP_LABEL, ///< Label in front of the password field.
|
||||
WID_NCP_PASSWORD, ///< Input field for the password.
|
||||
WID_NCP_SAVE_AS_DEFAULT_PASSWORD, ///< Toggle 'button' for saving the current password as default password.
|
||||
WID_NCP_WARNING, ///< Warning text about password security
|
||||
WID_NCP_CANCEL, ///< Close the window without changing anything.
|
||||
WID_NCP_OK, ///< Safe the password etc.
|
||||
};
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
/** Widgets of the #BuildRoadToolbarWindow class. */
|
||||
enum RoadToolbarWidgets {
|
||||
/* Name starts with RO instead of R, because of collision with RailToolbarWidgets */
|
||||
WID_ROT_CAPTION, ///< Caption of the window
|
||||
WID_ROT_ROAD_X, ///< Build road in x-direction.
|
||||
WID_ROT_ROAD_Y, ///< Build road in y-direction.
|
||||
WID_ROT_AUTOROAD, ///< Autorail.
|
||||
@@ -26,6 +27,7 @@ enum RoadToolbarWidgets {
|
||||
WID_ROT_BUILD_BRIDGE, ///< Build bridge.
|
||||
WID_ROT_BUILD_TUNNEL, ///< Build tunnel.
|
||||
WID_ROT_REMOVE, ///< Remove road.
|
||||
WID_ROT_CONVERT_ROAD, ///< Convert road.
|
||||
};
|
||||
|
||||
/** Widgets of the #BuildRoadDepotWindow class. */
|
||||
|
||||
@@ -30,6 +30,7 @@ enum StationViewWidgets {
|
||||
WID_SV_ROADVEHS, ///< List of scheduled road vehs button.
|
||||
WID_SV_SHIPS, ///< List of scheduled ships button.
|
||||
WID_SV_PLANES, ///< List of scheduled planes button.
|
||||
WID_SV_CATCHMENT, ///< Toggle catchment area highlight.
|
||||
};
|
||||
|
||||
/** Widgets of the #CompanyStationsWindow class. */
|
||||
|
||||
@@ -39,6 +39,7 @@ enum ToolbarNormalWidgets {
|
||||
WID_TN_BUILDING_TOOLS_START, ///< Helper for the offset of the building tools
|
||||
WID_TN_RAILS = WID_TN_BUILDING_TOOLS_START, ///< Rail building menu.
|
||||
WID_TN_ROADS, ///< Road building menu.
|
||||
WID_TN_TRAMS, ///< Tram building menu.
|
||||
WID_TN_WATER, ///< Water building toolbar.
|
||||
WID_TN_AIR, ///< Airport building toolbar.
|
||||
WID_TN_LANDSCAPE, ///< Landscaping toolbar.
|
||||
@@ -66,14 +67,14 @@ enum ToolbarEditorWidgets {
|
||||
WID_TE_TOWN_GENERATE, ///< Town building window.
|
||||
WID_TE_INDUSTRY, ///< Industry building window.
|
||||
WID_TE_ROADS, ///< Road building menu.
|
||||
WID_TE_TRAMS, ///< Tram building menu.
|
||||
WID_TE_WATER, ///< Water building toolbar.
|
||||
WID_TE_TREES, ///< Tree building toolbar.
|
||||
WID_TE_SIGNS, ///< Sign building.
|
||||
WID_TE_DATE_PANEL, ///< Container for the date widgets.
|
||||
/* The following three need to have the same actual widget number as the normal toolbar due to shared code. */
|
||||
WID_TE_MUSIC_SOUND = WID_TN_MUSIC_SOUND, ///< Music/sound configuration menu.
|
||||
WID_TE_HELP = WID_TN_HELP, ///< Help menu.
|
||||
WID_TE_SWITCH_BAR = WID_TN_SWITCH_BAR, ///< Only available when toolbar has been split to switch between different subsets.
|
||||
WID_TE_MUSIC_SOUND, ///< Music/sound configuration menu.
|
||||
WID_TE_HELP, ///< Help menu.
|
||||
WID_TE_SWITCH_BAR, ///< Only available when toolbar has been split to switch between different subsets.
|
||||
};
|
||||
|
||||
#endif /* WIDGETS_TOOLBAR_WIDGET_H */
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
enum TownDirectoryWidgets {
|
||||
WID_TD_SORT_ORDER, ///< Direction of sort dropdown.
|
||||
WID_TD_SORT_CRITERIA, ///< Criteria of sort dropdown.
|
||||
WID_TD_FILTER, ///< Filter of name.
|
||||
WID_TD_LIST, ///< List of towns.
|
||||
WID_TD_SCROLLBAR, ///< Scrollbar for the town list.
|
||||
WID_TD_WORLD_POPULATION, ///< The world's population.
|
||||
@@ -24,6 +25,7 @@ enum TownDirectoryWidgets {
|
||||
/** Widgets of the #TownAuthorityWindow class. */
|
||||
enum TownAuthorityWidgets {
|
||||
WID_TA_CAPTION, ///< Caption of window.
|
||||
WID_TA_ZONE_BUTTON, ///< Turn on/off showing local authority zone.
|
||||
WID_TA_RATING_INFO, ///< Overview with ratings for each company.
|
||||
WID_TA_COMMAND_LIST, ///< List of commands for the player.
|
||||
WID_TA_SCROLLBAR, ///< Scrollbar of the list of commands.
|
||||
@@ -39,6 +41,7 @@ enum TownViewWidgets {
|
||||
WID_TV_CENTER_VIEW, ///< Center the main view on this town.
|
||||
WID_TV_SHOW_AUTHORITY, ///< Show the town authority window.
|
||||
WID_TV_CHANGE_NAME, ///< Change the name of this town.
|
||||
WID_TV_CATCHMENT, ///< Toggle catchment area highlight.
|
||||
WID_TV_EXPAND, ///< Expand this town (scenario editor only).
|
||||
WID_TV_DELETE, ///< Delete this town (scenario editor only).
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user