-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invert default visibility #347
Merged
AsherGlick
merged 7 commits into
AsherGlick:xml_converter
from
klingbolt:invert_default_visibility
Sep 8, 2024
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
90e4f9c
Changed Default_toggle to hide_category in the proto
klingbolt 7800c5b
Added integrations tests
klingbolt f72024f
Added tests for the proto input field hide_category
klingbolt 352ce71
Changed name of variable in documentation and regenerated code
klingbolt 86b8d20
Merge pull request #11 from klingbolt/xml_converter
klingbolt 4237131
renamed to match new test format
klingbolt 5322ee7
changed name to is_hidden
klingbolt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: Is Hidden | ||
type: Boolean | ||
applies_to: [Category] | ||
xml_fields: [DefaultToggle] | ||
protobuf_field: is_hidden | ||
custom_functions: | ||
read.xml: | ||
function: inverted_xml_attribute_to_bool | ||
side_effects: [] | ||
write.xml: | ||
function: bool_to_inverted_xml_attribute | ||
side_effects: [] | ||
--- | ||
|
||
Notes | ||
===== | ||
If the category should be shown or hidden on or off by default. | ||
|
||
https://blishhud.com/docs/markers/attributes/defaulttoggle | ||
|
||
|
9 changes: 9 additions & 0 deletions
9
xml_converter/integration_tests/test_cases/proto_hide_category/input/pack/markers.bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
xml_converter/integration_tests/test_cases/proto_hide_category/output_proto/markers.bin
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Full Diff--- xml_converter/integration_tests/test_cases/proto_hide_category/output_proto/markers.bin.textproto._old 2024-09-08 00:48:04.795466321 +0000
+++ xml_converter/integration_tests/test_cases/proto_hide_category/output_proto/markers.bin.textproto._new 2024-09-08 00:48:04.803466295 +0000
@@ -0,0 +1,50 @@
+category {
+ name: "My Category"
+ icon {
+ map_id: 50
+ position {
+ x: 169.81
+ y: 210.65
+ z: 215.83
+ }
+ }
+ default_visibility: true
+ id: "(\350\314\006\302\223^\226"
+}
+category {
+ name: "My Category 2"
+ icon {
+ map_id: 50
+ position {
+ x: 169.81
+ y: 210.65
+ z: 215.83
+ }
+ }
+ id: "(\355i\3404\0141b"
+}
+category {
+ name: "My Category 3"
+ icon {
+ map_id: 50
+ position {
+ x: 169.81
+ y: 210.65
+ z: 215.83
+ }
+ }
+ default_visibility: true
+ id: "(\355i\3405\0141b"
+}
+category {
+ name: "My Category 4"
+ icon {
+ map_id: 50
+ position {
+ x: 169.81
+ y: 210.65
+ z: 215.83
+ }
+ }
+ id: "(\355i\3406\0141b"
+}
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
xml_converter/integration_tests/test_cases/proto_hide_category/output_xml/xml_file.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<OverlayData> | ||
<MarkerCategory DisplayName="My Category" DefaultToggle="false" ID="KOjMBsKTXpY=" Name="mycategory"> | ||
</MarkerCategory> | ||
|
||
<MarkerCategory DisplayName="My Category 2" ID="KO1p4DQMMWI=" Name="mycategory2"> | ||
</MarkerCategory> | ||
|
||
<MarkerCategory DisplayName="My Category 3" DefaultToggle="false" ID="KO1p4DUMMWI=" Name="mycategory3"> | ||
</MarkerCategory> | ||
|
||
<MarkerCategory DisplayName="My Category 4" ID="KO1p4DYMMWI=" Name="mycategory4"> | ||
</MarkerCategory> | ||
|
||
<POIs> | ||
<POI Type="mycategory" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/> | ||
<POI Type="mycategory2" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/> | ||
<POI Type="mycategory3" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/> | ||
<POI Type="mycategory4" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/> | ||
</POIs> | ||
</OverlayData> |
5 changes: 5 additions & 0 deletions
5
xml_converter/integration_tests/test_cases/proto_hide_category/testcase.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
input_paths: | ||
"pack": "proto" | ||
expected_stdout: | | ||
expected_stderr: | | ||
expected_returncode: 0 |
16 changes: 16 additions & 0 deletions
16
xml_converter/integration_tests/test_cases/xml_default_toggle/input/pack/xml_file.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<OverlayData> | ||
<MarkerCategory DisplayName="My Category" DefaultToggle="false" Name="mycategory"> | ||
</MarkerCategory> | ||
<MarkerCategory DisplayName="My Category 2" DefaultToggle="true" Name="mycategory2"> | ||
</MarkerCategory> | ||
<MarkerCategory DisplayName="My Category 3" DefaultToggle="0" Name="mycategory3"> | ||
</MarkerCategory> | ||
<MarkerCategory DisplayName="My Category 4" DefaultToggle="1" Name="mycategory4"> | ||
</MarkerCategory> | ||
<POIs> | ||
<POI Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" /> | ||
<POI Type="mycategory2" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" /> | ||
<POI Type="mycategory3" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" /> | ||
<POI Type="mycategory4" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" /> | ||
</POIs> | ||
</OverlayData> |
9 changes: 9 additions & 0 deletions
9
xml_converter/integration_tests/test_cases/xml_default_toggle/output_proto/markers.bin
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Full Diff--- xml_converter/integration_tests/test_cases/xml_default_toggle/output_proto/markers.bin.textproto._old 2024-09-08 00:48:04.807466282 +0000
+++ xml_converter/integration_tests/test_cases/xml_default_toggle/output_proto/markers.bin.textproto._new 2024-09-08 00:48:04.815466255 +0000
@@ -0,0 +1,50 @@
+category {
+ name: "My Category"
+ icon {
+ map_id: 50
+ position {
+ x: 169.81
+ y: 210.65
+ z: 215.83
+ }
+ }
+ default_visibility: true
+ id: "(\350\314\006\302\223^\226"
+}
+category {
+ name: "My Category 2"
+ icon {
+ map_id: 50
+ position {
+ x: 169.81
+ y: 210.65
+ z: 215.83
+ }
+ }
+ id: "(\355i\3404\0141b"
+}
+category {
+ name: "My Category 3"
+ icon {
+ map_id: 50
+ position {
+ x: 169.81
+ y: 210.65
+ z: 215.83
+ }
+ }
+ default_visibility: true
+ id: "(\355i\3405\0141b"
+}
+category {
+ name: "My Category 4"
+ icon {
+ map_id: 50
+ position {
+ x: 169.81
+ y: 210.65
+ z: 215.83
+ }
+ }
+ id: "(\355i\3406\0141b"
+}
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
xml_converter/integration_tests/test_cases/xml_default_toggle/output_xml/xml_file.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<OverlayData> | ||
<MarkerCategory DisplayName="My Category" DefaultToggle="false" ID="KOjMBsKTXpY=" Name="mycategory"> | ||
</MarkerCategory> | ||
|
||
<MarkerCategory DisplayName="My Category 2" DefaultToggle="true" ID="KO1p4DQMMWI=" Name="mycategory2"> | ||
</MarkerCategory> | ||
|
||
<MarkerCategory DisplayName="My Category 3" DefaultToggle="false" ID="KO1p4DUMMWI=" Name="mycategory3"> | ||
</MarkerCategory> | ||
|
||
<MarkerCategory DisplayName="My Category 4" DefaultToggle="true" ID="KO1p4DYMMWI=" Name="mycategory4"> | ||
</MarkerCategory> | ||
|
||
<POIs> | ||
<POI Type="mycategory" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/> | ||
<POI Type="mycategory2" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/> | ||
<POI Type="mycategory3" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/> | ||
<POI Type="mycategory4" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/> | ||
</POIs> | ||
</OverlayData> |
5 changes: 5 additions & 0 deletions
5
xml_converter/integration_tests/test_cases/xml_default_toggle/testcase.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
input_paths: | ||
"pack": "xml" | ||
expected_stdout: | | ||
expected_stderr: | | ||
expected_returncode: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Full Diff