RtB/GUI

24 lines
1.3 KiB
Plaintext

GUI
----------------
As a first principle, the GUI shall accept and process coordinate inputs as floats normalized between 0 and 1. Coordinates may also be provided as integers, whereupon they shall be normalized by v_width and v_height as defined in Core.
GUI Elements shall be scaled and position based upon the same normalized coordinate inputs.
These normalized values are tied strictly to the size of the screen as returned by v_width and v_height as defined in Core.
Creation
--------
Each GUI element shall be created via the GUI, which then in turn creates a new RenderObject() for the UI RenderScene as defined in Core.
Each GUI element shall rely on a generated texture that should contain visuals to indicate the function of the element.
Modification
--------
GUI elements may have their sizes, positions, and textures modified. Texture modifications, which stem from changes in element content, cause the RenderObject's referenced texture to be updated with the new texture source.
Destruction
--------
GUI elements should be requested to be destroyed by the original context that requested their creation.
On GUI service destruction, as would be triggered by the closing of the program, all GUI elements and their corresponding RenderObjects will be destroyed.