söndag 13 februari 2011

Chrex Update

I have now fixed some bugs with stackable items and support for stackable items in the crafting window.
My current solution to my window managing system sucks.. I have two classes WindowManager and Window, every window contains the variables for all possible window types, this is fugly as hell. It will also lead to huge cpp & h files with unnecessary complexity, so i will rewrite it with polymorphism instead.
http://www.cplusplus.com/doc/tutorial/polymorphism/

Now i will do it as i should have done it from the beginning. Every window type is a own class that inherits from the window class. and the WindowManager class makes sure that all the windows behaves.

This should not take to much time (but i am sure that it will), it will just be a lot of copy & paste on my side. (at least i hope so)

Inga kommentarer:

Skicka en kommentar