tooster-university / MoonAge

Lua strategy turn based game
MIT License
0 stars 0 forks source link

GUI framework #3

Open T3sT3ro opened 6 years ago

T3sT3ro commented 6 years ago

Add simplistic GUI framework (probably for Immediate Mode GUI) compatible with LOVE

T3sT3ro commented 6 years ago

UI element draw flowchart: old style values are calee saved UI:draw() -> saveSettings() -> setScissors(getAvailAABB()) -> setCursor() -> drawing: love.graphics...(getCursor(), ...) -> 'restoreSettings()'

where setCursor(x, y) uses relative to parent container x, y and translates it to window-relative coordinates and cursor is stored in toplevel container.

scissors must always be set to intersection of toplevel container's AABB and it's parent's availableAABB