mirror of https://github.com/OpenTTD/OpenTTD
(svn r21775) -Add: Allow vertical resizing of the newobject gui.
parent
ab91d8eb4f
commit
e8e535f58c
|
@ -95,6 +95,7 @@ public:
|
||||||
}
|
}
|
||||||
size->width += padding.width;
|
size->width += padding.width;
|
||||||
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||||
|
resize->height = this->line_height;
|
||||||
size->height = this->vscroll->GetCapacity() * this->line_height;
|
size->height = this->vscroll->GetCapacity() * this->line_height;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -286,6 +287,12 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void OnResize()
|
||||||
|
{
|
||||||
|
this->vscroll->SetCapacityFromWidget(this, BOW_CLASS_LIST);
|
||||||
|
this->GetWidget<NWidgetCore>(BOW_CLASS_LIST)->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void OnClick(Point pt, int widget, int click_count)
|
virtual void OnClick(Point pt, int widget, int click_count)
|
||||||
{
|
{
|
||||||
switch (GB(widget, 0, 16)) {
|
switch (GB(widget, 0, 16)) {
|
||||||
|
|
Loading…
Reference in New Issue