(svn r21331) -Codechange: Make drawing the widgets default behaviour in OnPaint().
This commit is contained in:
@@ -79,11 +79,6 @@ public:
|
||||
char landinfo_data[LAND_INFO_LINE_END][LAND_INFO_LINE_BUFF_SIZE];
|
||||
TileIndex tile;
|
||||
|
||||
virtual void OnPaint()
|
||||
{
|
||||
this->DrawWidgets();
|
||||
}
|
||||
|
||||
virtual void DrawWidget(const Rect &r, int widget) const
|
||||
{
|
||||
if (widget != LIW_BACKGROUND) return;
|
||||
@@ -473,11 +468,6 @@ struct AboutWindow : public Window {
|
||||
*size = maxdim(*size, d);
|
||||
}
|
||||
|
||||
virtual void OnPaint()
|
||||
{
|
||||
this->DrawWidgets();
|
||||
}
|
||||
|
||||
virtual void DrawWidget(const Rect &r, int widget) const
|
||||
{
|
||||
if (widget != AW_SCROLLING_TEXT) return;
|
||||
@@ -641,11 +631,6 @@ public:
|
||||
return pt;
|
||||
}
|
||||
|
||||
virtual void OnPaint()
|
||||
{
|
||||
this->DrawWidgets();
|
||||
}
|
||||
|
||||
virtual void OnInvalidateData(int data)
|
||||
{
|
||||
/* If company gets shut down, while displaying an error about it, remove the error message. */
|
||||
@@ -896,12 +881,6 @@ struct TooltipsWindow : public Window
|
||||
DrawStringMultiLine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, r.bottom - WD_FRAMERECT_BOTTOM, this->string_id, TC_FROMSTRING, SA_CENTER);
|
||||
}
|
||||
|
||||
|
||||
virtual void OnPaint()
|
||||
{
|
||||
this->DrawWidgets();
|
||||
}
|
||||
|
||||
virtual void OnMouseLoop()
|
||||
{
|
||||
/* Always close tooltips when the cursor is not in our window. */
|
||||
@@ -1520,11 +1499,6 @@ struct QueryWindow : public Window {
|
||||
DrawStringMultiLine(r.left, r.right, r.top, r.bottom, this->message, TC_FROMSTRING, SA_CENTER);
|
||||
}
|
||||
|
||||
virtual void OnPaint()
|
||||
{
|
||||
this->DrawWidgets();
|
||||
}
|
||||
|
||||
virtual void OnClick(Point pt, int widget, int click_count)
|
||||
{
|
||||
switch (widget) {
|
||||
|
Reference in New Issue
Block a user