From fc48919b386356e9917370004c234d9c481bccff Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sat, 6 May 2023 14:22:45 +0200 Subject: [PATCH 01/22] updated navigation overlay name --- objects/OptionPanelSource.830bd0.json | 2 +- ...ffa.json => NavigationOverlay.a8affa.json} | 6 ++--- .../CameraPlacementHelper.cecc3e.json | 2 +- .../CameraPlacementHelper.cecc3e.ttslua | 0 .../NavigationOverlay.e5803c.json | 0 .../NavigationOverlayTile.9f2481.json} | 6 ++--- .../accessories/NavigationOverlay.ttslua | 0 src/core/Global.ttslua | 22 +++++++++---------- 8 files changed, 19 insertions(+), 19 deletions(-) rename objects/OptionPanelSource.830bd0/{jaqenZannsNavigationOverlay.a8affa.json => NavigationOverlay.a8affa.json} (89%) rename objects/OptionPanelSource.830bd0/{jaqenZannsNavigationOverlay.a8affa => NavigationOverlay.a8affa}/CameraPlacementHelper.cecc3e.json (91%) rename objects/OptionPanelSource.830bd0/{jaqenZannsNavigationOverlay.a8affa => NavigationOverlay.a8affa}/CameraPlacementHelper.cecc3e.ttslua (100%) rename objects/OptionPanelSource.830bd0/{jaqenZannsNavigationOverlay.a8affa => NavigationOverlay.a8affa}/NavigationOverlay.e5803c.json (100%) rename objects/OptionPanelSource.830bd0/{jaqenZannsNavigationOverlay.a8affa/jaqenZannsNavigationOverlayTile.9f2481.json => NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json} (86%) rename objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/jaqenZannsNavigationOverlayTile.9f2481.ttslua => src/accessories/NavigationOverlay.ttslua (100%) diff --git a/objects/OptionPanelSource.830bd0.json b/objects/OptionPanelSource.830bd0.json index 119dd01c..e71eea07 100644 --- a/objects/OptionPanelSource.830bd0.json +++ b/objects/OptionPanelSource.830bd0.json @@ -18,7 +18,7 @@ "TokenArranger.022907", "CYOACampaignGuides.e87ea2", "AttachmentHelper.7f4976", - "jaqenZannsNavigationOverlay.a8affa", + "NavigationOverlay.a8affa", "SearchAssistant.17aed0", "HandHelper.450688", "DisplacementTool.0f1374", diff --git a/objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa.json b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa.json similarity index 89% rename from objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa.json rename to objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa.json index 1fa2aa26..4964bf4a 100644 --- a/objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa.json +++ b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa.json @@ -16,9 +16,9 @@ "ContainedObjects_order": [ "NavigationOverlay.e5803c", "CameraPlacementHelper.cecc3e", - "jaqenZannsNavigationOverlayTile.9f2481" + "NavigationOverlayTile.9f2481" ], - "ContainedObjects_path": "jaqenZannsNavigationOverlay.a8affa", + "ContainedObjects_path": "NavigationOverlay.a8affa", "Description": "", "DragSelectable": true, "GMNotes": "", @@ -53,4 +53,4 @@ }, "Value": 0, "XmlUI": "" -} +} \ No newline at end of file diff --git a/objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.json b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.json similarity index 91% rename from objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.json rename to objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.json index f3ff8eb3..f6ead70c 100644 --- a/objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.json +++ b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.json @@ -29,7 +29,7 @@ "LayoutGroupSortIndex": 0, "Locked": false, "LuaScriptState": "", - "LuaScript_path": "OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.ttslua", + "LuaScript_path": "OptionPanelSource.830bd0/NavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.ttslua", "MeasureMovement": false, "Name": "Custom_Assetbundle", "Nickname": "Camera Placement Helper", diff --git a/objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.ttslua b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.ttslua similarity index 100% rename from objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.ttslua rename to objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.ttslua diff --git a/objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/NavigationOverlay.e5803c.json b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlay.e5803c.json similarity index 100% rename from objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/NavigationOverlay.e5803c.json rename to objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlay.e5803c.json diff --git a/objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/jaqenZannsNavigationOverlayTile.9f2481.json b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json similarity index 86% rename from objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/jaqenZannsNavigationOverlayTile.9f2481.json rename to objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json index 7f6f1c4f..d24fb331 100644 --- a/objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/jaqenZannsNavigationOverlayTile.9f2481.json +++ b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json @@ -33,11 +33,11 @@ "IgnoreFoW": false, "LayoutGroupSortIndex": 0, "Locked": false, + "LuaScript": "require(\"accessories/NavigationOverlay\")", "LuaScriptState": "", - "LuaScript_path": "OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/jaqenZannsNavigationOverlayTile.9f2481.ttslua", "MeasureMovement": false, "Name": "Custom_Tile", - "Nickname": "jaqenZann's Navigation Overlay Tile", + "Nickname": "Navigation Overlay Tile", "Snap": false, "Sticky": true, "Tooltip": true, @@ -54,4 +54,4 @@ }, "Value": 0, "XmlUI": "" -} +} \ No newline at end of file diff --git a/objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/jaqenZannsNavigationOverlayTile.9f2481.ttslua b/src/accessories/NavigationOverlay.ttslua similarity index 100% rename from objects/OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/jaqenZannsNavigationOverlayTile.9f2481.ttslua rename to src/accessories/NavigationOverlay.ttslua diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index 4bc56b9f..08b2e5ef 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -888,7 +888,7 @@ function applyOptionPanelChange(id, state) -- option: Show navigation overlay elseif id == "showNavigationOverlay" then - optionPanel[id] = spawnOrRemoveHelper(state, "jaqenZann's Navigation Overlay", {-68, 1.4, -70}) + optionPanel[id] = spawnOrRemoveHelper(state, "Navigation Overlay", {-68, 1.4, -70}) -- option: Show CYOA campaign guides elseif id == "showCYOA" then @@ -954,16 +954,16 @@ end function removeHelperObject(name) -- links objects name to the respective option name (to grab the GUID for removal) local referenceTable = { - ["Token Arranger"] = "showTokenArranger", - ["Clean Up Helper"] = "showCleanUpHelper", - ["Hand Helper"] = "showHandHelper", - ["Search Assistant"] = "showSearchAssistant", - ["Chaos Bag Manager"] = "showChaosBagManager", - ["jaqenZann's Navigation Overlay"] = "showNavigationOverlay", - ["Displacement Tool"] = "showDisplacementTool", - ["Custom Playmat Images"] = "showCustomPlaymatImages", - ["Attachment Helper"] = "showAttachmentHelper", - ["CYOA Campaign Guides"] = "showCYOA" + ["Token Arranger"] = "showTokenArranger", + ["Clean Up Helper"] = "showCleanUpHelper", + ["Hand Helper"] = "showHandHelper", + ["Search Assistant"] = "showSearchAssistant", + ["Chaos Bag Manager"] = "showChaosBagManager", + ["Navigation Overlay"] = "showNavigationOverlay", + ["Displacement Tool"] = "showDisplacementTool", + ["Custom Playmat Images"] = "showCustomPlaymatImages", + ["Attachment Helper"] = "showAttachmentHelper", + ["CYOA Campaign Guides"] = "showCYOA" } local data = optionPanel[referenceTable[name]] From 71bd43baf787be2ea6b5f889408814122d8ed7cc Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sat, 6 May 2023 14:26:01 +0200 Subject: [PATCH 02/22] updated name --- objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa.json | 2 +- .../CameraPlacementHelper.cecc3e.ttslua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa.json b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa.json index 4964bf4a..9a501b24 100644 --- a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa.json +++ b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa.json @@ -36,7 +36,7 @@ "MeasureMovement": false, "MeshIndex": -1, "Name": "Bag", - "Nickname": "jaqenZann's Navigation Overlay", + "Nickname": "Navigation Overlay", "Snap": true, "Sticky": true, "Tooltip": true, diff --git a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.ttslua b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.ttslua index 2f40b35c..21236238 100644 --- a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.ttslua +++ b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/CameraPlacementHelper.cecc3e.ttslua @@ -84,7 +84,7 @@ function click_setCamera(_, color) --Send values to main tile for _, v in ipairs(getObjects()) do - if v.getName() == "jaqenZann's Navigation Overlay Tile" then + if v.getName() == "Navigation Overlay Tile" then v.call('updateEditCamera', { { pos.x, pos.y, pos.z }, tonumber(pitch), rot.y, tonumber(distance) }) break end From 3c6d890b165003575d46387d288d8b0e19b9b97e Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sat, 6 May 2023 15:44:30 +0200 Subject: [PATCH 03/22] xml split, code cleanup (WIP) --- .../NavigationOverlayTile.9f2481.json | 14 +- .../NavigationOverlayTile.9f2481.xml | 27 + src/accessories/NavigationOverlay.ttslua | 609 +++++++----------- 3 files changed, 272 insertions(+), 378 deletions(-) create mode 100644 objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.xml diff --git a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json index d24fb331..9e9f215a 100644 --- a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json +++ b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json @@ -22,6 +22,18 @@ "ImageURL": "http://cloud-3.steamusercontent.com/ugc/2021591230456185506/15AF790F0622B57C1F629DB3A8C38F2A99D0EB1B/", "WidthScale": 0 }, + "CustomUIAssets": [ + { + "Name": "OverlayLarge", + "Type": 0, + "URL": "http://cloud-3.steamusercontent.com/ugc/2021591230441678995/7B413A821136969D8723687A2AD66773B3F8FEED/" + }, + { + "Name": "OverlaySmall", + "Type": 0, + "URL": "http://cloud-3.steamusercontent.com/ugc/2021591230447630077/18C86248B9BDAF1DE01B67791439A39EE4F97B60/" + } + ], "Description": "", "DragSelectable": true, "GMNotes": "", @@ -53,5 +65,5 @@ "scaleZ": 3 }, "Value": 0, - "XmlUI": "" + "XmlUI_path": "OptionPanelSource.830bd0/NavigationOverlayTile.9f2481.xml" } \ No newline at end of file diff --git a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.xml b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.xml new file mode 100644 index 00000000..888892be --- /dev/null +++ b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + diff --git a/src/accessories/NavigationOverlay.ttslua b/src/accessories/NavigationOverlay.ttslua index c3e50f27..67bbd906 100644 --- a/src/accessories/NavigationOverlay.ttslua +++ b/src/accessories/NavigationOverlay.ttslua @@ -1,228 +1,196 @@ -local buttonCount = 20 -local cameraCount = 18 +local playAreaApi = require("core/PlayAreaApi") +local playmatApi = require("playermat/PlaymatApi") -function onLoad(saved_data) - self.createButton({ - label = "", - tooltip = "Display full overlay", - click_function = "displayFull", - function_owner = self, - position = { 0.0, 0.1, -0.63 }, - height = 70, - width = 700, - scale = { x = 1, y = 1, z = 1 }, - color = { 1, 0, 0, 0 } - }) - self.createButton({ - label = "", - tooltip = "Display only play area", - click_function = "displayPlayArea", - function_owner = self, - position = { 0.0, 0.1, -0.39 }, - height = 70, - width = 700, - scale = { x = 1, y = 1, z = 1 }, - color = { 1, 0, 0, 0 } - }) - self.createButton({ - label = "", - tooltip = "Close overlay", - click_function = "closeOverlay", - function_owner = self, - position = { 0.0, 0.1, -0.16 }, - height = 70, - width = 700, - scale = { x = 1, y = 1, z = 1 }, - color = { 1, 0, 0, 0 } - }) - self.createButton({ - label = "", - tooltip = "Modify a camera position", - click_function = "beginSetCamera", - function_owner = self, - position = { 0.0, 0.1, 0.19 }, - height = 70, - width = 700, - scale = { x = 1, y = 1, z = 1 }, - color = { 1, 0, 0, 0 } - }) - self.createButton({ - label = "", - tooltip = "Claim a color (you will switch to this color when clicking in the overlay)", - click_function = "beginClaimColor", - function_owner = self, - position = { -0.22, 0.1, 0.42 }, - height = 70, - width = 475, - scale = { x = 1, y = 1, z = 1 }, - color = { 1, 0, 0, 0 } - }) - self.createButton({ - label = "", - tooltip = "Reset all color claims", - click_function = "resetClaimColors", - function_owner = self, - position = { 0.48, 0.1, 0.42 }, - height = 70, - width = 230, - scale = { x = 1, y = 1, z = 1 }, - color = { 1, 0, 0, 0 } - }) - self.createButton({ - label = "", - tooltip = "Reset camera positions to default", - click_function = "resetCameras", - function_owner = self, - position = { 0.0, 0.1, 0.78 }, - height = 70, - width = 700, - scale = { x = 1, y = 1, z = 1 }, - color = { 1, 0, 0, 0 } - }) +fullButtonData = { + { id = "1", width = "84", height = "33", offsetX = "1", offsetY = "2" }, -- Act/Agenda + { id = "2", width = "78", height = "69", offsetX = "1", offsetY = "-62" }, -- Map + { id = "3", width = "36", height = "70", offsetX = "-62", offsetY = "-66" }, -- Green + { id = "4", width = "70", height = "36", offsetX = "-36", offsetY = "-126" }, -- White + { id = "5", width = "70", height = "36", offsetX = "39", offsetY = "-126" }, -- Orange + { id = "6", width = "36", height = "70", offsetX = "64", offsetY = "-66" }, -- Red + { id = "7", width = "38", height = "38", offsetX = "-64", offsetY = "-3" }, -- Victory + { id = "8", width = "40", height = "40", offsetX = "66", offsetY = "-3" }, -- Guide + { id = "9", width = "56", height = "16", offsetX = "1", offsetY = "-20" }, -- Player count + { id = "10", width = "36", height = "16", offsetX = "1", offsetY = "-102" }, -- Bless/Curse + { id = "11", width = "168", height = "56", offsetX = "1", offsetY = "47" }, -- Scenarios + { id = "12", width = "52", height = "53", offsetX = "-154", offsetY = "134" }, -- Player card panel + { id = "13", width = "22", height = "22", offsetX = "-116", offsetY = "132" }, -- Search card panel + { id = "14", width = "120", height = "75", offsetX = "-152", offsetY = "70" }, -- Player card display + { id = "15", width = "40", height = "54", offsetX = "-150", offsetY = "-38" }, -- Deck builder + { id = "16", width = "104", height = "84", offsetX = "-154", offsetY = "-114" }, -- Rules area + { id = "17", width = "100", height = "170", offsetX = "152", offsetY = "72" }, -- Cycle area + { id = "18", width = "56", height = "60", offsetX = "182", offsetY = "-124" }, -- Additions + { id = "19", width = "20", height = "20", offsetX = "-8", offsetY = "150" }, -- Shrink + { id = "20", width = "20", height = "20", offsetX = "12", offsetY = "150" } -- Close +} - defaultCameraParams = { - { position = { -1.626, -2.5, 0 }, pitch = 74, yaw = 90, distance = 17.844 }, -- 1. ActAgenda - { position = { -27.822, -2.5, 0.424 }, pitch = 74, yaw = 90, distance = -1 }, -- 2. Map - { position = { -31.592, -2.5, 26.392 }, pitch = 74, yaw = 180, distance = -1 }, -- 3. Green playmat - { position = { -55.026, -2.5, 12.052 }, pitch = 74, yaw = 90, distance = -1 }, -- 4. White playmat - { position = { -55.026, -2.5, -11.479 }, pitch = 74, yaw = 90, distance = -1 }, -- 5. Orange playmat - { position = { -31.592, -2.5, -26.392 }, pitch = 74, yaw = 0, distance = -1 }, -- 6. Red playmat - { position = { -3.029, 1.652, 24.296 }, pitch = 74, yaw = 90, distance = 16 }, -- 7. Victory / SetAside - { position = { -2.936, 1.552, -26.757 }, pitch = 74, yaw = 90, distance = 16 }, -- 8. Guide - { position = { -11.833, 1.491, -0.145 }, pitch = 74, yaw = 90, distance = 10 }, -- 9. Player count - { position = { -48.352, 1.552, -0.055 }, pitch = 74, yaw = 90, distance = 10 }, -- 10. Bless/Curse - { position = { 12.560, 1.912, 0.458 }, pitch = 74, yaw = 90, distance = 35 }, -- 11. Scenarios - { position = { 57.835, 1.552, 75.385 }, pitch = 74, yaw = 90, distance = 22 }, -- 12. Player card panel - { position = { 60.377, 1.552, 55.941 }, pitch = 74, yaw = 90, distance = 10 }, -- 13. Card search panel - { position = { 27.482, 1.480, 71.057 }, pitch = 74, yaw = 90, distance = 35 }, -- 14. Player card area - { position = { -19.481, 1.552, 70.880 }, pitch = 74, yaw = 90, distance = 22 }, -- 15. Deck builder - { position = { -52.918, 1.478, 70.899 }, pitch = 74, yaw = 90, distance = 42 }, -- 16. Rules area - { position = { 24.551, 2.222, -71.284 }, pitch = 60, yaw = 90, distance = 60 }, -- 17. Cycle area - { position = { -59.077, 1.462, -85.472 }, pitch = 74, yaw = 90, distance = 27 } -- 18. Additions +playButtonData = { + { id = "1", width = "80", height = "33", offsetX = "0", offsetY = "55" }, + { id = "2", width = "78", height = "70", offsetX = "0", offsetY = "-8" }, + { id = "3", width = "35", height = "66", offsetX = "-65", offsetY = "-10" }, + { id = "4", width = "68", height = "32", offsetX = "-36", offsetY = "-71" }, + { id = "5", width = "68", height = "32", offsetX = "36", offsetY = "-71" }, + { id = "6", width = "35", height = "66", offsetX = "65", offsetY = "-10" }, + { id = "7", width = "38", height = "38", offsetX = "-66", offsetY = "52" }, + { id = "8", width = "38", height = "38", offsetX = "66", offsetY = "52" }, + { id = "9", width = "50", height = "12", offsetX = "0", offsetY = "33" }, + { id = "10", width = "32", height = "12", offsetX = "0", offsetY = "-48" }, + { id = "19", width = "20", height = "20", offsetX = "-10", offsetY = "80" }, + { id = "20", width = "20", height = "20", offsetX = "10", offsetY = "80" } +} + +playermatData = { + { + guid = '383d8b', + origin = { x = -25.00, y = 0, z = 26.20 }, + scale = { x = 31.5, y = 5.10, z = 14.59 }, + orientation = { x = 0, y = 0, z = 0 }, + minX = -44.43, + maxX = -17.44, + minZ = 20.17, + maxZ = 32.97, + xOffset = -0.07, + zOffset = 0.00, + claims = { true, false, false, false } + }, + { + guid = '8b081b', + origin = { x = -54.42, y = 0, z = 20.96 }, + scale = { x = 36.63, y = 5.10, z = 14.59 }, + orientation = { x = 0, y = 270, z = 0 }, + minX = -61.4, + maxX = -48.6, + minZ = -2.39, + maxZ = 24.53, + xOffset = 0.07, + zOffset = 0.03, + claims = { false, true, false, false } + }, + { + guid = 'bd0ff4', + origin = { x = -54.42, y = 0, z = -20.96 }, + scale = { x = 36.63, y = 5.10, z = 14.59 }, + orientation = { x = 0, y = 270, z = 0 }, + minX = -61.4, + maxX = -48.6, + minZ = -24.53, + maxZ = 2.39, + xOffset = 0.07, + zOffset = 0.02, + claims = { false, false, true, false } + }, + { + guid = '0840d5', + origin = { x = -25.00, y = 0, z = -26.60 }, + scale = { x = 31.5, y = 5.10, z = 14.59 }, + orientation = { x = 0, y = 180, z = 0 }, + minX = -44.43, + maxX = -17.44, + minZ = -32.97, + maxZ = -20.17, + xOffset = 0.07, + zOffset = -0.06, + claims = { false, false, false, true } } +} - fullButtonData = { - { id = "1", width = "84", height = "33", offsetX = "1", offsetY = "2" }, -- Act/Agenda - { id = "2", width = "78", height = "69", offsetX = "1", offsetY = "-62" }, -- Map - { id = "3", width = "36", height = "70", offsetX = "-62", offsetY = "-66" }, -- Green - { id = "4", width = "70", height = "36", offsetX = "-36", offsetY = "-126" }, -- White - { id = "5", width = "70", height = "36", offsetX = "39", offsetY = "-126" }, -- Orange - { id = "6", width = "36", height = "70", offsetX = "64", offsetY = "-66" }, -- Red - { id = "7", width = "38", height = "38", offsetX = "-64", offsetY = "-3" }, -- Victory - { id = "8", width = "40", height = "40", offsetX = "66", offsetY = "-3" }, -- Guide - { id = "9", width = "56", height = "16", offsetX = "1", offsetY = "-20" }, -- Player count - { id = "10", width = "36", height = "16", offsetX = "1", offsetY = "-102" }, -- Bless/Curse - { id = "11", width = "168", height = "56", offsetX = "1", offsetY = "47" }, -- Scenarios - { id = "12", width = "52", height = "53", offsetX = "-154", offsetY = "134" }, -- Player card panel - { id = "13", width = "22", height = "22", offsetX = "-116", offsetY = "132" }, -- Search card panel - { id = "14", width = "120", height = "75", offsetX = "-152", offsetY = "70" }, -- Player card display - { id = "15", width = "40", height = "54", offsetX = "-150", offsetY = "-38" }, -- Deck builder - { id = "16", width = "104", height = "84", offsetX = "-154", offsetY = "-114" }, -- Rules area - { id = "17", width = "100", height = "170", offsetX = "152", offsetY = "72" }, -- Cycle area - { id = "18", width = "56", height = "60", offsetX = "182", offsetY = "-124" }, -- Additions - { id = "19", width = "20", height = "20", offsetX = "-8", offsetY = "150" }, -- Shrink - { id = "20", width = "20", height = "20", offsetX = "12", offsetY = "150" } -- Close - } +defaultCameraParams = { + { position = { -1.626, -2.5, 0 }, pitch = 74, yaw = 90, distance = 18 }, -- 1. ActAgenda + { position = { -27.822, -2.5, 0.424 }, pitch = 74, yaw = 90, distance = -1 }, -- 2. Map + { position = { -31.592, -2.5, 26.392 }, pitch = 74, yaw = 180, distance = -1 }, -- 3. Green playmat + { position = { -55.026, -2.5, 12.052 }, pitch = 74, yaw = 90, distance = -1 }, -- 4. White playmat + { position = { -55.026, -2.5, -11.479 }, pitch = 74, yaw = 90, distance = -1 }, -- 5. Orange playmat + { position = { -31.592, -2.5, -26.392 }, pitch = 74, yaw = 0, distance = -1 }, -- 6. Red playmat + { position = { -3.029, 1.652, 24.296 }, pitch = 74, yaw = 90, distance = 16 }, -- 7. Victory / SetAside + { position = { -2.936, 1.552, -26.757 }, pitch = 74, yaw = 90, distance = 16 }, -- 8. Guide + { position = { -11.833, 1.491, -0.145 }, pitch = 74, yaw = 90, distance = 10 }, -- 9. Player count + { position = { -48.352, 1.552, -0.055 }, pitch = 74, yaw = 90, distance = 10 }, -- 10. Bless/Curse + { position = { 12.560, 1.912, 0.458 }, pitch = 74, yaw = 90, distance = 35 }, -- 11. Scenarios + { position = { 57.835, 1.552, 75.385 }, pitch = 74, yaw = 90, distance = 22 }, -- 12. Player card panel + { position = { 60.377, 1.552, 55.941 }, pitch = 74, yaw = 90, distance = 10 }, -- 13. Card search panel + { position = { 27.482, 1.480, 71.057 }, pitch = 74, yaw = 90, distance = 35 }, -- 14. Player card area + { position = { -19.481, 1.552, 70.880 }, pitch = 74, yaw = 90, distance = 22 }, -- 15. Deck builder + { position = { -52.918, 1.478, 70.899 }, pitch = 74, yaw = 90, distance = 42 }, -- 16. Rules area + { position = { 24.551, 2.222, -71.284 }, pitch = 60, yaw = 90, distance = 60 }, -- 17. Cycle area + { position = { -59.077, 1.462, -85.472 }, pitch = 74, yaw = 90, distance = 27 } -- 18. Additions +} - playButtonData = { - { id = "1", width = "80", height = "33", offsetX = "0", offsetY = "55" }, - { id = "2", width = "78", height = "70", offsetX = "0", offsetY = "-8" }, - { id = "3", width = "35", height = "66", offsetX = "-65", offsetY = "-10" }, - { id = "4", width = "68", height = "32", offsetX = "-36", offsetY = "-71" }, - { id = "5", width = "68", height = "32", offsetX = "36", offsetY = "-71" }, - { id = "6", width = "35", height = "66", offsetX = "65", offsetY = "-10" }, - { id = "7", width = "38", height = "38", offsetX = "-66", offsetY = "52" }, - { id = "8", width = "38", height = "38", offsetX = "66", offsetY = "52" }, - { id = "9", width = "50", height = "12", offsetX = "0", offsetY = "33" }, - { id = "10", width = "32", height = "12", offsetX = "0", offsetY = "-48" }, - { id = "19", width = "20", height = "20", offsetX = "-10", offsetY = "80" }, - { id = "20", width = "20", height = "20", offsetX = "10", offsetY = "80" } - } +editing = false +claiming = false +selectedEditButton = -1 +editPos = { 0, 0, 0 } +editPitch = 0 +editYaw = 0 +editDistance = 0 - playermatData = { - { - guid = '383d8b', - origin = { x = -25.00, y = 0, z = 26.20 }, - scale = { x = 31.5, y = 5.10, z = 14.59 }, - orientation = { x = 0, y = 0, z = 0 }, - minX = -44.43, - maxX = -17.44, - minZ = 20.17, - maxZ = 32.97, - xOffset = -0.07, - zOffset = 0.00, - claims = { true, false, false, false } - }, - { - guid = '8b081b', - origin = { x = -54.42, y = 0, z = 20.96 }, - scale = { x = 36.63, y = 5.10, z = 14.59 }, - orientation = { x = 0, y = 270, z = 0 }, - minX = -61.4, - maxX = -48.6, - minZ = -2.39, - maxZ = 24.53, - xOffset = 0.07, - zOffset = 0.03, - claims = { false, true, false, false } - }, - { - guid = 'bd0ff4', - origin = { x = -54.42, y = 0, z = -20.96 }, - scale = { x = 36.63, y = 5.10, z = 14.59 }, - orientation = { x = 0, y = 270, z = 0 }, - minX = -61.4, - maxX = -48.6, - minZ = -24.53, - maxZ = 2.39, - xOffset = 0.07, - zOffset = 0.02, - claims = { false, false, true, false } - }, - { - guid = '0840d5', - origin = { x = -25.00, y = 0, z = -26.60 }, - scale = { x = 31.5, y = 5.10, z = 14.59 }, - orientation = { x = 0, y = 180, z = 0 }, - minX = -44.43, - maxX = -17.44, - minZ = -32.97, - maxZ = -20.17, - xOffset = 0.07, - zOffset = -0.06, - claims = { false, false, false, true } - } - } +function onLoad(savedData) + local buttonParameters = {} + buttonParameters.function_owner = self + buttonParameters.label = "" - editing = false - claiming = false - selectedEditButton = -1 - editPos = { 0, 0, 0 } - editPitch = 0 - editYaw = 0 - editDistance = 0 + -- index 0: Full Area + buttonParameters.tooltip = "Display full overlay" + buttonParameters.click_function = "displayFull" + buttonParameters.position = { x = 0, y = 0.1, z = -0.63 } + buttonParameters.height = 70 + buttonParameters.width = 700 + buttonParameters.color = { 1, 0, 0, 0 } + self.createButton(buttonParameters) - if saved_data ~= "" then - local loaded_data = JSON.decode(saved_data) - cameraParams = loaded_data.cameras - fullVisibility = loaded_data.fullVis - playVisibility = loaded_data.playVis + -- index 1: Play Area + buttonParameters.tooltip = "Display only play area" + buttonParameters.click_function = "displayPlayArea" + buttonParameters.position = { x = 0, y = 0.1, z = -0.39 } + self.createButton(buttonParameters) + + -- index 2: Close Overlay + buttonParameters.tooltip = "Close overlay" + buttonParameters.click_function = "closeOverlay" + buttonParameters.position = { x = 0, y = 0.1, z = -0.16 } + self.createButton(buttonParameters) + + -- index 3: Modify Camera + buttonParameters.tooltip = "Modify a camera position" + buttonParameters.click_function = "beginSetCamera" + buttonParameters.position = { x = 0, y = 0.1, z = 0.19 } + self.createButton(buttonParameters) + + -- index 4: Claim a color + buttonParameters.tooltip = "Claim a color (you will switch to this color when clicking in the overlay)" + buttonParameters.click_function = "beginClaimColor" + buttonParameters.width = 475 + buttonParameters.position = { x = -0.22, y = 0.1, z = 0.42 } + self.createButton(buttonParameters) + + -- index 4: Reset color claims + buttonParameters.tooltip = "Reset all color claims" + buttonParameters.click_function = "resetClaimColors" + buttonParameters.width = 230 + buttonParameters.position = { x = 0.48, y = 0.1, z = 0.42 } + self.createButton(buttonParameters) + + -- index 5: Reset camera positions + buttonParameters.tooltip = "Reset camera positions to default" + buttonParameters.click_function = "resetCameras" + buttonParameters.width = 700 + buttonParameters.position = { x = 0, y = 0.1, z = 0.78 } + self.createButton(buttonParameters) + + if savedData ~= "" then + local loadedData = JSON.decode(savedData) + cameraParams = loadedData.cameras + fullVisibility = loadedData.fullVis + playVisibility = loadedData.playVis for i = 1, 4 do - playermatData[i].claims = loaded_data.claims[i] + playermatData[i].claims = loadedData.claims[i] end else cameraParams = { {}, {}, {}, {} } - for cam = 1, 4 do - cameraParams[cam] = {} - - for i = 1, cameraCount do - cameraParams[cam][i] = {} - cameraParams[cam][i].position = defaultCameraParams[i].position - cameraParams[cam][i].pitch = defaultCameraParams[i].pitch - cameraParams[cam][i].yaw = defaultCameraParams[i].yaw - cameraParams[cam][i].distance = defaultCameraParams[i].distance + for i = 1, 4 do + for j = 1, #defaultCameraParams do + cameraParams[i][j] = defaultCameraParams[j] end end @@ -230,7 +198,7 @@ function onLoad(saved_data) playVisibility = { false, false, false, false } end - resetOverlay() + updateOverlay() end function onSave() @@ -244,55 +212,39 @@ function onSave() cameras = cameraParams, fullVis = fullVisibility, playVis = playVisibility, - claims = allclaims + claims = allclaims }) end -function displayFull(object, color) - local playerCount = getPlayerCount() - local colors - - if playerCount == 0 then - return - elseif playerCount == 1 then - colors = { 1, 2, 3, 4 } - else - colors = { getIndexForPlayerColor(color) } - end - - for i, v in ipairs(colors) do - if v > 0 then - fullVisibility[v] = true - playVisibility[v] = false - end - end - - resetOverlay() +function displayFull(_, color) + setVisibility("full", color) end -function displayPlayArea(object, color) - local playerCount = getPlayerCount() - local colors +function displayPlayArea(_, color) + setVisibility("play", color) +end - if playerCount == 0 then - return - elseif playerCount == 1 then - colors = { 1, 2, 3, 4 } +function setVisibility(type, color) + local colors = getColors(color) + local visibility + + if type == "full" then + visibility = {full = true, play = false} else - colors = { getIndexForPlayerColor(color) } + visibility = {full = false, play = true} end for _, v in ipairs(colors) do if v > 0 then - fullVisibility[v] = false - playVisibility[v] = true + fullVisibility[v] = visibility.full + playVisibility[v] = visibility.play end end - resetOverlay() + updateOverlay() end -function resetCameras(object, color) +function getColors(color) local playerCount = getPlayerCount() local colors @@ -303,6 +255,11 @@ function resetCameras(object, color) else colors = { getIndexForPlayerColor(color) } end + return colors +end + +function resetCameras(_, color) + local colors = getColors(color) for iv, v in ipairs(colors) do if v > 0 then @@ -317,19 +274,7 @@ function resetCameras(object, color) end function closeOverlay(object, color) - local playerCount = getPlayerCount() - local colors - - editing = false - claiming = false - - if playerCount == 0 then - return - elseif playerCount == 1 then - colors = { 1, 2, 3, 4 } - else - colors = { getIndexForPlayerColor(color) } - end + local colors = getColors(color) for _, v in ipairs(colors) do if v > 0 then @@ -338,20 +283,11 @@ function closeOverlay(object, color) end end - resetOverlay() + updateOverlay() end function resizeOverlay(object, color) - local playerCount = getPlayerCount() - local colors - - if playerCount == 0 then - return - elseif playerCount == 1 then - colors = { 1, 2, 3, 4 } - else - colors = { getIndexForPlayerColor(color) } - end + local colors = getColors(color) for _, v in ipairs(colors) do if v > 0 then @@ -361,37 +297,12 @@ function resizeOverlay(object, color) end end - resetOverlay() + updateOverlay() end -function resetOverlay() - local guid = self.getGUID() - local color - local panel - local existingXml = UI.getXml() - local openingXml = '' - - -- try to only remove our panels - for p = 1, 2 do - i, j = string.find(existingXml, ' ]] - for _, d in ipairs(data) do + for _, d in ipairs(fullButtonData) do local buttonID = tonumber(d.id) if editing and buttonID < 19 then @@ -447,27 +355,21 @@ function resetOverlay() color = "rgba(0,1,0,0)" end + -- TODO button creation xml = xml .. [[ - ]] + color="]] .. color .. [[">]] end - - xml = xml .. [[ ]] end if string.len(playColors) > 0 then data = playButtonData - xml = xml .. [[ - ]] @@ -492,56 +394,19 @@ function resetOverlay() color = "rgba(0,1,0,0)" end - xml = xml .. [[ - ]] + color="]] .. color .. [[">]] end xml = xml .. [[ ]] end - - local existingAssets = UI.getCustomAssets() - local largeOverlay = nil - local smallOverlay = nil - - for _, v in pairs(existingAssets) do - for _, vv in pairs(v) do - if vv == 'OverlayLarge' then - largeOverlay = v - end - if vv == 'OverlaySmall' then - smallOverlay = v - end - end - end - - local largeURL = 'http://cloud-3.steamusercontent.com/ugc/2021591230441678995/7B413A821136969D8723687A2AD66773B3F8FEED/' - local smallURL = 'http://cloud-3.steamusercontent.com/ugc/2021591230447630077/18C86248B9BDAF1DE01B67791439A39EE4F97B60/' - - if largeOverlay == nil then - largeOverlay = { name = 'OverlayLarge', url = largeURL } - table.insert(existingAssets, largeOverlay) - else - largeOverlay.url = largeURL - end - - if smallOverlay == nil then - smallOverlay = { name = 'OverlaySmall', url = smallURL } - table.insert(existingAssets, smallOverlay) - else - smallOverlay.url = smallURL - end - - UI.setXml(xml, existingAssets) end +-- handles all button clicks function buttonClicked(player, _, idValue) local buttonID = tonumber(idValue) @@ -558,16 +423,9 @@ function buttonClicked(player, _, idValue) selectedEditButton = buttonID else if buttonID == selectedEditButton and editDistance > 0 then - local playerCount = getPlayerCount() - local colors + local colors = getColors(color) - if playerCount == 1 then - colors = { 1, 2, 3, 4 } - else - colors = { getIndexForPlayerColor(player.color) } - end - - for i, v in ipairs(colors) do + for _, v in ipairs(colors) do cameraParams[v][selectedEditButton].position = editPos cameraParams[v][selectedEditButton].pitch = editPitch cameraParams[v][selectedEditButton].yaw = editYaw @@ -579,7 +437,7 @@ function buttonClicked(player, _, idValue) selectedEditButton = -1 end - resetOverlay() + updateOverlay() elseif claiming then if buttonID >= 3 and buttonID <= 6 then local colorID = buttonID - 2 @@ -607,7 +465,7 @@ function buttonClicked(player, _, idValue) end claiming = false - resetOverlay() + updateOverlay() else loadCamera(player, _, idValue) end @@ -619,7 +477,7 @@ function loadCamera(player, _, idValue) local playerIndex = getIndexForPlayerColor(playerColor) -- only do map zooming if the camera hasn't been specially set by user - if index == 2 and cameraParams[playerIndex][index].distance <= 0.0 then + if index == 2 and cameraParams[playerIndex][index].distance <= 0 then local mapObjects = Physics.cast({ origin = { x = -29.2, y = 0, z = 0.0 }, direction = { x = 0, y = 1, z = 0 }, @@ -683,7 +541,7 @@ function loadCamera(player, _, idValue) end end - if cameraParams[newMatIndex][index].distance <= 0.0 then + if cameraParams[newMatIndex][index].distance <= 0 then local matObjects = Physics.cast({ origin = playermatData[newMatIndex].origin, direction = { x = 0, y = 1, z = 0 }, @@ -737,13 +595,10 @@ function loadCamera(player, _, idValue) local d = 0.64 * scale + 7 -- need to wait if the player color changed - Wait.frames(function() - player.lookAt({ position = { centerX, 0, centerZ }, pitch = 75.823, yaw = yaw, distance = d }) - end, 2) + Wait.frames( + function() player.lookAt({ position = { centerX, 0, centerZ }, pitch = 75.823, yaw = yaw, distance = d }) end, 2) else - Wait.frames(function() - player.lookAt(cameraParams[newMatIndex][index]) - end, 2) + Wait.frames(function() player.lookAt(cameraParams[newMatIndex][index]) end, 2) end else player.lookAt(cameraParams[playerIndex][index]) @@ -758,7 +613,7 @@ function beginSetCamera(object, color) end editing = true - resetOverlay() + updateOverlay() end function updateEditCamera(params) @@ -776,7 +631,7 @@ function beginClaimColor(object, color) end claiming = true - resetOverlay() + updateOverlay() end function resetClaimColors(object, color) From 439345c3e1e4e516b74ca56058f97d68a4e9acf6 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sat, 6 May 2023 16:49:28 +0200 Subject: [PATCH 04/22] updating xml --- .../NavigationOverlayTile.9f2481.json | 2 +- src/accessories/NavigationOverlay.ttslua | 245 ++++++++---------- 2 files changed, 113 insertions(+), 134 deletions(-) diff --git a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json index 9e9f215a..e7f312c7 100644 --- a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json +++ b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json @@ -65,5 +65,5 @@ "scaleZ": 3 }, "Value": 0, - "XmlUI_path": "OptionPanelSource.830bd0/NavigationOverlayTile.9f2481.xml" + "XmlUI_path": "OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.xml" } \ No newline at end of file diff --git a/src/accessories/NavigationOverlay.ttslua b/src/accessories/NavigationOverlay.ttslua index 67bbd906..62800f3a 100644 --- a/src/accessories/NavigationOverlay.ttslua +++ b/src/accessories/NavigationOverlay.ttslua @@ -123,7 +123,49 @@ editPitch = 0 editYaw = 0 editDistance = 0 +function onSave() + local allclaims = {} + + for i = 1, 4 do + table.insert(allclaims, playermatData[i].claims) + end + + return JSON.encode({ + cameras = cameraParams, + fullVis = fullVisibility, + playVis = playVisibility, + claims = allclaims + }) +end + function onLoad(savedData) + if savedData ~= "" then + local loadedData = JSON.decode(savedData) + cameraParams = loadedData.cameras + fullVisibility = loadedData.fullVis + playVisibility = loadedData.playVis + + for i = 1, 4 do + playermatData[i].claims = loadedData.claims[i] + end + else + cameraParams = { {}, {}, {}, {} } + + for i = 1, 4 do + for j = 1, #defaultCameraParams do + cameraParams[i][j] = defaultCameraParams[j] + end + end + + fullVisibility = { false, false, false, false } + playVisibility = { false, false, false, false } + end + + createTileButtons() + updateOverlay() +end + +function createTileButtons() local buttonParameters = {} buttonParameters.function_owner = self buttonParameters.label = "" @@ -175,45 +217,6 @@ function onLoad(savedData) buttonParameters.width = 700 buttonParameters.position = { x = 0, y = 0.1, z = 0.78 } self.createButton(buttonParameters) - - if savedData ~= "" then - local loadedData = JSON.decode(savedData) - cameraParams = loadedData.cameras - fullVisibility = loadedData.fullVis - playVisibility = loadedData.playVis - - for i = 1, 4 do - playermatData[i].claims = loadedData.claims[i] - end - else - cameraParams = { {}, {}, {}, {} } - - for i = 1, 4 do - for j = 1, #defaultCameraParams do - cameraParams[i][j] = defaultCameraParams[j] - end - end - - fullVisibility = { false, false, false, false } - playVisibility = { false, false, false, false } - end - - updateOverlay() -end - -function onSave() - local allclaims = {} - - for i = 1, 4 do - table.insert(allclaims, playermatData[i].claims) - end - - return JSON.encode({ - cameras = cameraParams, - fullVis = fullVisibility, - playVis = playVisibility, - claims = allclaims - }) end function displayFull(_, color) @@ -246,16 +249,14 @@ end function getColors(color) local playerCount = getPlayerCount() - local colors if playerCount == 0 then - return + return {} elseif playerCount == 1 then - colors = { 1, 2, 3, 4 } + return { 1, 2, 3, 4 } else - colors = { getIndexForPlayerColor(color) } + return { getIndexForPlayerColor(color) } end - return colors end function resetCameras(_, color) @@ -301,15 +302,12 @@ function resizeOverlay(object, color) end function updateOverlay() - local color, panel - local xml = self.UI.getXml() - local fullColors = '' - local playColors = '' - + -- update XML visibility + local fullColors, playColors for i, v in pairs(fullVisibility) do - if v == true then + if v then local matColor = getPlayerColorForIndex(i) - if string.len(fullColors) > 0 and matColor ~= nil then + if fullColors and matColor ~= nil then fullColors = fullColors .. '|' .. matColor elseif matColor ~= nil then fullColors = matColor @@ -318,9 +316,9 @@ function updateOverlay() end for i, v in pairs(playVisibility) do - if v == true then + if v then local matColor = getPlayerColorForIndex(i) - if string.len(playColors) > 0 and matColor ~= nil then + if playColors and matColor ~= nil then playColors = playColors .. '|' .. matColor elseif matColor ~= nil then playColors = matColor @@ -328,82 +326,72 @@ function updateOverlay() end end - if string.len(fullColors) > 0 then - -- TODO update visibility - xml = xml .. [[ - ]] + self.UI.setAttribute("navPanelFull", "visibility", fullColors) + self.UI.setAttribute("navPanelPlay", "visibility", playColors) - for _, d in ipairs(fullButtonData) do - local buttonID = tonumber(d.id) + updateXMLbuttons("full") + updateXMLbuttons("play") +end - if editing and buttonID < 19 then - if selectedEditButton < 0 then - color = "rgba(1,1,1,1)" - elseif buttonID == selectedEditButton then - color = "rgba(0,1,0,1)" - else - color = "rgba(1,0,0,1)" - end - elseif claiming and buttonID < 19 then - if buttonID >= 3 and buttonID <= 6 then - color = "rgba(1,1,1,1)" - else - color = "rgba(1,0,0,1)" - end - else - color = "rgba(0,1,0,0)" - end - - -- TODO button creation - xml = xml .. [[]] - end - end - - if string.len(playColors) > 0 then +function updateXMLbuttons(type) + local data, id + if type == "full" then + data = fullButtonData + id = "navPanelFull" + else data = playButtonData + id = "navPanelPlay" + end - -- TODO update visibility - xml = xml .. [[ - ]] + -- XML button creation + local color + local xml = findTagWithId(self.UI.getXmlTable(), id) - for _, d in ipairs(data) do - local buttonID = tonumber(d.id) + for _, d in ipairs(data) do + local buttonID = tonumber(d.id) - if editing and buttonID < 19 then - if selectedEditButton < 0 then - color = "rgba(1,1,1,1)" - elseif buttonID == selectedEditButton then - color = "rgba(0,1,0,1)" - else - color = "rgba(1,0,0,1)" - end - elseif claiming and buttonID < 19 then - if buttonID >= 3 and buttonID <= 6 then - color = "rgba(1,1,1,1)" - else - color = "rgba(1,0,0,1)" - end + if editing and buttonID < 19 then + if selectedEditButton < 0 then + color = "rgba(1,1,1,1)" + elseif buttonID == selectedEditButton then + color = "rgba(0,1,0,1)" else - color = "rgba(0,1,0,0)" + color = "rgba(1,0,0,1)" end - - -- TODO button creation - xml = xml .. [[]] + elseif claiming and buttonID < 19 then + if buttonID >= 3 and buttonID <= 6 then + color = "rgba(1,1,1,1)" + else + color = "rgba(1,0,0,1)" + end + else + color = "rgba(0,1,0,0)" end - xml = xml .. [[ ]] + table.insert(xml, { + tag = "button", + attributes = { + onClick = "buttonClicked", + id = d.id, + height = d.height, + width = d.width, + offsetXY = d.offsetX .. " " .. d.offsetY, + color = color + } + }) end + self.UI.setXmlTable(xml) +end + +function findTagWithId(ui, id) + for _, obj in ipairs(ui) do + if obj.attributes and obj.attributes.id and obj.attributes.id == id then return obj end + if obj.children then + local result = find_tag_with_id(obj.children, id) + if result then return result end + end + end + return nil end -- handles all button clicks @@ -606,11 +594,8 @@ function loadCamera(player, _, idValue) end function beginSetCamera(object, color) - if getPlayerCount() == 0 then - return - elseif getIndexForPlayerColor(color) < 0 then - return - end + if getPlayerCount() == 0 then return end + if getIndexForPlayerColor(color) < 0 then return end editing = true updateOverlay() @@ -624,22 +609,16 @@ function updateEditCamera(params) end function beginClaimColor(object, color) - if getPlayerCount() == 0 then - return - elseif getIndexForPlayerColor(color) < 0 then - return - end + if getPlayerCount() == 0 then return end + if getIndexForPlayerColor(color) < 0 then return end claiming = true updateOverlay() end function resetClaimColors(object, color) - if getPlayerCount() == 0 then - return - elseif getIndexForPlayerColor(color) < 0 then - return - end + if getPlayerCount() == 0 then return end + if getIndexForPlayerColor(color) < 0 then return end for c1 = 1, 4 do for c2 = 1, 4 do From 862e40265418352418efd4333877afdef37b819f Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sat, 6 May 2023 17:02:18 +0200 Subject: [PATCH 05/22] further code updating --- src/accessories/NavigationOverlay.ttslua | 37 +++++++++--------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/src/accessories/NavigationOverlay.ttslua b/src/accessories/NavigationOverlay.ttslua index 62800f3a..fb284c0f 100644 --- a/src/accessories/NavigationOverlay.ttslua +++ b/src/accessories/NavigationOverlay.ttslua @@ -1,6 +1,3 @@ -local playAreaApi = require("core/PlayAreaApi") -local playmatApi = require("playermat/PlaymatApi") - fullButtonData = { { id = "1", width = "84", height = "33", offsetX = "1", offsetY = "2" }, -- Act/Agenda { id = "2", width = "78", height = "69", offsetX = "1", offsetY = "-62" }, -- Map @@ -227,14 +224,20 @@ function displayPlayArea(_, color) setVisibility("play", color) end +function closeOverlay(_, color) + setVisibility("close", color) +end + function setVisibility(type, color) local colors = getColors(color) local visibility if type == "full" then visibility = {full = true, play = false} - else + elseif type == "play" then visibility = {full = false, play = true} + else + visibility = { full = false, play = false } end for _, v in ipairs(colors) do @@ -264,7 +267,7 @@ function resetCameras(_, color) for iv, v in ipairs(colors) do if v > 0 then - for i = 1, cameraCount do + for i = 1, #defaultCameraParams do cameraParams[v][i].position = defaultCameraParams[i].position cameraParams[v][i].pitch = defaultCameraParams[i].pitch cameraParams[v][i].yaw = defaultCameraParams[i].yaw @@ -274,19 +277,6 @@ function resetCameras(_, color) end end -function closeOverlay(object, color) - local colors = getColors(color) - - for _, v in ipairs(colors) do - if v > 0 then - fullVisibility[v] = false - playVisibility[v] = false - end - end - - updateOverlay() -end - function resizeOverlay(object, color) local colors = getColors(color) @@ -371,15 +361,16 @@ function updateXMLbuttons(type) table.insert(xml, { tag = "button", attributes = { - onClick = "buttonClicked", - id = d.id, - height = d.height, - width = d.width, + onClick = "buttonClicked", + id = d.id, + height = d.height, + width = d.width, offsetXY = d.offsetX .. " " .. d.offsetY, - color = color + color = color } }) end + self.UI.setXmlTable(xml) end From a74ced8c7fda86f553de6bfc3bdc4e4f93634465 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sat, 6 May 2023 17:03:26 +0200 Subject: [PATCH 06/22] fixed EOF linebreaks --- objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa.json | 2 +- .../NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa.json b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa.json index 9a501b24..b02bc2b4 100644 --- a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa.json +++ b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa.json @@ -53,4 +53,4 @@ }, "Value": 0, "XmlUI": "" -} \ No newline at end of file +} diff --git a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json index e7f312c7..62d258e6 100644 --- a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json +++ b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json @@ -66,4 +66,4 @@ }, "Value": 0, "XmlUI_path": "OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.xml" -} \ No newline at end of file +} From 24bedfecac07b542b3a4c1bdb1edfef1586f7439 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sun, 7 May 2023 02:16:09 +0200 Subject: [PATCH 07/22] fixed xml buttons --- modsettings/CustomUIAssets.json | 4 +- .../NavigationOverlayTile.9f2481.json | 17 +-- .../NavigationOverlay.ttslua | 112 ++++++++++-------- xml/Global.xml | 1 + .../NavigationOverlay.xml | 7 +- 5 files changed, 70 insertions(+), 71 deletions(-) rename src/{accessories => core}/NavigationOverlay.ttslua (94%) rename objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.xml => xml/NavigationOverlay.xml (78%) diff --git a/modsettings/CustomUIAssets.json b/modsettings/CustomUIAssets.json index c942aa49..b26b6972 100644 --- a/modsettings/CustomUIAssets.json +++ b/modsettings/CustomUIAssets.json @@ -37,12 +37,12 @@ { "Name": "OverlayLarge", "Type": 0, - "URL": "http://cloud-3.steamusercontent.com/ugc/1745699502804112656/A34D1F30E0DA0E283F300AE6D6B63F59FFC97730/" + "URL": "http://cloud-3.steamusercontent.com/ugc/2021591230441678995/7B413A821136969D8723687A2AD66773B3F8FEED/" }, { "Name": "OverlaySmall", "Type": 0, - "URL": "http://cloud-3.steamusercontent.com/ugc/1745699502804112719/CFFC89BF9FB8439204EE19CF94180EC99450CD38/" + "URL": "http://cloud-3.steamusercontent.com/ugc/2021591230447630077/18C86248B9BDAF1DE01B67791439A39EE4F97B60/" }, { "Name": "option-gear", diff --git a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json index 62d258e6..bdc2a7f2 100644 --- a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json +++ b/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.json @@ -18,22 +18,9 @@ "Type": 0 }, "ImageScalar": 1, - "ImageSecondaryURL": "http://cloud-3.steamusercontent.com/ugc/2021591230456185506/15AF790F0622B57C1F629DB3A8C38F2A99D0EB1B/", "ImageURL": "http://cloud-3.steamusercontent.com/ugc/2021591230456185506/15AF790F0622B57C1F629DB3A8C38F2A99D0EB1B/", "WidthScale": 0 }, - "CustomUIAssets": [ - { - "Name": "OverlayLarge", - "Type": 0, - "URL": "http://cloud-3.steamusercontent.com/ugc/2021591230441678995/7B413A821136969D8723687A2AD66773B3F8FEED/" - }, - { - "Name": "OverlaySmall", - "Type": 0, - "URL": "http://cloud-3.steamusercontent.com/ugc/2021591230447630077/18C86248B9BDAF1DE01B67791439A39EE4F97B60/" - } - ], "Description": "", "DragSelectable": true, "GMNotes": "", @@ -45,7 +32,7 @@ "IgnoreFoW": false, "LayoutGroupSortIndex": 0, "Locked": false, - "LuaScript": "require(\"accessories/NavigationOverlay\")", + "LuaScript": "require(\"core/NavigationOverlay\")", "LuaScriptState": "", "MeasureMovement": false, "Name": "Custom_Tile", @@ -65,5 +52,5 @@ "scaleZ": 3 }, "Value": 0, - "XmlUI_path": "OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.xml" + "XmlUI": "" } diff --git a/src/accessories/NavigationOverlay.ttslua b/src/core/NavigationOverlay.ttslua similarity index 94% rename from src/accessories/NavigationOverlay.ttslua rename to src/core/NavigationOverlay.ttslua index fb284c0f..e1b6d840 100644 --- a/src/accessories/NavigationOverlay.ttslua +++ b/src/core/NavigationOverlay.ttslua @@ -37,19 +37,6 @@ playButtonData = { } playermatData = { - { - guid = '383d8b', - origin = { x = -25.00, y = 0, z = 26.20 }, - scale = { x = 31.5, y = 5.10, z = 14.59 }, - orientation = { x = 0, y = 0, z = 0 }, - minX = -44.43, - maxX = -17.44, - minZ = 20.17, - maxZ = 32.97, - xOffset = -0.07, - zOffset = 0.00, - claims = { true, false, false, false } - }, { guid = '8b081b', origin = { x = -54.42, y = 0, z = 20.96 }, @@ -61,7 +48,7 @@ playermatData = { maxZ = 24.53, xOffset = 0.07, zOffset = 0.03, - claims = { false, true, false, false } + claims = { true, false, false, false } }, { guid = 'bd0ff4', @@ -74,6 +61,19 @@ playermatData = { maxZ = 2.39, xOffset = 0.07, zOffset = 0.02, + claims = { false, true, false, false } + }, + { + guid = '383d8b', + origin = { x = -25.00, y = 0, z = 26.20 }, + scale = { x = 31.5, y = 5.10, z = 14.59 }, + orientation = { x = 0, y = 0, z = 0 }, + minX = -44.43, + maxX = -17.44, + minZ = 20.17, + maxZ = 32.97, + xOffset = -0.07, + zOffset = 0.00, claims = { false, false, true, false } }, { @@ -233,9 +233,9 @@ function setVisibility(type, color) local visibility if type == "full" then - visibility = {full = true, play = false} + visibility = { full = true, play = false } elseif type == "play" then - visibility = {full = false, play = true} + visibility = { full = false, play = true } else visibility = { full = false, play = false } end @@ -316,27 +316,50 @@ function updateOverlay() end end - self.UI.setAttribute("navPanelFull", "visibility", fullColors) - self.UI.setAttribute("navPanelPlay", "visibility", playColors) + if fullColors then + updateXMLbuttons("full") + UI.setAttribute("navPanelFull", "visibility", fullColors) + UI.show("navPanelFull") + else + UI.hide("navPanelFull") + end - updateXMLbuttons("full") - updateXMLbuttons("play") + if playColors then + updateXMLbuttons("play") + UI.setAttribute("navPanelPlay", "visibility", playColors) + UI.show("navPanelPlay") + else + UI.hide("navPanelPlay") + end end function updateXMLbuttons(type) - local data, id + local data, id, overlay, color if type == "full" then data = fullButtonData id = "navPanelFull" + overlay = "OverlayLarge" else data = playButtonData id = "navPanelPlay" + overlay = "OverlaySmall" end -- XML button creation - local color - local xml = findTagWithId(self.UI.getXmlTable(), id) + local guid = self.getGUID() + local ui = UI.getXmlTable() + local xml = findTagWithId(ui, id) + -- add basic image + xml.children = { { + tag = "image", + attributes = { + id = "backgroundImage", + image = overlay + } + } } + + -- add all buttons for _, d in ipairs(data) do local buttonID = tonumber(d.id) @@ -358,10 +381,10 @@ function updateXMLbuttons(type) color = "rgba(0,1,0,0)" end - table.insert(xml, { + table.insert(xml.children, { tag = "button", attributes = { - onClick = "buttonClicked", + onClick = guid .. "/buttonClicked", id = d.id, height = d.height, width = d.width, @@ -370,15 +393,15 @@ function updateXMLbuttons(type) } }) end - - self.UI.setXmlTable(xml) + + UI.setXmlTable(ui) end function findTagWithId(ui, id) for _, obj in ipairs(ui) do if obj.attributes and obj.attributes.id and obj.attributes.id == id then return obj end if obj.children then - local result = find_tag_with_id(obj.children, id) + local result = findTagWithId(obj.children, id) if result then return result end end end @@ -489,7 +512,7 @@ function loadCamera(player, _, idValue) if minX < 100 then local dx = maxX - minX - local dz = (maxZ - minZ) / (1.6) -- screen ratio * 1.2 (for my macbook pro, no idea how to generalize this) + local dz = (maxZ - minZ) / 1.6 -- screen ratio * 1.2 (for my macbook pro, no idea how to generalize this) local centerX = (minX + maxX) / 2 -- offset is to move it a bit up, so the cards don't block anything local centerZ = (minZ + maxZ) / 2 local scale = math.max(dx, dz) @@ -561,8 +584,8 @@ function loadCamera(player, _, idValue) -- offset is to move it a bit up and right, so the cards/toolbar don't block anything centerX = (minX + maxX) / 2 - dx * playermatData[newMatIndex].xOffset centerZ = (minZ + maxZ) / 2 + dz * playermatData[newMatIndex].zOffset - -- Green/Red - else + -- Green/Red + else dx = (maxX - minX) / 1.6 dz = maxZ - minZ yaw = playermatData[newMatIndex].orientation.y + 180 @@ -622,6 +645,7 @@ function resetClaimColors(object, color) end end +-- helper functions function getPlayerCount() local playerCount = 0 local playerColors = {} @@ -645,26 +669,16 @@ function getPlayerCount() end function getPlayerColorForIndex(index) - if index < 0 or index > 4 then - return nil - end - - local guid = playermatData[index]['guid'] - if guid ~= nil then - local mat = getObjectFromGUID(guid) - return mat.getVar("playerColor") - end + local color = { "White", "Orange", "Green", "Red" } + return color[index] end function getIndexForPlayerColor(color) - for i = 1, 4 do - local mat = getObjectFromGUID(playermatData[i].guid) - if mat ~= nil then - if mat.getVar('playerColor') == color then - return i - end - end - end + local index = { White = 1, Orange = 2, Green = 3, Red = 4 } - return -1 + if index[color] then + return index[color] + else + return -1 + end end diff --git a/xml/Global.xml b/xml/Global.xml index dc00dbc4..d0883bce 100644 --- a/xml/Global.xml +++ b/xml/Global.xml @@ -123,3 +123,4 @@ + diff --git a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.xml b/xml/NavigationOverlay.xml similarity index 78% rename from objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.xml rename to xml/NavigationOverlay.xml index 888892be..a6f475d5 100644 --- a/objects/OptionPanelSource.830bd0/NavigationOverlay.a8affa/NavigationOverlayTile.9f2481.xml +++ b/xml/NavigationOverlay.xml @@ -1,9 +1,10 @@ @@ -13,8 +14,6 @@ height="358" width="455" class="navPanel"> - @@ -22,6 +21,4 @@ height="208" width="205" class="navPanel"> - From 3d4429a95b01a9e403ab5b801dd8278398919fbb Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sun, 7 May 2023 16:52:52 +0200 Subject: [PATCH 08/22] further fixing --- src/core/NavigationOverlay.ttslua | 56 +++++++++---------------------- 1 file changed, 15 insertions(+), 41 deletions(-) diff --git a/src/core/NavigationOverlay.ttslua b/src/core/NavigationOverlay.ttslua index e1b6d840..ad8cb124 100644 --- a/src/core/NavigationOverlay.ttslua +++ b/src/core/NavigationOverlay.ttslua @@ -1,9 +1,9 @@ fullButtonData = { { id = "1", width = "84", height = "33", offsetX = "1", offsetY = "2" }, -- Act/Agenda { id = "2", width = "78", height = "69", offsetX = "1", offsetY = "-62" }, -- Map - { id = "3", width = "36", height = "70", offsetX = "-62", offsetY = "-66" }, -- Green - { id = "4", width = "70", height = "36", offsetX = "-36", offsetY = "-126" }, -- White - { id = "5", width = "70", height = "36", offsetX = "39", offsetY = "-126" }, -- Orange + { id = "3", width = "70", height = "36", offsetX = "-36", offsetY = "-126" }, -- White + { id = "4", width = "70", height = "36", offsetX = "39", offsetY = "-126" }, -- Orange + { id = "5", width = "36", height = "70", offsetX = "-62", offsetY = "-66" }, -- Green { id = "6", width = "36", height = "70", offsetX = "64", offsetY = "-66" }, -- Red { id = "7", width = "38", height = "38", offsetX = "-64", offsetY = "-3" }, -- Victory { id = "8", width = "40", height = "40", offsetX = "66", offsetY = "-3" }, -- Guide @@ -24,9 +24,9 @@ fullButtonData = { playButtonData = { { id = "1", width = "80", height = "33", offsetX = "0", offsetY = "55" }, { id = "2", width = "78", height = "70", offsetX = "0", offsetY = "-8" }, - { id = "3", width = "35", height = "66", offsetX = "-65", offsetY = "-10" }, - { id = "4", width = "68", height = "32", offsetX = "-36", offsetY = "-71" }, - { id = "5", width = "68", height = "32", offsetX = "36", offsetY = "-71" }, + { id = "3", width = "68", height = "32", offsetX = "-36", offsetY = "-71" }, + { id = "4", width = "68", height = "32", offsetX = "36", offsetY = "-71" }, + { id = "5", width = "35", height = "66", offsetX = "-65", offsetY = "-10" }, { id = "6", width = "35", height = "66", offsetX = "65", offsetY = "-10" }, { id = "7", width = "38", height = "38", offsetX = "-66", offsetY = "52" }, { id = "8", width = "38", height = "38", offsetX = "66", offsetY = "52" }, @@ -251,7 +251,7 @@ function setVisibility(type, color) end function getColors(color) - local playerCount = getPlayerCount() + local playerCount = #getSeatedPlayers() if playerCount == 0 then return {} @@ -536,7 +536,7 @@ function loadCamera(player, _, idValue) local newMatColor = getPlayerColorForIndex(newMatIndex) if newMatColor ~= nil then - local playerCount = getPlayerCount() + local playerCount = #getSeatedPlayers() if playerCount <= 1 or playermatData[playerIndex].claims[newMatIndex] then player.changeColor(newMatColor) @@ -579,7 +579,7 @@ function loadCamera(player, _, idValue) if index > 3 and index < 6 then dx = maxX - minX dz = (maxZ - minZ) / 1.6 -- screen ratio * 1.2 (for my macbook pro, no idea how to generalize this) - yaw = 90 + yaw = playermatData[newMatIndex].orientation.y + 180 -- offset is to move it a bit up and right, so the cards/toolbar don't block anything centerX = (minX + maxX) / 2 - dx * playermatData[newMatIndex].xOffset @@ -608,7 +608,7 @@ function loadCamera(player, _, idValue) end function beginSetCamera(object, color) - if getPlayerCount() == 0 then return end + if #getSeatedPlayers() == 0 then return end if getIndexForPlayerColor(color) < 0 then return end editing = true @@ -623,7 +623,7 @@ function updateEditCamera(params) end function beginClaimColor(object, color) - if getPlayerCount() == 0 then return end + if #getSeatedPlayers() == 0 then return end if getIndexForPlayerColor(color) < 0 then return end claiming = true @@ -631,43 +631,17 @@ function beginClaimColor(object, color) end function resetClaimColors(object, color) - if getPlayerCount() == 0 then return end + if #getSeatedPlayers() == 0 then return end if getIndexForPlayerColor(color) < 0 then return end - for c1 = 1, 4 do - for c2 = 1, 4 do - if c1 == c2 then - playermatData[c1].claims[c2] = true - else - playermatData[c1].claims[c2] = false - end + for i = 1, 4 do + for j = 1, 4 do + playermatData[i].claims[j] = (i == j) end end end -- helper functions -function getPlayerCount() - local playerCount = 0 - local playerColors = {} - - for i = 1, 4 do - local guid = playermatData[i].guid - local mat = getObjectFromGUID(guid) - local color = mat.getVar('playerColor') - playerColors[i] = color - end - - for _, v in ipairs(getSeatedPlayers()) do - for _, vv in ipairs(playerColors) do - if v == vv then - playerCount = playerCount + 1 - end - end - end - - return playerCount -end - function getPlayerColorForIndex(index) local color = { "White", "Orange", "Green", "Red" } return color[index] From 0645c7c934ebc682e769470247947e884ade9b64 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Mon, 8 May 2023 09:53:26 +0200 Subject: [PATCH 09/22] adding camera icon --- modsettings/CustomUIAssets.json | 5 +++++ xml/Global.xml | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modsettings/CustomUIAssets.json b/modsettings/CustomUIAssets.json index b26b6972..ff35fc8e 100644 --- a/modsettings/CustomUIAssets.json +++ b/modsettings/CustomUIAssets.json @@ -44,6 +44,11 @@ "Type": 0, "URL": "http://cloud-3.steamusercontent.com/ugc/2021591230447630077/18C86248B9BDAF1DE01B67791439A39EE4F97B60/" }, + { + "Name": "NavigationOverlayIcon", + "Type": 0, + "URL": "http://cloud-3.steamusercontent.com/ugc/2038485431575931195/7EDAE98E027FF101263E62E940180E65BE343FEE/" + }, { "Name": "option-gear", "Type": 0, diff --git a/xml/Global.xml b/xml/Global.xml index d0883bce..bf0191c8 100644 --- a/xml/Global.xml +++ b/xml/Global.xml @@ -29,7 +29,7 @@ outline="#303030" rectAlignment="LowerRight" width="35" - height="146" + height="183" offsetXY="-1 80" spacing="2"> + + + + + From b5e83fbbd277d63c961c42bb922f42e1526323ff Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Tue, 23 May 2023 23:41:23 +0200 Subject: [PATCH 22/22] renamed navigation overlay classes to avoid clashing with option panel --- xml/NavigationOverlay.xml | 48 +++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/xml/NavigationOverlay.xml b/xml/NavigationOverlay.xml index ebfa58ad..87a3140b 100644 --- a/xml/NavigationOverlay.xml +++ b/xml/NavigationOverlay.xml @@ -11,13 +11,13 @@ outline="grey" /> - - - - - - - Viewing angle in degrees: + + + Viewing angle in degrees: - + - - - Claim "White" seat + + + Claim "White" seat - + - - - Claim "Orange" seat + + + Claim "Orange" seat - + - - - Claim "Green" seat + + + Claim "Green" seat - + - - - Claim "Red" seat + + + Claim "Red" seat - +