added WIP code
This commit is contained in:
parent
2704465cc0
commit
5884cfdea0
@ -959,6 +959,22 @@ end
|
||||
-- Content Importing and XML functions
|
||||
---------------------------------------------------------
|
||||
|
||||
function onSearchValueChanged(a, b, c)
|
||||
log(a)
|
||||
log(b)
|
||||
log(c)
|
||||
|
||||
-- TODO: some kind of wait
|
||||
updateDownloadItemList(true)
|
||||
end
|
||||
|
||||
function onAuthorFilterChanged(a, b, c)
|
||||
log(a)
|
||||
log(b)
|
||||
log(c)
|
||||
updateDownloadItemList(true)
|
||||
end
|
||||
|
||||
-- forwards the requested content type to the update function and sets highlight to clicked tab
|
||||
---@param tabId string Id of the clicked tab
|
||||
function onClick_tab(_, _, tabId)
|
||||
@ -1334,7 +1350,8 @@ function formatLibrary(jsonResponse)
|
||||
end
|
||||
|
||||
-- updates the window content to the requested content
|
||||
function updateDownloadItemList()
|
||||
---@param skipAuthorUpdate? boolean If true, skips the update for the author dropdown
|
||||
function updateDownloadItemList(skipAuthorUpdate)
|
||||
if not library then return end
|
||||
|
||||
-- addition of list items according to library file
|
||||
@ -1343,6 +1360,9 @@ function updateDownloadItemList()
|
||||
|
||||
contentList.children = {}
|
||||
for i, v in ipairs(library[contentToShow]) do
|
||||
-- TODO: filter here
|
||||
|
||||
-- TODO: store authors here
|
||||
table.insert(contentList.children,
|
||||
{
|
||||
tag = "Panel",
|
||||
@ -1360,6 +1380,14 @@ function updateDownloadItemList()
|
||||
end
|
||||
|
||||
contentList.attributes.height = #contentList.children * 27
|
||||
|
||||
-- TODO: maybe update authors
|
||||
if not skipAuthorUpdate then
|
||||
local authorDropdown = getXmlTableElementById(globalXml, 'authorDropdown')
|
||||
|
||||
|
||||
end
|
||||
|
||||
updateGlobalXml(globalXml)
|
||||
|
||||
-- select the first item
|
||||
@ -2136,8 +2164,8 @@ function TokenManager.spawnMultipleTokens(card, tokenType, tokenCount, shiftDown
|
||||
local matColor = playermatApi.getMatColorByPosition(card.getPosition())
|
||||
local activeInvestigatorData = playermatApi.getActiveInvestigatorData(matColor)
|
||||
callbackName = "updateUniversalActionAbilityToken"
|
||||
callbackParams = { class = activeInvestigatorData.class, symbol = subType or activeInvestigatorData.class}
|
||||
|
||||
callbackParams = { class = activeInvestigatorData.class, symbol = subType or activeInvestigatorData.class }
|
||||
|
||||
if temporary then
|
||||
callbackParams.addTag = "Temporary"
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user