Label Image

edited September 2013 in Tech Support
Hi!

I am trying to get a miniature image between two mini consoles, to no avail! I started out trying it as a miniconsole setting the background image like Achaea Fancy GUI does, then as a label setting the background image as suggested in the mudlet manual, then a label setting the background image in another way in another location, and I tried using /, \\ and \, to no avail! 

I am now cluelessly stumped! 

Here is what I have, all different parts commented out because I tried for like 3 hours to get it to work:


imgpath = [[C:\\Users\\User\\Pictures\\DO NOT MOVE OR DELETE SERIOUSLY]]


if string.char(getMudletHomeDir():byte()) == "/" then sep = "/" else sep = "\\" end


--function AuroraWindow()

--WindowWidth = 10;

--WindowHeight = 0;

--WindowWidth, WindowHeight = getMainWindowSize();



--local width = 13 --35

--local height = 23

--local xPos = 74 --83

--local yPos = 35

--local fontSize = 10 --Change this to change the font size.

--local wrapStyle = (WindowWidth*(width/100)/(fontSize*.8)) --Leave this alone!

--createLabel("AuroraWindow",WindowWidth*(xPos/100),WindowHeight*(yPos/100),WindowWidth*(width/100),WindowWidth*(height/100))

--createLabel( "picture_label", 0,0,165,265,0 )

--setBackgroundColor("AuroraWindow",25,125,125,255) --25,10,10,255

--setMiniConsoleFontSize("AuroraWindow", fontSize)

-- wrap lines in window "sys" at 40 characters per line

--setWindowWrap("AuroraWindow", wrapStyle)

-- set default font colors and font style for window "sys"

--setTextFormat("AuroraWindow",255,255,0,0,0,0,0,0,0)

--moveWindow("AuroraWindow",WindowWidth*(xPos/100),WindowHeight*(yPos/100))

--resizeWindow("AuroraWindow",WindowWidth*(width/100),WindowWidth*(height/100))

--handleWindowResizeEvent()

--picture_label = Geyser.Label:new({

-- name = "picture_label",

-- x = 74, y = 35,

-- width = "165px", height = "265px",

--})

--setBackgroundImage("AuroraWindow", imgpath .. sep .. "aurora.jpg")

--picture_label:setBackgroundImage([[C:/Users/User/AppData/Local/Mudlet/aurora.jpg]])

--setBackgroundColor( "AuroraWindow", 0, 0, 0, 0 )

--end


--AuroraWindow()


edit: additoinal info:


(p) 4316h, 4257m, 24655e, 21685w exdkr 40- 14:31:20.706 vlua io.exists(imgpath .. "/aurora.jpg")

true




I think all information is there. It just has to be a certain size (I made sure it fit by using the resizer thing) and I have no idea what I am doing wrong. Could anyone help me make a simple script to show it where I want it, please?


 i'm a rebel

Comments

  • Solved! For future reference, if anyone else goes crazy over something like this:


    imgpath = [[C:\\Users\\User\\Pictures\\DO NOT MOVE OR DELETE SERIOUSLY]]


    if string.char(getMudletHomeDir():byte()) == "/" then sep = "/" else sep = "\\" end


    picture_label = Geyser.Label:new({

    name = "picture_label",

    x = 943, y = 315,

    width = "176px", height = "276px",

    })

    picture_label:setBackgroundImage(imgpath .. sep .. "aurora2.png")



    The issue was mudlet cannot use jpgs, and really, really likes pngs. 

     i'm a rebel

  • Mudlet on Windows can't use JPGs - Qt's support for that on Windows is disabled because of patents.

    Generally use PNGs if you can unless it's a photo.
  • StrataStrata United States of Derp
    Mudlet on Windows  :-t
Sign In or Register to comment.