SCED/src/core/NavigationOverlayApi.ttslua

24 lines
950 B
Plaintext
Raw Normal View History

2023-05-08 20:26:15 +02:00
do
local NavigationOverlayApi = {}
-- Copies the visibility for the Navigation overlay
---@param startColor String Color of the player to copy from
---@param targetColor String Color of the targeted player
NavigationOverlayApi.copyVisibility = function(startColor, targetColor)
2023-09-29 13:41:43 +02:00
local handler = Global.call("getObjectFromMemo", {matColor = "Mythos", type = "NavigationOverlayHandler"})
handler.call("copyVisibility", {
2023-05-08 20:26:15 +02:00
startColor = startColor,
targetColor = targetColor
})
2023-09-29 13:41:43 +02:00
end
2023-05-08 20:26:15 +02:00
2023-05-08 22:13:12 +02:00
-- Changes the Navigation Overlay view ("Full View" --> "Play Areas" --> "Closed" etc.)
---@param playerColor String Color of the player to update the visibility for
NavigationOverlayApi.cycleVisibility = function(playerColor)
2023-09-29 13:41:43 +02:00
local handler = Global.call("getObjectFromMemo", {matColor = "Mythos", type = "NavigationOverlayHandler"})
handler.call("cycleVisibility", playerColor)
2023-05-08 22:13:12 +02:00
end
2023-05-08 20:26:15 +02:00
return NavigationOverlayApi
end