Hello everyone…
I would like to be able to do a scroll view, or a table with information
kind of the “phone list” on iPhone
or phone contancts
where you have “rows” and “columns”
and being able to add more and more “rows” every time…
I have a very simple code
row1 = display.newRect( 0, 0, 600, 20 ) sceneGroup:insert(row1) row1.x = display.contentCenterX row1.y = display.contentCenterY row1:setFillColor( .68, .93, .93 ) function row1:touch( event ) if event.phase == "began" then print("touching row1") -- set touch focus display.getCurrentStage():setFocus( self ) self.isFocus = true elseif self.isFocus then if event.phase == "moved" then print( "Moving row1" ) self.x = row1.x elseif event.phase == "ended" or event.phase == "cancelled" then print("not touching anything") -- reset touch focus display.getCurrentStage():setFocus( nil ) self.isFocus = nil end end return true end row1:addEventListener( "touch", row1 )
So if I touch the row1, then when I “moved” the mouse, the “row1”
supposed to move where the mouse is…
Could you help me with this please…