File diff r13591:48a163a06543 → r13592:acc23e8ddd40
src/signs_gui.cpp
Show inline comments
 
@@ -86,26 +86,24 @@ enum SignListWidgets {
 
	SLW_LIST,
 
	SLW_SCROLLBAR,
 
	SLW_RESIZE,
 
};
 

	
 
struct SignListWindow : Window, SignList {
 
	int text_offset; // Offset of the sign text relative to the left edge of the SLW_LIST widget.
 

	
 
	SignListWindow(const WindowDesc *desc, WindowNumber window_number) : Window()
 
	{
 
		this->InitNested(desc, window_number);
 

	
 
		this->vscroll.SetCapacity((this->GetWidget<NWidgetBase>(SLW_LIST)->current_y - WD_FRAMERECT_TOP - WD_FRAMERECT_BOTTOM) / this->resize.step_height);
 

	
 
		/* Create initial list. */
 
		this->signs.ForceRebuild();
 
		this->signs.ForceResort();
 
		this->BuildSignsList();
 
		this->SortSignsList();
 
		this->vscroll.SetCount(this->signs.Length());
 
	}
 

	
 
	virtual void OnPaint()
 
	{
 
		this->DrawWidgets();
 
	}