(svn r16740) -Codechange: Self-sizing widgets in intro screen, town directory, and found town windows.

This commit is contained in:
alberth
2009-07-04 15:35:36 +00:00
parent 2385aeae3c
commit d65c6cae54
6 changed files with 173 additions and 34 deletions

View File

@@ -500,6 +500,20 @@ public:
*/
virtual void DrawWidget(const Rect &r, int widget) const {}
/**
* Compute size of the contents of a widget.
* If no useful size can be computed, return null-size (both width and height \c 0).
* @param widget Number of the widget to get the size of.
* @return Size of the contents of the widget.
* @note If the contents ever becomes larger than what is returned here, the window should be re-initialized (with #Window::ReInit),
* and this function should return a larger size.
*/
virtual Dimension GetWidgetContentSize(int widget)
{
Dimension d = {0, 0};
return d;
}
/**
* Called when window gains focus
*/