(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.

This commit is contained in:
frosch
2013-05-26 19:23:42 +00:00
parent 5e7603154d
commit 25adefca23
61 changed files with 488 additions and 482 deletions

View File

@@ -28,9 +28,9 @@ byte _display_opt; ///< What do we want to draw/do?
class TransparenciesWindow : public Window
{
public:
TransparenciesWindow(const WindowDesc *desc, int window_number) : Window()
TransparenciesWindow(WindowDesc *desc, int window_number) : Window(desc)
{
this->InitNested(desc, window_number);
this->InitNested(window_number);
}
virtual void OnPaint()
@@ -102,7 +102,7 @@ public:
}
}
virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number)
virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)
{
Point pt = GetToolbarAlignedWindowPosition(sm_width);
pt.y += 2 * (sm_height - this->GetWidget<NWidgetBase>(WID_TT_BUTTONS)->current_y);
@@ -146,7 +146,7 @@ static const NWidgetPart _nested_transparency_widgets[] = {
EndContainer(),
};
static const WindowDesc _transparency_desc(
static WindowDesc _transparency_desc(
WDP_MANUAL, 0, 0,
WC_TRANSPARENCY_TOOLBAR, WC_NONE,
0,