HomeWildfire Games

Move static GUI<>::GetSetting operating on IGUIObject member to a IGUIObject…


Move static GUI<>::GetSetting operating on IGUIObject member to a IGUIObject member function, grouping it with SettingExists and AddSetting.

Differential Revision: https://code.wildfiregames.com/D2230
Tested on: gcc 9.1.0, Jenkins

Event Timeline


14:10 < V0idExp> Hi! Can someone explain me how GUI<T> class is used and what it represents?
14:11 < V0idExp> I've noticed the GUI<SGUIMessage>::RecurseObject() call and can't figure out what is its purpose
14:18 <@Philip-> I think it represents a random collection of GUI-related functions that either take a template parameter or are used by other functions in that class
14:19 < V0idExp> Aaah... I thought it was some very strange interface to all GUI elements :D
14:19 <@Philip-> RecurseObject calls a function of the form "void IGUIObject::foo(T&)" recursively on the tree of GUI objects
14:19 <@Philip-> so it's kind of an interface in that way
14:19 <@Philip-> It's just static functions, you never have an object of type GUI<T>
14:20 < V0idExp> so, it's just an utility, right?
14:20 <@Philip-> Yeah
14:20 <@Philip-> which is why it's in GUIutil.h
14:21 <@Philip-> (I think it's fairly ugly)
14:22 <@Philip-> (but not enough to motivate me to rewrite it)