GUI help

Started by
11 comments, last by BradDaBug 22 years, 4 months ago
Deriving a new class for every object that does a different thing is a pain in the arse. Suddenly, youve got 35 button classes that do almost the same thing. This is horribly inefficient. The function pointer/message queue thing is one of the cleaner methods. You could also implement the State pattern, and have a base UIState, with several members, and switch states for each action. Just derive a new state class for each thing (this still leaves you with a ton of classes that all do similar things).

Z.
______________"Evil is Loud"
Advertisement
I''ve been using the method described by lshadow, ChrisKoz and smokes. It works very well and it is much clearer when each button class only contains the stuff it really needs. I can''t see any advantage of the function pointer method.
oh, ok! I think I see now. Thanks for all the help!
I like the DARK layout!

This topic is closed to new replies.

Advertisement