mettli / guichan

Automatically exported from code.google.com/p/guichan
Other
0 stars 0 forks source link

Merge BasicContainer and Widget #82

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There is not really a point in having BasicContainer as most of it's 
functions needs an interface in Widget, therefore BasicContainer and 
Widgets should be merge.

Merging the two classes have several benefits: 

* Every widget will be considered a container internally in Guichan making 
it much easier to handle widgets
* Code for drawing and logic can be put in one place, the widget class, 
instead of being spread out, as the case is with BasicContainer and Widget, 
making it easier to change the way Guichan draws itself or performs logic
* As every widget will be considered a container in Guichan, taking care of  
drawing calls and logic calls for children can be handled automatically by 
the Widget class (no need for logicChildren or drawChildren calls)
* A lot of dummy code in Widget, such as getWidgetAt, can be replaced by 
proper implementations

Another benefit is that making Widget a container follows the composite 
design pattern better making Guichan more intuitive for people with design 
pattern knowledge.

Original issue reported on code.google.com by olof.nae...@gmail.com on 23 Sep 2008 at 4:33

GoogleCodeExporter commented 9 years ago
And it's done!

Original comment by olof.nae...@gmail.com on 23 Sep 2008 at 5:09