【发布时间】:2015-02-09 10:11:16
【问题描述】:
我所做的只是让我的图像的一部分显示并隐藏其余部分。最后,我将让显示部分可点击,但我在让面具工作时遇到了一些麻烦。
这是我的代码:
streams[0] = widget.newButton
{
width = display.contentWidth,
height = display.contentHeight,
left = 0,
top = 0,
defaultFile = "Images/hydro_screen/hy_screen_river1.png"
}
local mask = graphics.newMask( "Images/hydro_screen/hy_screen_river1_mask.png" )
local xScale = streams[0].width/2400
local yScale = streams[0].height/1600
streams[0]:setMask( mask )
streams[0].maskScaleX = xScale
streams[0].maskScaleY = yScale
streams[0].maskX = streams[0].width/2
streams[0].maskY = stream[0].height/2
我一直在玩数字,无论我做什么,我的河牌都是完全隐藏的。有人有什么建议吗?
这是我正在使用的两张图片。它们的大小相同。
【问题讨论】: