-1
我想讓我的按鈕保持「按下」,一旦它被釋放。現在我正在使用改進的按鈕模塊進行電暈處理,並且我的默認圖像是未按下按鈕的按鈕,並且將過度圖像替換爲看起來按下的圖像。如何使按鈕保持按下使用電暈
我想要做的是一旦按鈕被按下,它就停留在圖像上。這裏是我的代碼是如何設置的,我正在測試它的按鈕。
local digButton = buttons.newButton{
default = "digButton.png",
over = "digButtonPressed.png",
onEvent = digButtonFunction,
id = "dig"
}
digButton:setReferencePoint(display.CenterReferencePoint)
digButton.x = display.contentWidth/5
digButton.y = display.contentHeight/1.9
另外,我有,設置該按鈕的ID變量的函數(digButtonFunction),以用來運行一個if語句當用戶跟隨這一個推送按鈕。