Skip to content

Commit

Permalink
changed name to is_hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
klingbolt committed Sep 8, 2024
1 parent 4237131 commit 5322ee7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion xml_converter/proto/waypoint.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
16 changes: 8 additions & 8 deletions xml_converter/src/category_gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector<X
xml_attribute_to_string(attribute, errors, state, &(this->display_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));
Expand Down Expand Up @@ -81,8 +81,8 @@ vector<string> 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));
Expand Down Expand Up @@ -117,9 +117,9 @@ waypoint::Category Category::as_protobuf(ProtoWriterState* state) const {
std::function<void(std::string)> 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<void(bool)> 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<void(bool)> 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<void(bool)> setter = [&proto_category](bool val) { proto_category.set_is_separator(val); };
Expand All @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions xml_converter/src/category_gen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5322ee7

Please sign in to comment.