|
@@ -1332,7 +1332,7 @@ public:
|
|
|
return type == WWT_IMGBTN || type == WWT_IMGBTN_2 || type == WWT_PUSHIMGBTN;
|
|
|
}
|
|
|
|
|
|
void SetupSmallestSize(Window *w, bool init_array)
|
|
|
void SetupSmallestSize(Window *w, bool init_array) override
|
|
|
{
|
|
|
this->smallest_x = 0; // Biggest child
|
|
|
this->smallest_y = 0; // Biggest child
|
|
@@ -1365,7 +1365,7 @@ public:
|
|
|
_toolbar_width = nbuttons * this->smallest_x;
|
|
|
}
|
|
|
|
|
|
void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl)
|
|
|
void AssignSizePosition(SizingType sizing, uint x, uint y, uint given_width, uint given_height, bool rtl) override
|
|
|
{
|
|
|
assert(given_width >= this->smallest_x && given_height >= this->smallest_y);
|
|
|
|
|
@@ -1428,7 +1428,7 @@ public:
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* virtual */ void Draw(const Window *w)
|
|
|
void Draw(const Window *w) override
|
|
|
{
|
|
|
/* Draw brown-red toolbar bg. */
|
|
|
GfxFillRect(this->pos_x, this->pos_y, this->pos_x + this->current_x - 1, this->pos_y + this->current_y - 1, PC_VERY_DARK_RED);
|
|
@@ -1443,7 +1443,7 @@ public:
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* virtual */ NWidgetCore *GetWidgetFromPos(int x, int y)
|
|
|
NWidgetCore *GetWidgetFromPos(int x, int y) override
|
|
|
{
|
|
|
if (!IsInsideBS(x, this->pos_x, this->current_x) || !IsInsideBS(y, this->pos_y, this->current_y)) return NULL;
|
|
|
|
|
@@ -1470,7 +1470,7 @@ public:
|
|
|
|
|
|
/** Container for the 'normal' main toolbar */
|
|
|
class NWidgetMainToolbarContainer : public NWidgetToolbarContainer {
|
|
|
/* virtual */ const byte *GetButtonArrangement(uint &width, uint &arrangable_count, uint &button_count, uint &spacer_count) const
|
|
|
const byte *GetButtonArrangement(uint &width, uint &arrangable_count, uint &button_count, uint &spacer_count) const override
|
|
|
{
|
|
|
static const uint SMALLEST_ARRANGEMENT = 14;
|
|
|
static const uint BIGGEST_ARRANGEMENT = 20;
|
|
@@ -1793,7 +1793,7 @@ class NWidgetMainToolbarContainer : publ
|
|
|
class NWidgetScenarioToolbarContainer : public NWidgetToolbarContainer {
|
|
|
uint panel_widths[2]; ///< The width of the two panels (the text panel and date panel)
|
|
|
|
|
|
void SetupSmallestSize(Window *w, bool init_array)
|
|
|
void SetupSmallestSize(Window *w, bool init_array) override
|
|
|
{
|
|
|
this->NWidgetToolbarContainer::SetupSmallestSize(w, init_array);
|
|
|
|
|
@@ -1808,7 +1808,7 @@ class NWidgetScenarioToolbarContainer :
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* virtual */ const byte *GetButtonArrangement(uint &width, uint &arrangable_count, uint &button_count, uint &spacer_count) const
|
|
|
const byte *GetButtonArrangement(uint &width, uint &arrangable_count, uint &button_count, uint &spacer_count) const override
|
|
|
{
|
|
|
static const byte arrange_all[] = {
|
|
|
WID_TE_PAUSE,
|