#pragma once #include #include #include #include #include namespace ext { namespace GuiBehavior { UF_BEHAVIOR_DEFINE_TYPE; void attach( uf::Object& ); void initialize( uf::Object& ); void tick( uf::Object& ); void render( uf::Object& ); void destroy( uf::Object& ); struct Metadata { pod::Vector4f color = {1,1,1,1}; bool world = false; pod::Vector2f size = {0,0}; size_t mode = 0; struct { pod::Vector2f min = { 1, 1 }; pod::Vector2f max = { -1, -1 }; } box; bool clicked = false; bool hovered = false; pod::Vector4f uv = {0, 0, 1, 1}; size_t shader = 0; float depth = 0; float alpha = -1; std::function serialize; std::function deserialize; }; struct GlyphMetadata { std::string font = ""; std::string string = ""; float scale = 0; pod::Vector2f padding = {0,0}; float spread = 0; float size = 0; float weight = 0; bool sdf = false; bool shadowbox = false; pod::Vector4f stroke = {0,0,0,0}; std::string origin = ""; std::string align = ""; std::string direction = ""; std::function serialize; std::function deserialize; }; } }