Commit Graph

5 Commits (master)

Author SHA1 Message Date
kts da53685587 Font class now can change its point-size on the fly - this obviously changes the 'state' of the Font, so subsequent draws will reflect the changes. This will likely not be a problem, as Text input will likely handle this by specifying size and color changes whenever a render operation is needed. Font also now holds the SDL_RWops object so that the font can be closed and re-opened at different sizes. Also added some minor comments in GUI. 2015-03-09 16:40:10 -07:00
kts d4ea6ce4b0 updated TODO. Gui system is as abominable as ever. Need to rework it so offset_x/offset_y contain the absolute x/y(maybe just rename to that) as created during doUpdate(). Added GuiButton/GuiList elements. The former is a basic button that (at the moment) relies on a textured image - will later have a text texture generated with SDL2_ttf. There now exists a SysInfo class, of which the global instance, sysinfo, is provided. This provides the app, user, and external data directories (still needs to be fully implemented). It also provides screen density DPI, xdpi, and ydpi, at least for Android. RenderObjects may now be shown/hidden. 2015-03-05 17:11:11 -08:00
kts a567769fcf Core now uses a state stack. States may be pushed on the stack with Core::pushState(State*) and popped off with Core::popState(). Pushing a state will trigger the old state's onCede(), push the state onto the stack, then call the new state's onInit(if DID_INIT is not set) then onRise(). Popping a state will trigger the top state's onCede and the previous state(if it exists)'s onRise. Core::doProcess now has a delta tickrate accumulator that ensures the world is processed at Core::tick_rate. Rendering is not capped to this tickrate, as doRender is called outside of the Event handling and state processing. Finally, functionality that was in Core for testing is now in TestState - it pushed onto the stack during Core::initSystem 2015-03-02 19:58:35 -08:00
kts 685c28891e GUI Notes that were forgotten. 2015-03-02 11:04:49 -08:00
kts 0142296949 Added State class and MenuState subclass. Notes added for GUI and STATES in root. iOS, OS X, android, and Linux build environments now use include directories for src/ and src/states. This is to prevent excessive clutter in the src/ directory - although some might say that point was passed long ago. 2015-03-02 01:18:01 -08:00