File diff r11518:6c02f3322c23 → r11519:80d5a7e0eeb8
src/news_gui.cpp
Show inline comments
 
@@ -758,25 +758,25 @@ struct MessageHistoryWindow : Window {
 
			NewsItem *ni = _latest_news;
 
			if (ni == NULL) return;
 

	
 
			for (int n = (pt.y - 19) / 12 + this->vscroll.pos; n > 0; n--) {
 
				ni = ni->prev;
 
				if (ni == NULL) return;
 
			}
 

	
 
			ShowNewsMessage(ni);
 
		}
 
	}
 

	
 
	virtual void OnResize(Point new_size, Point delta)
 
	virtual void OnResize(Point delta)
 
	{
 
		this->vscroll.cap += delta.y / 12;
 
	}
 
};
 

	
 
static const Widget _message_history_widgets[] = {
 
{   WWT_CLOSEBOX,   RESIZE_NONE,  COLOUR_BROWN,     0,    10,     0,    13, STR_00C5,            STR_018B_CLOSE_WINDOW},
 
{    WWT_CAPTION,  RESIZE_RIGHT,  COLOUR_BROWN,    11,   387,     0,    13, STR_MESSAGE_HISTORY, STR_018C_WINDOW_TITLE_DRAG_THIS},
 
{  WWT_STICKYBOX,     RESIZE_LR,  COLOUR_BROWN,   388,   399,     0,    13, 0x0,                 STR_STICKY_BUTTON},
 
{      WWT_PANEL,     RESIZE_RB,  COLOUR_BROWN,     0,   387,    14,   139, 0x0,                 STR_MESSAGE_HISTORY_TIP},
 
{  WWT_SCROLLBAR,    RESIZE_LRB,  COLOUR_BROWN,   388,   399,    14,   127, 0x0,                 STR_0190_SCROLL_BAR_SCROLLS_LIST},
 
{  WWT_RESIZEBOX,   RESIZE_LRTB,  COLOUR_BROWN,   388,   399,   128,   139, 0x0,                 STR_RESIZE_BUTTON},