summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/order_gui.cpp18
-rw-r--r--src/widget.cpp12
-rw-r--r--src/widget_type.h16
-rw-r--r--src/widgets/dropdown.cpp4
4 files changed, 25 insertions, 25 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 615677b9f..8960a44f1 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -1299,13 +1299,13 @@ static const NWidgetPart _nested_orders_train_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(NWID_SELECTION, INVALID_COLOUR, ORDER_WIDGET_SEL_TOP_LEFT),
- NWidget(NWID_BUTTON_DRPDOWN, COLOUR_GREY, ORDER_WIDGET_NON_STOP), SetMinimalSize(124, 12), SetFill(true, false),
+ NWidget(NWID_BUTTON_DROPDOWN, COLOUR_GREY, ORDER_WIDGET_NON_STOP), SetMinimalSize(124, 12), SetFill(true, false),
SetDataTip(STR_ORDER_NON_STOP, STR_ORDER_TOOLTIP_NON_STOP), SetResize(1, 0),
NWidget(WWT_DROPDOWN, COLOUR_GREY, ORDER_WIDGET_COND_VARIABLE), SetMinimalSize(124, 12), SetFill(true, false),
SetDataTip(STR_NULL, STR_ORDER_CONDITIONAL_VARIABLE_TOOLTIP), SetResize(1, 0),
EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, ORDER_WIDGET_SEL_TOP_MIDDLE),
- NWidget(NWID_BUTTON_DRPDOWN, COLOUR_GREY, ORDER_WIDGET_FULL_LOAD), SetMinimalSize(124, 12), SetFill(true, false),
+ NWidget(NWID_BUTTON_DROPDOWN, COLOUR_GREY, ORDER_WIDGET_FULL_LOAD), SetMinimalSize(124, 12), SetFill(true, false),
SetDataTip(STR_ORDER_TOGGLE_FULL_LOAD, STR_ORDER_TOOLTIP_FULL_LOAD), SetResize(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, ORDER_WIDGET_REFIT), SetMinimalSize(124, 12), SetFill(true, false),
SetDataTip(STR_ORDER_REFIT, STR_ORDER_REFIT_TOOLTIP), SetResize(1, 0),
@@ -1313,9 +1313,9 @@ static const NWidgetPart _nested_orders_train_widgets[] = {
SetDataTip(STR_NULL, STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP), SetResize(1, 0),
EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, ORDER_WIDGET_SEL_TOP_RIGHT),
- NWidget(NWID_BUTTON_DRPDOWN, COLOUR_GREY, ORDER_WIDGET_UNLOAD), SetMinimalSize(124, 12), SetFill(true, false),
+ NWidget(NWID_BUTTON_DROPDOWN, COLOUR_GREY, ORDER_WIDGET_UNLOAD), SetMinimalSize(124, 12), SetFill(true, false),
SetDataTip(STR_ORDER_TOGGLE_UNLOAD, STR_ORDER_TOOLTIP_UNLOAD), SetResize(1, 0),
- NWidget(NWID_BUTTON_DRPDOWN, COLOUR_GREY, ORDER_WIDGET_SERVICE), SetMinimalSize(124, 12), SetFill(true, false),
+ NWidget(NWID_BUTTON_DROPDOWN, COLOUR_GREY, ORDER_WIDGET_SERVICE), SetMinimalSize(124, 12), SetFill(true, false),
SetDataTip(STR_ORDER_SERVICE, STR_ORDER_SERVICE_TOOLTIP), SetResize(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, ORDER_WIDGET_COND_VALUE), SetMinimalSize(124, 12), SetFill(true, false),
SetDataTip(STR_BLACK_COMMA, STR_ORDER_CONDITIONAL_VALUE_TOOLTIP), SetResize(1, 0),
@@ -1331,7 +1331,7 @@ static const NWidgetPart _nested_orders_train_widgets[] = {
SetDataTip(STR_ORDERS_SKIP_BUTTON, STR_ORDERS_SKIP_TOOLTIP), SetResize(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, ORDER_WIDGET_DELETE), SetMinimalSize(124, 12), SetFill(true, false),
SetDataTip(STR_ORDERS_DELETE_BUTTON, STR_ORDERS_DELETE_TOOLTIP), SetResize(1, 0),
- NWidget(NWID_BUTTON_DRPDOWN, COLOUR_GREY, ORDER_WIDGET_GOTO), SetMinimalSize(124, 12), SetFill(true, false),
+ NWidget(NWID_BUTTON_DROPDOWN, COLOUR_GREY, ORDER_WIDGET_GOTO), SetMinimalSize(124, 12), SetFill(true, false),
SetDataTip(STR_ORDERS_GO_TO_BUTTON, STR_ORDERS_GO_TO_TOOLTIP), SetResize(1, 0),
EndContainer(),
NWidget(WWT_RESIZEBOX, COLOUR_GREY, ORDER_WIDGET_RESIZE),
@@ -1363,16 +1363,16 @@ static const NWidgetPart _nested_orders_widgets[] = {
NWidget(NWID_SELECTION, INVALID_COLOUR, ORDER_WIDGET_SEL_TOP_ROW),
/* load + unload buttons. */
NWidget(NWID_HORIZONTAL),
- NWidget(NWID_BUTTON_DRPDOWN, COLOUR_GREY, ORDER_WIDGET_FULL_LOAD), SetMinimalSize(186, 12), SetFill(true, false),
+ NWidget(NWID_BUTTON_DROPDOWN, COLOUR_GREY, ORDER_WIDGET_FULL_LOAD), SetMinimalSize(186, 12), SetFill(true, false),
SetDataTip(STR_ORDER_TOGGLE_FULL_LOAD, STR_ORDER_TOOLTIP_FULL_LOAD), SetResize(1, 0),
- NWidget(NWID_BUTTON_DRPDOWN, COLOUR_GREY, ORDER_WIDGET_UNLOAD), SetMinimalSize(186, 12), SetFill(true, false),
+ NWidget(NWID_BUTTON_DROPDOWN, COLOUR_GREY, ORDER_WIDGET_UNLOAD), SetMinimalSize(186, 12), SetFill(true, false),
SetDataTip(STR_ORDER_TOGGLE_UNLOAD, STR_ORDER_TOOLTIP_UNLOAD), SetResize(1, 0),
EndContainer(),
/* Refit + service buttons. */
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, ORDER_WIDGET_REFIT), SetMinimalSize(186, 12), SetFill(true, false),
SetDataTip(STR_ORDER_REFIT, STR_ORDER_REFIT_TOOLTIP), SetResize(1, 0),
- NWidget(NWID_BUTTON_DRPDOWN, COLOUR_GREY, ORDER_WIDGET_SERVICE), SetMinimalSize(124, 12), SetFill(true, false),
+ NWidget(NWID_BUTTON_DROPDOWN, COLOUR_GREY, ORDER_WIDGET_SERVICE), SetMinimalSize(124, 12), SetFill(true, false),
SetDataTip(STR_ORDER_SERVICE, STR_ORDER_SERVICE_TOOLTIP), SetResize(1, 0),
EndContainer(),
@@ -1396,7 +1396,7 @@ static const NWidgetPart _nested_orders_widgets[] = {
SetDataTip(STR_ORDERS_SKIP_BUTTON, STR_ORDERS_SKIP_TOOLTIP), SetResize(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, ORDER_WIDGET_DELETE), SetMinimalSize(124, 12), SetFill(true, false),
SetDataTip(STR_ORDERS_DELETE_BUTTON, STR_ORDERS_DELETE_TOOLTIP), SetResize(1, 0),
- NWidget(NWID_BUTTON_DRPDOWN, COLOUR_GREY, ORDER_WIDGET_GOTO), SetMinimalSize(124, 12), SetFill(true, false),
+ NWidget(NWID_BUTTON_DROPDOWN, COLOUR_GREY, ORDER_WIDGET_GOTO), SetMinimalSize(124, 12), SetFill(true, false),
SetDataTip(STR_ORDERS_GO_TO_BUTTON, STR_ORDERS_GO_TO_TOOLTIP), SetResize(1, 0),
NWidget(WWT_RESIZEBOX, COLOUR_GREY, ORDER_WIDGET_RESIZE),
EndContainer(),
diff --git a/src/widget.cpp b/src/widget.cpp
index 88ecf0e9d..841a4cb72 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -515,7 +515,7 @@ static inline void DrawCaption(const Rect &r, Colours colour, Owner owner, Strin
}
/**
- * Draw a button with a dropdown (#WWT_DROPDOWN and #NWID_BUTTON_DRPDOWN).
+ * Draw a button with a dropdown (#WWT_DROPDOWN and #NWID_BUTTON_DROPDOWN).
* @param r Rectangle containing the widget.
* @param colour Background colour of the widget.
* @param clicked_button The button-part is lowered.
@@ -1694,7 +1694,7 @@ NWidgetLeaf::NWidgetLeaf(WidgetType tp, Colours colour, int index, uint16 data,
case WWT_TEXT:
case WWT_MATRIX:
case WWT_EDITBOX:
- case NWID_BUTTON_DRPDOWN:
+ case NWID_BUTTON_DROPDOWN:
case NWID_BUTTON_ARROW:
this->SetFill(false, false);
break;
@@ -1876,7 +1876,7 @@ void NWidgetLeaf::SetupSmallestSize(Window *w, bool init_array)
break;
}
case WWT_DROPDOWN:
- case NWID_BUTTON_DRPDOWN: {
+ case NWID_BUTTON_DROPDOWN: {
static const Dimension extra = {WD_DROPDOWNTEXT_LEFT + WD_DROPDOWNTEXT_RIGHT, WD_DROPDOWNTEXT_TOP + WD_DROPDOWNTEXT_BOTTOM};
padding = &extra;
if (this->index >= 0) w->SetStringParameters(this->index);
@@ -2011,7 +2011,7 @@ void NWidgetLeaf::Draw(const Window *w)
DrawDropdown(r, this->colour, clicked, this->widget_data);
break;
- case NWID_BUTTON_DRPDOWN:
+ case NWID_BUTTON_DROPDOWN:
if (this->index >= 0) w->SetStringParameters(this->index);
DrawButtonDropdown(r, this->colour, clicked, (this->disp_flags & ND_DROPDOWN_ACTIVE) != 0, this->widget_data);
break;
@@ -2039,7 +2039,7 @@ Scrollbar *NWidgetLeaf::FindScrollbar(Window *w, bool allow_next)
}
/**
- * For a #NWID_BUTTON_DRPDOWN, test whether \a pt refers to the button or to the drop-down.
+ * For a #NWID_BUTTON_DROPDOWN, test whether \a pt refers to the button or to the drop-down.
* @param pt Point in the widget.
* @return The point refers to the button.
*
@@ -2200,7 +2200,7 @@ static int MakeNWidget(const NWidgetPart *parts, int count, NWidgetBase **dest,
default:
if (*dest != NULL) return num_used;
- assert((parts->type & WWT_MASK) < WWT_LAST || parts->type == NWID_BUTTON_DRPDOWN || parts->type == NWID_BUTTON_ARROW);
+ assert((parts->type & WWT_MASK) < WWT_LAST || parts->type == NWID_BUTTON_DROPDOWN || parts->type == NWID_BUTTON_ARROW);
*dest = new NWidgetLeaf(parts->type, parts->u.widget.colour, parts->u.widget.index, 0x0, STR_NULL);
*biggest_index = max(*biggest_index, (int)parts->u.widget.index);
break;
diff --git a/src/widget_type.h b/src/widget_type.h
index 1dc4fc782..d4e1abda9 100644
--- a/src/widget_type.h
+++ b/src/widget_type.h
@@ -122,14 +122,14 @@ enum WidgetType {
WWT_LAST, ///< Last Item. use WIDGETS_END to fill up padding!!
/* Nested widget types. */
- NWID_HORIZONTAL, ///< Horizontal container.
- NWID_HORIZONTAL_LTR, ///< Horizontal container that doesn't change the order of the widgets for RTL languages.
- NWID_VERTICAL, ///< Vertical container.
- NWID_SPACER, ///< Invisible widget that takes some space.
- NWID_SELECTION, ///< Stacked widgets, only one visible at a time (eg in a panel with tabs).
- NWID_VIEWPORT, ///< Nested widget containing a viewport.
- NWID_BUTTON_DRPDOWN, ///< Button with a drop-down.
- NWID_BUTTON_ARROW, ///< Button with an arrow
+ NWID_HORIZONTAL, ///< Horizontal container.
+ NWID_HORIZONTAL_LTR, ///< Horizontal container that doesn't change the order of the widgets for RTL languages.
+ NWID_VERTICAL, ///< Vertical container.
+ NWID_SPACER, ///< Invisible widget that takes some space.
+ NWID_SELECTION, ///< Stacked widgets, only one visible at a time (eg in a panel with tabs).
+ NWID_VIEWPORT, ///< Nested widget containing a viewport.
+ NWID_BUTTON_DROPDOWN, ///< Button with a drop-down.
+ NWID_BUTTON_ARROW, ///< Button with an arrow
/* Nested widget part types. */
WPT_RESIZE, ///< Widget part for specifying resizing.
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index ee3c929dd..d8f489fc4 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -162,7 +162,7 @@ struct DropdownWindow : Window {
if (w2 != NULL) {
if (w2->nested_array != NULL) {
NWidgetCore *nwi2 = w2->GetWidget<NWidgetCore>(this->parent_button);
- if (nwi2->type == NWID_BUTTON_DRPDOWN) {
+ if (nwi2->type == NWID_BUTTON_DROPDOWN) {
nwi2->disp_flags &= ~ND_DROPDOWN_ACTIVE;
} else {
w2->RaiseWidget(this->parent_button);
@@ -333,7 +333,7 @@ void ShowDropDownList(Window *w, DropDownList *list, int selected, int button, u
wi_rect.bottom = nwi->pos_y + nwi->current_y - 1;
wi_colour = nwi->colour;
- if (nwi->type == NWID_BUTTON_DRPDOWN) {
+ if (nwi->type == NWID_BUTTON_DROPDOWN) {
nwi->disp_flags |= ND_DROPDOWN_ACTIVE;
} else {
w->LowerWidget(button);