From dd46cbf373c46e593e13a05139e0a1283d45c6e0 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sat, 14 Sep 2024 11:43:46 +0200 Subject: [PATCH] added TDC button (position WIP) --- src/playercards/PlayerCardPanel.ttslua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/playercards/PlayerCardPanel.ttslua b/src/playercards/PlayerCardPanel.ttslua index 88119d0d..970c6fb2 100644 --- a/src/playercards/PlayerCardPanel.ttslua +++ b/src/playercards/PlayerCardPanel.ttslua @@ -375,6 +375,24 @@ function createXML(showOtherCardsButton) } } + -- add "The Drowned City" cycle button + local TDCButtonXml = { + tag = "Panel", + attributes = { + position = "44.25 65.5 -11", + rotation = "0 0 180", + height = "225", + width = "225", + scale = "0.1 0.1 1", + onClick = "spawnTDC" + }, + children = { + tag = "Image", + attributes = { image = "TheDrownedCity" } + } + } + table.insert(xmlTable, TDCButtonXml) + -- add the "Additional Cards" button if cards without cycle were detected if showOtherCardsButton then local otherCardsButtonXml = { @@ -403,6 +421,10 @@ function spawnOtherCards() spawnCycle("Other") end +function spawnTDC() + spawnCycle("The Drowned City") +end + function toggleHelp(_, playerColor, _) if helpVisibleToPlayers[playerColor] then helpVisibleToPlayers[playerColor] = nil