GUI Questions
Hi
I am begining to build a UI libraryand I have never built any UI before so I need some help.
I am not totaly sure on what is a good method of handling this, but this is how I thought of doing it:
I was going to create 1 main class called CInterface which would hold an array of pointers to UI classes like buttons. I would have functions in this class like
CInterface::Create(BUTTON, GumpID, PFN* function etc...)
Which would create a button class (simply containing the button index ID and rollover info). There would be several child classes that CInterface would handle and manage this way. To handle button and object actions, i would pass a pointer to the function that I wanted the button/object to invoke on click or whatever.
Does this sound like a good way to handle this? It doesn''t really take into account parent windows or anything like it should (yet). But is the array of pointers to objects a good thing? Or something I should stay away from?
If anyone has any pointers/ideas/words of wisdom I would love to hear it.
Thanks!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement