|
@@ -495,14 +495,20 @@ struct NewsWindow : Window {
|
|
|
delete this;
|
|
|
return ES_HANDLED;
|
|
|
}
|
|
|
return ES_NOT_HANDLED;
|
|
|
}
|
|
|
|
|
|
virtual void OnInvalidateData(int data)
|
|
|
/**
|
|
|
* Some data on this window has become invalid.
|
|
|
* @param data Information about the changed data.
|
|
|
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
|
|
|
*/
|
|
|
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
|
|
|
{
|
|
|
if (!gui_scope) return;
|
|
|
/* The chatbar has notified us that is was either created or closed */
|
|
|
int newtop = this->top + this->chat_height - data;
|
|
|
this->chat_height = data;
|
|
|
this->SetWindowTop(newtop);
|
|
|
}
|
|
|
|
|
@@ -1032,14 +1038,20 @@ struct MessageHistoryWindow : Window {
|
|
|
|
|
|
ni = ni->prev;
|
|
|
if (ni == NULL) return;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
virtual void OnInvalidateData(int data)
|
|
|
/**
|
|
|
* Some data on this window has become invalid.
|
|
|
* @param data Information about the changed data.
|
|
|
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
|
|
|
*/
|
|
|
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
|
|
|
{
|
|
|
if (!gui_scope) return;
|
|
|
this->vscroll->SetCount(_total_news);
|
|
|
}
|
|
|
|
|
|
virtual void OnClick(Point pt, int widget, int click_count)
|
|
|
{
|
|
|
if (widget == MHW_BACKGROUND) {
|
|
@@ -1198,14 +1210,20 @@ struct MessageOptionsWindow : Window {
|
|
|
size->width += MOS_BUTTON_SPACE; // A bit extra for better looks.
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
virtual void OnInvalidateData(int data)
|
|
|
/**
|
|
|
* Some data on this window has become invalid.
|
|
|
* @param data Information about the changed data.
|
|
|
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
|
|
|
*/
|
|
|
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
|
|
|
{
|
|
|
if (!gui_scope) return;
|
|
|
/* Update the dropdown value for 'set all categories'. */
|
|
|
this->GetWidget<NWidgetCore>(WIDGET_NEWSOPT_DROP_SUMMARY)->widget_data = this->message_opt[this->state];
|
|
|
|
|
|
/* Update widget to reflect the value of the #_news_ticker_sound variable. */
|
|
|
this->SetWidgetLoweredState(WIDGET_NEWSOPT_SOUNDTICKER, _news_ticker_sound);
|
|
|
}
|