diff --git a/xml_converter/doc/menu/hide_category.md b/xml_converter/doc/menu/is_hidden.md similarity index 88% rename from xml_converter/doc/menu/hide_category.md rename to xml_converter/doc/menu/is_hidden.md index c1773fc9..a78b08d8 100644 --- a/xml_converter/doc/menu/hide_category.md +++ b/xml_converter/doc/menu/is_hidden.md @@ -1,9 +1,9 @@ --- -name: Hide Category +name: Is Hidden type: Boolean applies_to: [Category] xml_fields: [DefaultToggle] -protobuf_field: hide_category +protobuf_field: is_hidden custom_functions: read.xml: function: inverted_xml_attribute_to_bool diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index d81d0e9e..702e07b1 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -21,7 +21,7 @@ message Category { repeated Icon icon = 3; repeated Trail trail = 4; bool is_separator = 5; - bool hide_category = 6; + bool is_hidden = 6; string tip_description = 7; bytes id = 8; } diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 0cf59014..90be2254 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -52,7 +52,7 @@ bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectordisplay_name), &(this->display_name_is_set)); } else if (attributename == "defaulttoggle") { - inverted_xml_attribute_to_bool(attribute, errors, state, &(this->hide_category), &(this->hide_category_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->is_hidden), &(this->is_hidden_is_set)); } else if (attributename == "isseparator") { xml_attribute_to_bool(attribute, errors, state, &(this->is_separator), &(this->is_separator_is_set)); @@ -81,8 +81,8 @@ vector Category::as_xml(XMLWriterState* state) const { if (this->display_name_is_set) { xml_node_contents.push_back(string_to_xml_attribute("DisplayName", state, &this->display_name)); } - if (this->hide_category_is_set) { - xml_node_contents.push_back(bool_to_inverted_xml_attribute("DefaultToggle", state, &this->hide_category)); + if (this->is_hidden_is_set) { + xml_node_contents.push_back(bool_to_inverted_xml_attribute("DefaultToggle", state, &this->is_hidden)); } if (this->is_separator_is_set) { xml_node_contents.push_back(bool_to_xml_attribute("IsSeparator", state, &this->is_separator)); @@ -117,9 +117,9 @@ waypoint::Category Category::as_protobuf(ProtoWriterState* state) const { std::function setter = [&proto_category](std::string val) { proto_category.set_name(val); }; display_name_and_name_to_proto_display_name(this->display_name, state, setter, &(this->name), &(this->name_is_set)); } - if (this->hide_category_is_set) { - std::function setter = [&proto_category](bool val) { proto_category.set_hide_category(val); }; - bool_to_proto(this->hide_category, state, setter); + if (this->is_hidden_is_set) { + std::function setter = [&proto_category](bool val) { proto_category.set_is_hidden(val); }; + bool_to_proto(this->is_hidden, state, setter); } if (this->is_separator_is_set) { std::function setter = [&proto_category](bool val) { proto_category.set_is_separator(val); }; @@ -140,8 +140,8 @@ void Category::parse_protobuf(waypoint::Category proto_category, ProtoReaderStat if (proto_category.name() != "") { proto_display_name_to_display_name_and_name(proto_category.name(), state, &(this->display_name), &(this->display_name_is_set), &(this->name), &(this->name_is_set)); } - if (proto_category.hide_category() != 0) { - proto_to_bool(proto_category.hide_category(), state, &(this->hide_category), &(this->hide_category_is_set)); + if (proto_category.is_hidden() != 0) { + proto_to_bool(proto_category.is_hidden(), state, &(this->is_hidden), &(this->is_hidden_is_set)); } if (proto_category.is_separator() != 0) { proto_to_bool(proto_category.is_separator(), state, &(this->is_separator), &(this->is_separator_is_set)); diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 5746d2d9..3bc738cf 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -18,13 +18,13 @@ class XMLError; class Category : public Parseable { public: std::string display_name; - bool hide_category; + bool is_hidden; bool is_separator; UniqueId menu_id; std::string name; std::string tooltip_description; bool display_name_is_set = false; - bool hide_category_is_set = false; + bool is_hidden_is_set = false; bool is_separator_is_set = false; bool menu_id_is_set = false; bool name_is_set = false;