You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now we could also just loop through them, and move the individual scissorRects as well. It makes sense that when the screen is sliding out, the other scissorRects would move with the screen. It's what I'm doing for now.
The following in RNDirector:slideout is a rough way of how we can change it.
if CURRENT_SCENE_GROUP ~= nil then
local groupArray = { CURRENT_SCENE_GROUP }
local movedScissorRectArray = {}
local groupIndex = 1
while groupArray[groupIndex] do
local displayObjects = groupArray[groupIndex].displayObjects
for i = 1, table.getn(displayObjects), 1 do
local displayObject = groupArray[groupIndex].displayObjects[i]
if displayObject.scissorRect and movedScissorRectArray[displayObject.scissorRect] == nil then
displayObject.scissorRect:moveLoc(-xx, -yy, 0, 0.001*TIME, MOAIEaseType.SMOOTH)
movedScissorRectArray[displayObject.scissorRect] = true
end
if displayObject:getType() == "RNGroup" then
groupArray[#groupArray+1] = displayObject
end
end
groupIndex = groupIndex + 1
end
for i = 1, table.getn(CURRENT_SCENE_GROUP.displayObjects), 1 do
if i == table.getn(CURRENT_SCENE_GROUP.displayObjects) then --call transition end callback only for last element
trn:run(CURRENT_SCENE_GROUP.displayObjects[i], { type = "move", x = CURRENT_SCENE_GROUP.displayObjects[i].x - xx, y = CURRENT_SCENE_GROUP.displayObjects[i].y - yy, time = TIME, onComplete = slideEnd })
else
trn:run(CURRENT_SCENE_GROUP.displayObjects[i], { type = "move", x = CURRENT_SCENE_GROUP.displayObjects[i].x - xx, y = CURRENT_SCENE_GROUP.displayObjects[i].y - yy, time = TIME })
end
end
end
RNDirector should have scissor rect for each scene (to not overlap objects from different scenes than current one)
PROBLEM: other scissorRects applied to props will override the scene one, so the overlap bug will be persistent.
The text was updated successfully, but these errors were encountered: