orxConfig_PushSection usage

edited May 2013 in Help request
Pardon the ignorance, just wanted to double check on something:

orxConfig_PushSection("whatever") is used to 'bind' a configuration section, rather than save it, correct? In other words, once I push "whatever" all orxConfig operations will be performed upon it?


  • edited May 2013
    It's actually a very legitimate question and I'm surprised no one else asked it before!

    So yes, it works similarly as an OpenGL bind, however it also stacks the current selected section, that can (should!) then be restored by a call to orxConfig_PopSection().
    As with always with stack related calls, it's a pretty good practice to make sure calls to PushSection are balanced with PopSection once or there might be some unexpected results later on.

    To that respect, orxConfig_PushSection() *saves* the current selected section (but not its content) on an internal stack, whereas a call to orxConfig_SelectSection() will lose the info about it. However both functions will result in the same section being "bound" for further config operations.
Sign In or Register to comment.