summaryrefslogtreecommitdiff
path: root/src/cheat_gui.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-16 16:27:45 +0000
committertruebrain <truebrain@openttd.org>2011-12-16 16:27:45 +0000
commite9f584ac210913a404e246184c8d3c1f52428b63 (patch)
treedbeb19676245b06fde6921f26e31575ec6979fd2 /src/cheat_gui.cpp
parentb90aa80e77e1321bcae2389a014fe7595301e0e2 (diff)
downloadopenttd-e9f584ac210913a404e246184c8d3c1f52428b63.tar.xz
(svn r23531) -Codechange: document and rename widgets to be consistent and understandable
Diffstat (limited to 'src/cheat_gui.cpp')
-rw-r--r--src/cheat_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp
index 093d36b59..5af16a4be 100644
--- a/src/cheat_gui.cpp
+++ b/src/cheat_gui.cpp
@@ -187,7 +187,7 @@ static const NWidgetPart _nested_cheat_widgets[] = {
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, CW_PANEL), SetDataTip(0x0, STR_CHEATS_TOOLTIP), EndContainer(),
+ NWidget(WWT_PANEL, COLOUR_GREY, WID_C_PANEL), SetDataTip(0x0, STR_CHEATS_TOOLTIP), EndContainer(),
};
/** GUI for the cheats. */
@@ -202,7 +202,7 @@ struct CheatWindow : Window {
virtual void DrawWidget(const Rect &r, int widget) const
{
- if (widget != CW_PANEL) return;
+ if (widget != WID_C_PANEL) return;
int y = r.top + WD_FRAMERECT_TOP + this->header_height;
DrawStringMultiLine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, r.top + WD_FRAMERECT_TOP, y, STR_CHEATS_WARNING, TC_FROMSTRING, SA_CENTER);
@@ -265,7 +265,7 @@ struct CheatWindow : Window {
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
{
- if (widget != CW_PANEL) return;
+ if (widget != WID_C_PANEL) return;
uint width = 0;
for (int i = 0; i != lengthof(_cheats_ui); i++) {
@@ -316,7 +316,7 @@ struct CheatWindow : Window {
virtual void OnClick(Point pt, int widget, int click_count)
{
- const NWidgetBase *wid = this->GetWidget<NWidgetBase>(CW_PANEL);
+ const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_C_PANEL);
uint btn = (pt.y - wid->pos_y - WD_FRAMERECT_TOP - this->header_height) / (FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL);
uint x = pt.x - wid->pos_x;
bool rtl = _current_text_dir == TD_RTL;