1 #include "lxgui/gui_layout_node.hpp"
2 #include "lxgui/gui_out.hpp"
3 #include "lxgui/gui_parser_common.hpp"
4 #include "lxgui/gui_status_bar.hpp"
5 #include "lxgui/gui_texture.hpp"
31 if (color_node && texture_node) {
33 <<
": StatusBar can only contain one of BarTexture or BarColor, but not both. "
42 auto bar_texture =
parse_region_(defaulted,
"ARTWORK",
"Texture");
44 bar_texture->set_manually_inherited(
true);
50 }
else if (color_node) {
virtual void parse_all_nodes_before_children_(const layout_node &node)
void parse_attributes_(const layout_node &node) override
utils::observer_ptr< layered_region > parse_region_(const layout_node &node, const std::string &layer_name, const std::string &type)
std::string_view get_location() const noexcept
Returns this node's location in the file as {file}:{line}.
void bypass_access_check() const noexcept
Flag this node as "fully accessed" for later warnings; no check will be done.
An node in a layout file.
std::optional< std::string_view > try_get_attribute_value(std::string_view name) const noexcept
Returns the value of the attribute with the provided name, nullopt if not found.
std::string_view get_or_set_attribute_value(std::string_view name, std::string_view value)
Returns the value of the attribute with the provided name, or set it if none.
const layout_node * try_get_child(std::string_view name) const noexcept
Returns the first child with a given name, or null if none.
color parse_color_node_(const layout_node &node)
void set_value(float value)
Sets this status_bar's value.
void set_orientation(orientation orient)
Sets this status_bar's orientation.
void set_min_value(float min_value)
Sets this status_bar's minimum value.
void parse_all_nodes_before_children_(const layout_node &node) override
void set_bar_draw_layer(layer bar_layer)
Sets the draw layer of this status_bar's bar texture.
void set_reversed(bool reversed)
Reverses this status_bar.
void parse_attributes_(const layout_node &node) override
void set_max_value(float max_value)
Sets this status_bar's maximum value.
void set_bar_texture(utils::observer_ptr< texture > bar_texture)
Sets this status_bar's bar texture.
void set_bar_color(const color &bar_color)
Sets this status_bar's bar color.
layer
ID of a layer for rendering inside a frame.
const std::string warning
void warn_for_not_accessed_node(const layout_node &node)
Emit a warning if this node (or any of its attributes/children) was not read.