Lua 将图像粘贴到右下角
如何将图像粘贴到屏幕的右下角Lua 将图像粘贴到右下角,lua,coronasdk,Lua,Coronasdk,如何将图像粘贴到屏幕的右下角 local screenGroup = self.view helpbtn = display.newImage("helpbtn.png") screenGroup:insert(helpbtn) helpbtn.x = 255; helpbtn.y = 600 transition.to( helpbtn, { time=2500, y=465, transition=easing.inOutExpo } ) 因此,在所有不同的设备上,它看起来都一样?使用di
local screenGroup = self.view
helpbtn = display.newImage("helpbtn.png")
screenGroup:insert(helpbtn)
helpbtn.x = 255; helpbtn.y = 600
transition.to( helpbtn, { time=2500, y=465, transition=easing.inOutExpo } )
因此,在所有不同的设备上,它看起来都一样?使用display.contentWidth和display.contentHeight。另外,看看谷歌上的其他SO帖子,比如“corona lua屏幕(大小或分辨率)” 试试这个:
local distanceFromCorner = 5
local helpbtn = display.newImage("helpbtn.png")
screenGroup:insert(helpbtn)
helpbtn.x = display.contentWidth - helpbtn.contentWidth/2 - distanceFromCorner;
helpbtn.y = display.contentHeight - helpbtn.contentHeight/2 - distanceFromCorner;
您还可以在正常corona模式或corona的Graphics 2.0引擎中使用
继续编码………..) 你的意思是定位在同一个地方,还是占据屏幕的同一部分?我的意思是,屏幕大小总是在角落里