Kubic-C / spock_engine

C++ 2D Game Engine | Spock Engine
MIT License
7 stars 1 forks source link

FLECS Style UI creation #11

Open Kubic-C opened 1 year ago

Kubic-C commented 1 year ago

Further development of the UI design, im pushing this off later to go work on the primary focus of the engine which would be tiles.

To get to the point: allow a FLECS style creation of a UI element.

The reason I want to add this is it would simplify creation of UI elements, and reduce boiler plate. (PS i hate boiler plate)

example below

// 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);