summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/autoreplace_gui.cpp12
-rw-r--r--src/build_vehicle_gui.cpp10
-rw-r--r--src/script/api/game/game_window.hpp.sq4
-rw-r--r--src/script/api/script_window.hpp4
-rw-r--r--src/widgets/autoreplace_widget.h2
-rw-r--r--src/widgets/build_vehicle_widget.h2
6 files changed, 17 insertions, 17 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp
index 00eb02225..a558724a9 100644
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -257,7 +257,7 @@ public:
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
switch (widget) {
- case WID_RV_SORT_ASSENDING_DESCENDING: {
+ case WID_RV_SORT_ASCENDING_DESCENDING: {
Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the string is centred and it also looks better.
d.height += padding.height;
@@ -376,8 +376,8 @@ public:
virtual void DrawWidget(const Rect &r, int widget) const
{
switch (widget) {
- case WID_RV_SORT_ASSENDING_DESCENDING:
- this->DrawSortButtonState(WID_RV_SORT_ASSENDING_DESCENDING, this->descending_sort_order ? SBS_DOWN : SBS_UP);
+ case WID_RV_SORT_ASCENDING_DESCENDING:
+ this->DrawSortButtonState(WID_RV_SORT_ASCENDING_DESCENDING, this->descending_sort_order ? SBS_DOWN : SBS_UP);
break;
case WID_RV_INFO_TAB: {
@@ -464,7 +464,7 @@ public:
virtual void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {
- case WID_RV_SORT_ASSENDING_DESCENDING:
+ case WID_RV_SORT_ASCENDING_DESCENDING:
this->descending_sort_order ^= true;
_engine_sort_last_order[this->window_number] = this->descending_sort_order;
this->engines[1].ForceRebuild();
@@ -614,7 +614,7 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_SORT_ASSENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), SetFill(1, 1),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), SetFill(1, 1),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 1), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
EndContainer(),
NWidget(NWID_HORIZONTAL),
@@ -676,7 +676,7 @@ static const NWidgetPart _nested_replace_vehicle_widgets[] = {
NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_SORT_ASSENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 1), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
EndContainer(),
NWidget(NWID_HORIZONTAL),
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 981f664c6..6c139eb71 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -60,7 +60,7 @@ static const NWidgetPart _nested_build_vehicle_widgets[] = {
NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_BV_SORT_ASSENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_BV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
EndContainer(),
NWidget(NWID_HORIZONTAL),
@@ -1262,7 +1262,7 @@ struct BuildVehicleWindow : Window {
void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {
- case WID_BV_SORT_ASSENDING_DESCENDING:
+ case WID_BV_SORT_ASCENDING_DESCENDING:
this->descending_sort_order ^= true;
_engine_sort_last_order[this->vehicle_type] = this->descending_sort_order;
this->eng_list.ForceRebuild();
@@ -1389,7 +1389,7 @@ struct BuildVehicleWindow : Window {
size->height = this->details_height;
break;
- case WID_BV_SORT_ASSENDING_DESCENDING: {
+ case WID_BV_SORT_ASCENDING_DESCENDING: {
Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the string is centred and it also looks better.
d.height += padding.height;
@@ -1413,8 +1413,8 @@ struct BuildVehicleWindow : Window {
DrawEngineList(this->vehicle_type, r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, &this->eng_list, this->vscroll->GetPosition(), min(this->vscroll->GetPosition() + this->vscroll->GetCapacity(), this->eng_list.Length()), this->sel_engine, false, DEFAULT_GROUP);
break;
- case WID_BV_SORT_ASSENDING_DESCENDING:
- this->DrawSortButtonState(WID_BV_SORT_ASSENDING_DESCENDING, this->descending_sort_order ? SBS_DOWN : SBS_UP);
+ case WID_BV_SORT_ASCENDING_DESCENDING:
+ this->DrawSortButtonState(WID_BV_SORT_ASCENDING_DESCENDING, this->descending_sort_order ? SBS_DOWN : SBS_UP);
break;
}
}
diff --git a/src/script/api/game/game_window.hpp.sq b/src/script/api/game/game_window.hpp.sq
index 6b1159885..084dd77e2 100644
--- a/src/script/api/game/game_window.hpp.sq
+++ b/src/script/api/game/game_window.hpp.sq
@@ -213,7 +213,7 @@ void SQGSWindow_Register(Squirrel *engine)
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_BTN_DONTHILIGHT, "WID_AP_BTN_DONTHILIGHT");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_BTN_DOHILIGHT, "WID_AP_BTN_DOHILIGHT");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_CAPTION, "WID_RV_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_SORT_ASSENDING_DESCENDING, "WID_RV_SORT_ASSENDING_DESCENDING");
+ SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_SORT_ASCENDING_DESCENDING, "WID_RV_SORT_ASCENDING_DESCENDING");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_SHOW_HIDDEN_ENGINES, "WID_RV_SHOW_HIDDEN_ENGINES");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_SORT_DROPDOWN, "WID_RV_SORT_DROPDOWN");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_LEFT_MATRIX, "WID_RV_LEFT_MATRIX");
@@ -240,7 +240,7 @@ void SQGSWindow_Register(Squirrel *engine)
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BBS_BRIDGE_LIST, "WID_BBS_BRIDGE_LIST");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BBS_SCROLLBAR, "WID_BBS_SCROLLBAR");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_CAPTION, "WID_BV_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_SORT_ASSENDING_DESCENDING, "WID_BV_SORT_ASSENDING_DESCENDING");
+ SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_SORT_ASCENDING_DESCENDING, "WID_BV_SORT_ASCENDING_DESCENDING");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_SORT_DROPDOWN, "WID_BV_SORT_DROPDOWN");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_CARGO_FILTER_DROPDOWN, "WID_BV_CARGO_FILTER_DROPDOWN");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_SHOW_HIDDEN_ENGINES, "WID_BV_SHOW_HIDDEN_ENGINES");
diff --git a/src/script/api/script_window.hpp b/src/script/api/script_window.hpp
index 0f6e3e0ed..099d90fb2 100644
--- a/src/script/api/script_window.hpp
+++ b/src/script/api/script_window.hpp
@@ -924,7 +924,7 @@ public:
WID_RV_CAPTION = ::WID_RV_CAPTION, ///< Caption of the window.
/* Sort dropdown at the right. */
- WID_RV_SORT_ASSENDING_DESCENDING = ::WID_RV_SORT_ASSENDING_DESCENDING, ///< Ascending/descending sort order button.
+ WID_RV_SORT_ASCENDING_DESCENDING = ::WID_RV_SORT_ASCENDING_DESCENDING, ///< Ascending/descending sort order button.
WID_RV_SHOW_HIDDEN_ENGINES = ::WID_RV_SHOW_HIDDEN_ENGINES, ///< Toggle whether to display the hidden vehicles.
WID_RV_SORT_DROPDOWN = ::WID_RV_SORT_DROPDOWN, ///< Dropdown for the sort criteria.
@@ -976,7 +976,7 @@ public:
/** Widgets of the #BuildVehicleWindow class. */
enum BuildVehicleWidgets {
WID_BV_CAPTION = ::WID_BV_CAPTION, ///< Caption of window.
- WID_BV_SORT_ASSENDING_DESCENDING = ::WID_BV_SORT_ASSENDING_DESCENDING, ///< Sort direction.
+ WID_BV_SORT_ASCENDING_DESCENDING = ::WID_BV_SORT_ASCENDING_DESCENDING, ///< Sort direction.
WID_BV_SORT_DROPDOWN = ::WID_BV_SORT_DROPDOWN, ///< Criteria of sorting dropdown.
WID_BV_CARGO_FILTER_DROPDOWN = ::WID_BV_CARGO_FILTER_DROPDOWN, ///< Cargo filter dropdown.
WID_BV_SHOW_HIDDEN_ENGINES = ::WID_BV_SHOW_HIDDEN_ENGINES, ///< Toggle whether to display the hidden vehicles.
diff --git a/src/widgets/autoreplace_widget.h b/src/widgets/autoreplace_widget.h
index b1afc8d75..7a98b6cd7 100644
--- a/src/widgets/autoreplace_widget.h
+++ b/src/widgets/autoreplace_widget.h
@@ -17,7 +17,7 @@ enum ReplaceVehicleWidgets {
WID_RV_CAPTION, ///< Caption of the window.
/* Sort dropdown at the right. */
- WID_RV_SORT_ASSENDING_DESCENDING, ///< Ascending/descending sort order button.
+ WID_RV_SORT_ASCENDING_DESCENDING, ///< Ascending/descending sort order button.
WID_RV_SHOW_HIDDEN_ENGINES, ///< Toggle whether to display the hidden vehicles.
WID_RV_SORT_DROPDOWN, ///< Dropdown for the sort criteria.
diff --git a/src/widgets/build_vehicle_widget.h b/src/widgets/build_vehicle_widget.h
index 142653ac6..ae548587e 100644
--- a/src/widgets/build_vehicle_widget.h
+++ b/src/widgets/build_vehicle_widget.h
@@ -15,7 +15,7 @@
/** Widgets of the #BuildVehicleWindow class. */
enum BuildVehicleWidgets {
WID_BV_CAPTION, ///< Caption of window.
- WID_BV_SORT_ASSENDING_DESCENDING, ///< Sort direction.
+ WID_BV_SORT_ASCENDING_DESCENDING, ///< Sort direction.
WID_BV_SORT_DROPDOWN, ///< Criteria of sorting dropdown.
WID_BV_CARGO_FILTER_DROPDOWN, ///< Cargo filter dropdown.
WID_BV_SHOW_HIDDEN_ENGINES, ///< Toggle whether to display the hidden vehicles.