updating image

This commit is contained in:
Chr1Z93 2023-02-01 23:21:42 +01:00
parent 6900b0ab8b
commit df2178fda4
2 changed files with 26 additions and 16 deletions

View File

@ -19,7 +19,7 @@
},
"ImageScalar": 1,
"ImageSecondaryURL": "",
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/5118935530961118802/2A3E0C502886C4C4B98F5A0B03817ABC9DFE3D96/",
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/2053113893674531758/8E71AC0C7F8198A791AB4EA4ED9D301904F9A752/",
"WidthScale": 0
},
"Description": "Automatically counts the earned VP from cards in the victory display and locations in the play area without clues on them.",

View File

@ -2,33 +2,35 @@ local messageSent = {}
function onLoad()
local buttonParameters = {}
buttonParameters.label = "0 (Display) + 0 (Play Area) = 0 VP"
buttonParameters.label = "0"
buttonParameters.click_function = "none"
buttonParameters.function_owner = self
buttonParameters.position = { x = -0.5, y = 0.11, z = -0.8 }
buttonParameters.scale = { 0.15, 0.15, 0.15 }
buttonParameters.width = 0
buttonParameters.height = 0
buttonParameters.font_size = 600
buttonParameters.font_color = { 1, 1, 1 }
-- index 0: VP calculation
-- index 0: VP - "Display"
buttonParameters.position = { x = -0.71, y = 0.06, z = -0.69 }
self.createButton(buttonParameters)
-- index 1: title
buttonParameters.position = { x = 0, y = 0.11, z = -1.15 }
buttonParameters.label = "Victory Display"
buttonParameters.font_size = 1000
-- index 1: VP - "Play Area"
buttonParameters.position = { x = 0.65, y = 0.06, z = -0.69 }
self.createButton(buttonParameters)
-- index 2: refresh button
buttonParameters.position = { x = 1.65, y = 0.11, z = -0.8 }
-- index 2: VP - "Total"
buttonParameters.position = { x = 1.685, y = 0.06, z = -0.69 }
self.createButton(buttonParameters)
-- index 3: refresh button
buttonParameters.position = { x = 1.55, y = 0.06, z = -1.25 }
buttonParameters.label = "Refresh!"
buttonParameters.click_function = "updateCount"
buttonParameters.width = 2400
buttonParameters.height = 800
buttonParameters.width = 2200
buttonParameters.height = 720
buttonParameters.font_color = { 0, 0, 0 }
buttonParameters.font_size = 600
buttonParameters.font_size = 540
self.createButton(buttonParameters)
-- update the display label once
@ -80,9 +82,17 @@ function updateCount()
self.editButton({
index = 0,
label = victoryPoints.display .. " (Display) + "
.. victoryPoints.playArea .. " (Play Area) = "
.. victoryPoints.display + victoryPoints.playArea .. " VP"
label = victoryPoints.display
})
self.editButton({
index = 1,
label = victoryPoints.playArea
})
self.editButton({
index = 2,
label = victoryPoints.display + victoryPoints.playArea
})
end