I’m trying to create a button with an image but i can’t see the image. I only see a white box with my label (see screenshot) in it. I have a image named btn.png in the same folder as main.lua.
This is my code so far:
local background = display.newRect(0,0,320,480); background:setFillColor(255,222,255); local widget = require("widget"); local text = display.newText("Dit is een text", 0, 0, native.systemFont, 32); text:setTextColor(0,0,0); text.x = 100; text.y = 100; local btn = widget.newButton{ id = "Button 1", width = 256, height = 256, top = 100, left = 50, label = "Dit is een knopke", labelColor = { default = {245,244,245}, over = {255,145,167} }, defaultFile = "btn.png", }
I don’t see what is wrong with my code. I also searched for it in the corona docs but i don’t see what is wrong with it.