Currently spock engine's UI canvas's design is slightly cluttered and includes a lot of boiler blate user side.
Solution:
1) Redesign the ui canvas' elements to be addable through functions calls by the main ui_canvas_t class.
2) Create system through which all elements are controlled by restraints, which controls size and position of ui_element_t through restraints.
3) opitional- if an element already exists on screen and a new one is added, it should be automatically moved. So both can be visible and one is not not clipping inside of another.
// 1. && 2. example
ui_canvas_t* canvas = scene.canvas;
// this will make the element display in the middle of the screen
canvas->add_text("hello_world").add_horizontal_constraint(SPK_MIDDLE).add_vertical_constraint(SPK_MIDDLE);
Currently spock engine's UI canvas's design is slightly cluttered and includes a lot of boiler blate user side.
Solution: 1) Redesign the ui canvas' elements to be addable through functions calls by the main ui_canvas_t class. 2) Create system through which all elements are controlled by restraints, which controls size and position of ui_element_t through restraints. 3) opitional- if an element already exists on screen and a new one is added, it should be automatically moved. So both can be visible and one is not not clipping inside of another.