Hi,
I have this problem and can’t find the solution.
I want to have button with normal and HD graphic, I use Dynamic Image Resolution @2 function in config.lua file. It works for all the images but I get error with buttons:
Error: bad argument #2 to display.newImageRect(): width expected, but got nil.
I do specify height and width so don’t know what is the problem. Could some one post a code example how it should look like? I just want to say that I did try set width and height with “” and without.
this is my button at the moment.
[code]
local bt_start = ui.newButton{
default = “button_start1.png”, defaultX = 196 , defaultY = 57,
over = “button_start1.png”, overX = 10 , overY = 10,
onEvent = bt_start_e,
}
bt_start.x = display.contentWidth / 2
bt_start.y = display.contentHeight *0.5 + 5
localGroup:insert(bt_start)
[/code] [import]uid: 27699 topic_id: 8664 reply_id: 308664[/import]