wip
This commit is contained in:
parent
28a8dee817
commit
8a9f83a5b5
@ -1 +1 @@
|
||||
{"acknowledgedUpgradeVersions":[],"optionPanel":{"cardLanguage":"en","changePlayAreaImage":false,"playAreaConnectionColor":{"a":1,"b":0.4,"g":0.4,"r":0.4},"playAreaConnections":true,"playAreaSnapTags":true,"showAttachmentHelper":false,"showCleanUpHelper":false,"showCYOA":false,"showDisplacementTool":false,"showDrawButton":false,"showHandHelper":[],"showPlayermatHider":false,"showSearchAssistant":[],"showTitleSplash":true,"useClueClickers":false,"useResourceCounters":"disabled","useSnapTags":true}}
|
||||
{"acknowledgedUpgradeVersions":[],"optionPanel":{"cardLanguage":"en","changePlayAreaImage":false,"playAreaConnectionColor":{"a":1,"b":0.4,"g":0.4,"r":0.4},"playAreaConnections":true,"playAreaSnapTags":true,"showAttachmentHelper":false,"showCleanUpHelper":false,"showCYOA":false,"showDisplacementTool":false,"showDrawButton":false,"showHandHelper":[],"showSearchAssistant":[],"showTitleSplash":true,"useClueClickers":false,"useResourceCounters":"disabled","useSnapTags":true}}
|
||||
|
@ -17,7 +17,6 @@
|
||||
"CYOACampaignGuides.e87ea2",
|
||||
"AttachmentHelper.7f4976",
|
||||
"SearchAssistant.17aed0",
|
||||
"PlayermatHider.a758b2",
|
||||
"HandHelper.450688",
|
||||
"DisplacementTool.0f1374",
|
||||
"CleanUpHelper.26cf4b"
|
||||
|
@ -1,60 +0,0 @@
|
||||
{
|
||||
"AltLookAngle": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"Autoraise": true,
|
||||
"ColorDiffuse": {
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"r": 1
|
||||
},
|
||||
"CustomImage": {
|
||||
"CustomTile": {
|
||||
"Stackable": false,
|
||||
"Stretch": true,
|
||||
"Thickness": 0.1,
|
||||
"Type": 3
|
||||
},
|
||||
"ImageScalar": 1,
|
||||
"ImageSecondaryURL": "",
|
||||
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/2115061845796985108/F0ADB7094641DA966FFA3AF0CC6987D33D2D9591/",
|
||||
"WidthScale": 0
|
||||
},
|
||||
"Description": "Use the buttons to hide playermat(s).",
|
||||
"DragSelectable": true,
|
||||
"GMNotes": "",
|
||||
"GUID": "a758b2",
|
||||
"Grid": true,
|
||||
"GridProjection": false,
|
||||
"Hands": false,
|
||||
"HideWhenFaceDown": false,
|
||||
"IgnoreFoW": false,
|
||||
"LayoutGroupSortIndex": 0,
|
||||
"Locked": false,
|
||||
"LuaScript": "require(\"accessories/PlayermatHider\")",
|
||||
"LuaScriptState": "",
|
||||
"MeasureMovement": false,
|
||||
"Name": "Custom_Tile",
|
||||
"Nickname": "Playermat Hider",
|
||||
"Snap": true,
|
||||
"Sticky": true,
|
||||
"Tags": [
|
||||
"CleanUpHelper_ignore"
|
||||
],
|
||||
"Tooltip": true,
|
||||
"Transform": {
|
||||
"posX": 0,
|
||||
"posY": 2,
|
||||
"posZ": 0,
|
||||
"rotX": 0,
|
||||
"rotY": 270,
|
||||
"rotZ": 0,
|
||||
"scaleX": 3,
|
||||
"scaleY": 1,
|
||||
"scaleZ": 3
|
||||
},
|
||||
"Value": 0,
|
||||
"XmlUI": "\u003cInclude src=\"accessories/PlayermatHider.xml\"/\u003e"
|
||||
}
|
@ -253,7 +253,7 @@ function switchSeat(playerColor, direction)
|
||||
end
|
||||
|
||||
-- swap color
|
||||
navigationOverlayApi.loadCamera(playerColor, usedColors[index])
|
||||
navigationOverlayApi.loadCamera(Player[playerColor], usedColors[index])
|
||||
end
|
||||
|
||||
-- takes a clue from a location, player needs to hover the clue directly or the location
|
||||
|
@ -1215,6 +1215,29 @@ function returnResourceCounterId(name)
|
||||
end
|
||||
end
|
||||
|
||||
-- called by the playermat removal selection dropdown
|
||||
function playermatRemovalSelected(player, selectedIndex, id)
|
||||
if selectedIndex == "0" then return end
|
||||
|
||||
local matColorList = { "White", "Orange", "Green", "Red" }
|
||||
local matColor = matColorList[tonumber(selectedIndex)]
|
||||
local mat = guidReferenceApi.getObjectByOwnerAndType(matColor, "Playermat")
|
||||
|
||||
if mat then
|
||||
-- confirmation dialog about deletion
|
||||
player.showConfirmDialog("Do you really want to remove " .. matColor .. "'s playermat? This can't be reversed.", function() removePlayermat(matColor) end)
|
||||
else
|
||||
-- info dialog that it is already deleted
|
||||
player.showInfoDialog(matColor .. "'s playermat has already been removed.")
|
||||
end
|
||||
end
|
||||
|
||||
-- removes a playermat and all related objects from play
|
||||
---@param matColor String Color of the playermat to remove
|
||||
function removePlayermat(matColor)
|
||||
|
||||
end
|
||||
|
||||
-- sets the option panel to the correct state (corresponding to 'optionPanel')
|
||||
function updateOptionPanelState()
|
||||
for id, optionValue in pairs(optionPanel) do
|
||||
@ -1295,10 +1318,6 @@ function applyOptionPanelChange(id, state)
|
||||
optionPanel[id][i] = spawnOrRemoveHelper(state, "Hand Helper", pos, rot)
|
||||
end
|
||||
|
||||
-- option: Show playermat hider
|
||||
elseif id == "showPlayermatHider" then
|
||||
optionPanel[id] = spawnOrRemoveHelper(state, "Playermat Hider", {-48, 1.6, 46})
|
||||
|
||||
-- option: Show search assistant for each player
|
||||
elseif id == "showSearchAssistant" then
|
||||
for i, color in ipairs(MAT_COLORS) do
|
||||
@ -1376,7 +1395,6 @@ function removeHelperObject(name)
|
||||
local referenceTable = {
|
||||
["Clean Up Helper"] = "showCleanUpHelper",
|
||||
["Hand Helper"] = "showHandHelper",
|
||||
["Playermat Hider"] = "showPlayermatHider",
|
||||
["Search Assistant"] = "showSearchAssistant",
|
||||
["Displacement Tool"] = "showDisplacementTool",
|
||||
["Attachment Helper"] = "showAttachmentHelper",
|
||||
@ -1431,7 +1449,6 @@ function onClick_defaultSettings()
|
||||
showDisplacementTool = false,
|
||||
showDrawButton = false,
|
||||
showHandHelper = {},
|
||||
showPlayermatHider = false,
|
||||
showSearchAssistant = {},
|
||||
showTitleSplash = true,
|
||||
useClueClickers = false,
|
||||
|
@ -25,9 +25,9 @@ do
|
||||
-- loads the specified camera for a player
|
||||
---@param player TTSPlayerInstance Player whose camera should be moved
|
||||
---@param camera Variant If number: Index of the camera view to load | If string: Color of the playermat to swap to
|
||||
NavigationOverlayApi.loadCamera = function(playerColor, camera)
|
||||
NavigationOverlayApi.loadCamera = function(player, camera)
|
||||
getNOHandler().call("loadCameraFromApi", {
|
||||
playerColor = playerColor,
|
||||
player = player,
|
||||
camera = camera
|
||||
})
|
||||
end
|
||||
|
@ -292,7 +292,7 @@ function getDynamicViewBounds(objList)
|
||||
end
|
||||
|
||||
function loadCameraFromApi(params)
|
||||
loadCamera(Player[params.playerColor], params.camera)
|
||||
loadCamera(params.player, params.camera)
|
||||
end
|
||||
|
||||
-- loads the specified camera for a player
|
||||
|
@ -297,6 +297,28 @@
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<!-- Option: remove a player mat -->
|
||||
<Row class="option-text"
|
||||
tooltip="Remove an unused playermat for more table space.
Displayed are the default colors.">
|
||||
<Cell class="option-singleColumn">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Remove a playermat</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
<Cell class="option-doubleColumn">
|
||||
<Panel class="doubleColumn-wrapper">
|
||||
<Dropdown id="removePlayermat"
|
||||
onValueChanged="playermatRemovalSelected(selectedIndex)">
|
||||
<Option>None</Option>
|
||||
<Option>1: White</Option>
|
||||
<Option>2: Orange</Option>
|
||||
<Option>3: Green</Option>
|
||||
<Option>4: Red</Option>
|
||||
</Dropdown>
|
||||
</Panel>
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<!-- Group: fan-made accessories -->
|
||||
<Row class="group-header">
|
||||
<Cell class="group-header">
|
||||
@ -351,7 +373,7 @@
|
||||
|
||||
<!-- Option: show displacement tool -->
|
||||
<Row class="option-text"
|
||||
tooltip="This allows moving all objects on the main playmat
in a chosen direction.">
|
||||
tooltip="This allows moving all objects on the main play area
in a chosen direction.">
|
||||
<Cell class="option-text">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Displacement Tool</Text>
|
||||
@ -377,20 +399,6 @@
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<!-- Option: show playermat hider -->
|
||||
<Row class="option-text"
|
||||
tooltip="Use this tool to hide unused playermats
for more table space.">
|
||||
<Cell class="option-text">
|
||||
<Panel class="singleColumn-wrapper">
|
||||
<Text class="option-header">Playmat Hider</Text>
|
||||
</Panel>
|
||||
</Cell>
|
||||
<Cell class="option-button">
|
||||
<Toggle id="showPlayermatHider"
|
||||
onValueChanged="onClick_toggleOption(showPlayermatHider)"/>
|
||||
</Cell>
|
||||
</Row>
|
||||
|
||||
<!-- Option: show search assistant -->
|
||||
<Row class="option-text"
|
||||
tooltip="Quickly search 3, 6, 9 or the top X
cards of your deck!">
|
||||
|
@ -1,76 +0,0 @@
|
||||
<Defaults>
|
||||
<Text color="White"
|
||||
fontSize="110"
|
||||
alignment="MiddleLeft"
|
||||
font="font_teutonic-arkham"/>
|
||||
<Button fontSize="110"
|
||||
height="200"
|
||||
width="600"
|
||||
hoverClass="bGrey"
|
||||
pressClass="bWhite"
|
||||
selectClass="bWhite"
|
||||
color="#aaaaaa"
|
||||
font="font_teutonic-arkham"/>
|
||||
<Button class="bGrey"
|
||||
color="grey"/>
|
||||
<Button class="bWhite"
|
||||
color="white"/>
|
||||
<Button class="activeTab"
|
||||
color="#ffffff"/>
|
||||
<Row preferredHeight="300"/>
|
||||
</Defaults>
|
||||
|
||||
<TableLayout height="1600"
|
||||
width="1800"
|
||||
columnWidths="1000 800"
|
||||
rotation="0 0 180"
|
||||
position="0 0 -11"
|
||||
scale="0.1 0.1 0.1"
|
||||
cellBackgroundColor="none">
|
||||
<Row preferredHeight="400">
|
||||
<Cell columnSpan="2">
|
||||
<Text fontSize="200"
|
||||
alignment="UpperCenter">Playermat Hider</Text>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Text color="White">Playermat 1 (White)</Text>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Panel>
|
||||
<Button onClick="onClick_hide(White)">Hide</Button>
|
||||
</Panel>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Text color="Orange">Playermat 2 (Orange)</Text>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Panel>
|
||||
<Button onClick="onClick_hide(Orange)">Hide</Button>
|
||||
</Panel>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Text color="Green">Playermat 3 (Green)</Text>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Panel>
|
||||
<Button onClick="onClick_hide(Green)">Hide</Button>
|
||||
</Panel>
|
||||
</Cell>
|
||||
</Row>
|
||||
<Row>
|
||||
<Cell>
|
||||
<Text color="Red">Playermat 4 (Red)</Text>
|
||||
</Cell>
|
||||
<Cell>
|
||||
<Panel>
|
||||
<Button onClick="onClick_hide(Red)">Hide</Button>
|
||||
</Panel>
|
||||
</Cell>
|
||||
</Row>
|
||||
</TableLayout>
|
Loading…
Reference in New Issue
Block a user