(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user