Hi Peach,
Thanks for looking into this. I wonder if my test version is a bit out-of-date, my ui.lua was not behaving the way things are described, and it was fixed when I downloaded the latest version. Will look a bit later.
Any how:
I insert the background and some line drawings into pixGroup, then insert pixGroup into localGroup;
I insert the navigation buttons directly into localGroup
local localGroup = display.newGroup() -- whole display
local pixGroup = display.newGroup() -- bg and images
...
local function bgimage() -- inserting a background image
local bgname = bgpix[1]
local bg = display.newImageRect(bgname, dimx, dimy)
bg.x = halfx bg.y = halfy
pixGroup:insert(bg)
localGroup:insert(pixGroup)
end
local function sizbutton() -- navigation and control buttons
localGroup.pb00 = ui.newButton{
defaultSrc = "b00.png", defaultX = 70, defaultY = 40,
overSrc = "b00.png", overX = 70, overY = 40,
text = textSize,
textColor = { 51, 51, 51, 255 },
size = 22,
}
localGroup:insert(localGroup.pb00)
localGroup.pb00.x = butx5 localGroup.pb00.y = buty59
...
end
function newLine(event) -- draw some lines
...
end
function savef() -- save the bg and lines
local baseDir = system.DocumentsDirectory
local date = os.date( "\*t" )
local fileN = fname .. date.year .. date.month .. date.day .. "\_" .. date.hour .. date.min .. date.sec .. ".png"
fnid[findex] = fileN
display.save( pixGroup, fnid[findex], baseDir )
findex = findex + 1
fprev = findex
end
It saves ok, but looking at the save file shows the navigations buttons as well.
Thanks
fly [import]uid: 108015 topic_id: 26211 reply_id: 106718[/import]