(svn r26811) -Fix[FS#6108]: Fixed spelling error in widget name.

This commit is contained in:
alberth 2014-09-11 17:10:38 +00:00
parent bb95dd5dcc
commit 22b967676e
6 changed files with 17 additions and 17 deletions

View File

@ -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),

View File

@ -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;
}
}

View File

@ -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");

View File

@ -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.

View File

@ -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.

View File

@ -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.