further code updating
This commit is contained in:
parent
439345c3e1
commit
862e402654
@ -1,6 +1,3 @@
|
||||
local playAreaApi = require("core/PlayAreaApi")
|
||||
local playmatApi = require("playermat/PlaymatApi")
|
||||
|
||||
fullButtonData = {
|
||||
{ id = "1", width = "84", height = "33", offsetX = "1", offsetY = "2" }, -- Act/Agenda
|
||||
{ id = "2", width = "78", height = "69", offsetX = "1", offsetY = "-62" }, -- Map
|
||||
@ -227,14 +224,20 @@ function displayPlayArea(_, color)
|
||||
setVisibility("play", color)
|
||||
end
|
||||
|
||||
function closeOverlay(_, color)
|
||||
setVisibility("close", color)
|
||||
end
|
||||
|
||||
function setVisibility(type, color)
|
||||
local colors = getColors(color)
|
||||
local visibility
|
||||
|
||||
if type == "full" then
|
||||
visibility = {full = true, play = false}
|
||||
else
|
||||
elseif type == "play" then
|
||||
visibility = {full = false, play = true}
|
||||
else
|
||||
visibility = { full = false, play = false }
|
||||
end
|
||||
|
||||
for _, v in ipairs(colors) do
|
||||
@ -264,7 +267,7 @@ function resetCameras(_, color)
|
||||
|
||||
for iv, v in ipairs(colors) do
|
||||
if v > 0 then
|
||||
for i = 1, cameraCount do
|
||||
for i = 1, #defaultCameraParams do
|
||||
cameraParams[v][i].position = defaultCameraParams[i].position
|
||||
cameraParams[v][i].pitch = defaultCameraParams[i].pitch
|
||||
cameraParams[v][i].yaw = defaultCameraParams[i].yaw
|
||||
@ -274,19 +277,6 @@ function resetCameras(_, color)
|
||||
end
|
||||
end
|
||||
|
||||
function closeOverlay(object, color)
|
||||
local colors = getColors(color)
|
||||
|
||||
for _, v in ipairs(colors) do
|
||||
if v > 0 then
|
||||
fullVisibility[v] = false
|
||||
playVisibility[v] = false
|
||||
end
|
||||
end
|
||||
|
||||
updateOverlay()
|
||||
end
|
||||
|
||||
function resizeOverlay(object, color)
|
||||
local colors = getColors(color)
|
||||
|
||||
@ -371,15 +361,16 @@ function updateXMLbuttons(type)
|
||||
table.insert(xml, {
|
||||
tag = "button",
|
||||
attributes = {
|
||||
onClick = "buttonClicked",
|
||||
id = d.id,
|
||||
height = d.height,
|
||||
width = d.width,
|
||||
onClick = "buttonClicked",
|
||||
id = d.id,
|
||||
height = d.height,
|
||||
width = d.width,
|
||||
offsetXY = d.offsetX .. " " .. d.offsetY,
|
||||
color = color
|
||||
color = color
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
self.UI.setXmlTable(xml)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user