@XeduR, I took a look and it might be buried somewhere in a sub directory in his repositories. I have a copy, but it uses his SSK lib which introduces other things in the code.
@Loky31 , this is as simple as it can get:
-- main.lua
local masterGroup = display.newGroup()
masterGroup.x = display.contentCenterX
masterGroup.y = display.contentCenterY
local topLeftRect = display.newRect(masterGroup, -50,-50,25,25)
topLeftRect:setFillColor(1,0,0)
local topRightRect = display.newRect(masterGroup, 50,-50,25,25)
topRightRect:setFillColor(0,1,0)
local bottonLeftRect = display.newRect(masterGroup, -50,50,25,25)
bottonLeftRect:setFillColor(0,0,1)
local bottonRightRect = display.newRect(masterGroup, 50,50,25,25)
bottonRightRect:setFillColor(1,1,0)
local centerRect = display.newRect(masterGroup, 0,0,25,25)
centerRect:setFillColor(0,1,1)
local function onTouchEvent(event)
local phase = event.phase
local target = event.target
if phase == "began" then
if target.id == "in" then
masterGroup.xScale = masterGroup.xScale + 0.1
masterGroup.yScale = masterGroup.yScale + 0.1
elseif target.id == "out" then
masterGroup.xScale = masterGroup.xScale - 0.1
masterGroup.yScale = masterGroup.yScale - 0.1
end
end
end
local button_zoomIn = display.newRect(200,280,25,25)
button_zoomIn:setFillColor(0.5)
button_zoomIn.label = display.newText("+", button_zoomIn.x, button_zoomIn.y)
button_zoomIn.id = "in"
button_zoomIn:addEventListener("touch", onTouchEvent)
local button_zoomOut = display.newRect(280,280,25,25)
button_zoomOut:setFillColor(0.5)
button_zoomOut.label = display.newText("-", button_zoomOut.x, button_zoomOut.y)
button_zoomOut.id = "out"
button_zoomOut:addEventListener("touch", onTouchEvent)
It’s effectively what we would consider a “zoom” effect. If this is not the effect you’re looking for (which I also thought possible), then what you might be looking for is scaling each object individually and not the display group itself.