Basically - I'm looking for the best game structure. Here's the idea that I have
Class - GUI - Can be customised to contain buttons and to do specific things. This can simply have an event handler function that returns the index of which button was pressed.
Class - Game Section(s) [Must be inherited] - This should be used theoretically for each part of the game that has a different menu. For example one for title screen, for normal exploring, one for the shop, etc. Each would contain maybe a few GUI's and and all the functions specific to that section. Sections may contain other sections (for example a main exploring section might contain a shop section. If the presence of a shop is detected a section.isOn variable switches on, hereby forwarding the game to the section event handlers.)
Class - Main game engine - Contains main loop and game sections. Has variables saying which game section is currently playing – This is essentially a master game section (it might even inherit a game section if you wanted to) Every loop the engine gets the currently played section, and asks for items that must be rendered (in reality, this should only be one surface) to stick onto the renderer. These sections might in turn ask their sections for render queue]
Class - Renderer - Contains a screen surface and a render function and a clear screen function. The render function takes one surface and adds it to the current screen. A clear screen function would effectively clear the screen (however, this should not nessisarily be done - as clear screen should be done manually by adding background images and throwing it into the render function).
Class - Save - Contains all information needed in the current section. When each section exits it should return its data and add it to the parent section. (This could theoretically create "save" buttons on customization benches or whatever - while providing simple access to saved material in a flexible, decentralized manner)
However - This would not be my preffered configuration - as I prefer a more centralized approach. However, efficiency and flexability must be put into mind. Thoughts?