sandbox
Loading...
Searching...
No Matches
sbx::ui::element Class Reference
Inheritance diagram for sbx::ui::element:
sbx::ui::image sbx::ui::label sbx::ui::panel sbx::ui::button

Public Member Functions

auto add_child (std::unique_ptr< element > child) -> element &
 
auto remove_child (element &child) -> void
 
auto children () const -> const std::vector< std::unique_ptr< element > > &
 
auto children () -> std::vector< std::unique_ptr< element > > &
 
auto computed_rectangle () const -> const rectangle &
 
template<typename Type , typename... Args>
requires (std::is_base_of_v<ui::layout, Type>)
auto set_layout (Args &&... args) -> Type &
 
auto clear_layout () -> void
 
auto has_layout () const -> bool
 
auto resolve_layout (const rectangle &parent_rectangle) -> void
 
auto resolve_as_arranged (const rectangle &arranged_rect) -> void
 
auto submit_tree (const math::vector2 &screen_size) -> void
 
auto process_input_tree (const math::vector2 &mouse_position, bool is_down, bool was_down) -> bool
 

Public Attributes

math::vector2 anchor_min {0.0f, 0.0f}
 
math::vector2 anchor_max {0.0f, 0.0f}
 
math::vector2 offset_min {0.0f, 0.0f}
 
math::vector2 offset_max {0.0f, 0.0f}
 
math::vector2 pivot {0.5f, 0.5f}
 
math::color color {1.0f, 1.0f, 1.0f, 1.0f}
 
std::int32_t sort_order {0}
 
bool is_enabled {true}
 
bool is_interactive {false}
 
size_hints sizing {}
 

Protected Member Functions

virtual auto submit (const math::vector2 &screen_size) -> void
 
virtual auto process_input (const math::vector2 &mouse_position, bool is_down, bool was_down) -> bool
 
auto submit_quad (const math::vector2 &screen_size, const math::vector2 &quad_position, const math::vector2 &quad_size, const math::vector2 &quad_pivot, const math::color &quad_color, std::uint32_t albedo_index, std::int32_t quad_sort_order, const math::vector2 &uv_min, const math::vector2 &uv_max, std::uint32_t flags, std::float_t sdf_px_range=0.0f) -> void
 

The documentation for this class was generated from the following files: