2014-01-08 24 views
3

在模擬器小部件顯示得很好,但沒有在設備上,其中一些丟失。 所以我甚至更新了電暈,並開始從1.0遷移到圖形2.0引擎,寬度/高度似乎也沒有引起問題,但我仍然有這個問題。在模擬器中的Corona小部件展示,但不在設備上

這部分代碼: menu.lua

ExitBtn = widget.newButton{ 
    defaultFile="images/exit.png", 
    overFile="images/exit2.png", 
    width=44, height=44, 
    onRelease = onExitBtnRelease 
} 
ExitBtn.anchorX,ExitBtn.anchorY = 0.5, 0.5 
ExitBtn.x = display.contentWidth-28 
ExitBtn.y = 24+50 
InfoBtn = widget.newButton{ 
    defaultFile="images/info.png", 
    overFile="images/info2.png" 
    width=46, height=46 
    --onRelease = onExitBtnRelease 
} 
InfoBtn.anchorX,InfoBtn.anchorY = 0.5, 0.5 
InfoBtn.x = ExitBtn.x-ExitBtn.width-8 
InfoBtn.y = ExitBtn.y+2 


group:insert(bg1) 
group:insert(bg2) 
group:insert(background) 
group:insert(playBtn) 
group:insert(ScoresBtn) 
group:insert(HowBtn) 
group:insert(ExitBtn) 
group:insert(InfoBtn) 

這是onExitBtnRelease功能

local function onExitBtnRelease() 
    native.requestExit() 
    return true 
end 

菜單屏幕看起來應該像這樣(下面的鏈接),但在右上角按鈕丟失(在設備上)。 http://s9.postimg.org/rz1c8nu27/start_screen.png

回答

1

你有任何錯誤日誌嗎?

沒有詳細信息,我懷疑圖像路徑有問題:「images/info.png」。在模擬器中,它們不區分大小寫,但在設備中,它們是。

我希望它有幫助。

+0

謝謝,它被命名爲「Exit.png」,我甚至都沒有想過。 – markoal

相關問題