Merge pull request #995 from argonui/flipped-tokens

Updated damage/horror XML to detect if object spawns flipped
This commit is contained in:
dscarpac 2024-11-18 08:03:06 -06:00 committed by GitHub
commit ac8d5ace69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,6 +44,13 @@ function createXml()
if not params then return end if not params then return end
local uiColor, uiFontSize, uiVal = getUiColorSizeAndVal() local uiColor, uiFontSize, uiVal = getUiColorSizeAndVal()
local pos = params.posX .. " " .. params.posY .. " -6"
local rot = "0 0 180"
if self.is_face_down then
pos = params.posX .. " " .. params.posY .. " 6"
rot = "0 180 180"
end
local xml = { local xml = {
{ {
tag = "Button", tag = "Button",
@ -53,8 +60,8 @@ function createXml()
onClick = "addOrSubtract", onClick = "addOrSubtract",
scale = "0.35 0.35 1", scale = "0.35 0.35 1",
colors = uiColor, colors = uiColor,
position = params.posX .. " " .. params.posY .. " -6", position = pos,
rotation = "0 0 180", rotation = rot,
height = params.size, height = params.size,
width = params.size width = params.size
}, },