diff options
author | truebrain <truebrain@openttd.org> | 2011-12-16 16:27:45 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-16 16:27:45 +0000 |
commit | e9f584ac210913a404e246184c8d3c1f52428b63 (patch) | |
tree | dbeb19676245b06fde6921f26e31575ec6979fd2 /src/engine_gui.cpp | |
parent | b90aa80e77e1321bcae2389a014fe7595301e0e2 (diff) | |
download | openttd-e9f584ac210913a404e246184c8d3c1f52428b63.tar.xz |
(svn r23531) -Codechange: document and rename widgets to be consistent and understandable
Diffstat (limited to 'src/engine_gui.cpp')
-rw-r--r-- | src/engine_gui.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index eb8b6a296..c601c858b 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -50,10 +50,10 @@ static const NWidgetPart _nested_engine_preview_widgets[] = { NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE), SetDataTip(STR_ENGINE_PREVIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), EndContainer(), NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE), - NWidget(WWT_EMPTY, INVALID_COLOUR, EPW_QUESTION), SetMinimalSize(300, 0), SetPadding(8, 8, 8, 8), SetFill(1, 0), + NWidget(WWT_EMPTY, INVALID_COLOUR, WID_EP_QUESTION), SetMinimalSize(300, 0), SetPadding(8, 8, 8, 8), SetFill(1, 0), NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(85, 10, 85), - NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, EPW_NO), SetDataTip(STR_QUIT_NO, STR_NULL), SetFill(1, 0), - NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, EPW_YES), SetDataTip(STR_QUIT_YES, STR_NULL), SetFill(1, 0), + NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, WID_EP_NO), SetDataTip(STR_QUIT_NO, STR_NULL), SetFill(1, 0), + NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, WID_EP_YES), SetDataTip(STR_QUIT_YES, STR_NULL), SetFill(1, 0), EndContainer(), NWidget(NWID_SPACER), SetMinimalSize(0, 8), EndContainer(), @@ -69,7 +69,7 @@ struct EnginePreviewWindow : Window { virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) { - if (widget != EPW_QUESTION) return; + if (widget != WID_EP_QUESTION) return; EngineID engine = this->window_number; SetDParam(0, GetEngineCategoryName(engine)); @@ -80,7 +80,7 @@ struct EnginePreviewWindow : Window { virtual void DrawWidget(const Rect &r, int widget) const { - if (widget != EPW_QUESTION) return; + if (widget != WID_EP_QUESTION) return; EngineID engine = this->window_number; SetDParam(0, GetEngineCategoryName(engine)); @@ -100,10 +100,10 @@ struct EnginePreviewWindow : Window { virtual void OnClick(Point pt, int widget, int click_count) { switch (widget) { - case EPW_YES: + case WID_EP_YES: DoCommandP(0, this->window_number, 0, CMD_WANT_ENGINE_PREVIEW); /* FALL THROUGH */ - case EPW_NO: + case WID_EP_NO: delete this; break; } |