Trying to add a background image to this. Everything I've tried has resulted in either the background image showing or the text I want to display showing but not both....
function GetRoomExits()
roomexits = nil
for i,v in pairs(gmcp.Room.Info.exits) do
if not roomexits then
roomexits = string.upper(i)
else
roomexits = roomexits..","..string.upper(i)
end
end
roomexits = roomexits or "TRAPPED!"
roomlabel : setFgColor("white")
roomlabel:echo("<b>Exits<br>" ..roomexits, nil, "c")
roomlabel:setBackgroundImage("C:/MudletGFX/exitButton.png")
end
roomlabel = Geyser.Label:new({name="Room Exits",x="0.5%", y="94%",width="25.5%", height=35,fontSize = 10,})
roomlabel : setFgColor("white")
-- roomlabel:setStyleSheet([[background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #CC9900 stop: 1 #454545);
-- border-top: 1px black solid;
-- border-left: 1px black solid;
-- border-bottom: 1px black solid;
-- border-radius: 7;
-- padding: 3px;
-- ]])
registerAnonymousEventHandler("gmcp.Room.Info", "GetRoomExits")
Comments
function GetRoomExits()
roomexits = nil
for i,v in pairs(gmcp.Room.Info.exits) do
if not roomexits then
roomexits = string.upper(i)
else
roomexits = roomexits..","..string.upper(i)
end
end
roomexits = roomexits or "TRAPPED!"
roomlabel : setFgColor("white")
roomlabel:echo("<b>Exits<br>" ..roomexits, nil, "c")
end
roomlabel = Geyser.Label:new({name="Room Exits",x="0.5%", y="94%",width="25.5%", height=35,fontSize = 10,})
roomlabel : setFgColor("white")
roomlabel:setStyleSheet[[
border-image: url(C:/MudletGFX/exitButton.png);
]]
registerAnonymousEventHandler("gmcp.Room.Info", "GetRoomExits")
That works. Thanks