Page 2 of 13

Re: Geyser UI Template

Posted: Wed Sep 25, 2013 9:36 pm
by icesteruk
ah nice! I'll look into that later today!

Template

is what I have so far!

Re: Geyser UI Template

Posted: Wed Sep 25, 2013 10:05 pm
by Akaya
That's lookin' pretty sweet!

Re: Geyser UI Template

Posted: Thu Sep 26, 2013 2:01 am
by icesteruk
with this code
Code: [show] | [select all] lua
mylabel:setStyleSheet([[
  border-image: url("]]..getMudletHomeDir():gsub("\\","/")..[[/myimage.png");
]])
How do I put it in the picture below but in the 'border' so the border is still shown?

Re: Geyser UI Template

Posted: Thu Sep 26, 2013 2:46 am
by Akaya
You'll want to create a label inside the label with the thin white border. Give this label a margin in the stylesheet like so:
Code: [show] | [select all] lua
mylabel:setStyleSheet([[
  margin: 2px;
]])
This is a work around I've found handy for you are not able to apply 2 borders to a single label.

Re: Geyser UI Template

Posted: Thu Sep 26, 2013 2:54 am
by icesteruk
so it'll be something like this
Code: [show] | [select all] lua
GUI.BashingIcon = Geyser.Label:new({
    name = "GUI.BashingIcon",
  },GUI.Header)
  GUI.BashingIcon:setStyleSheet(GUI.IconCSS:getCSS())
-- GUI.BashingIcon:cecho("<red><center>GUI Bashing")

GUI.BashingIcon:setStyleSheet([[
 margin: 2px;
  border-image: url("]]..getMudletHomeDir():gsub("\\","/")..[[/images/alertness.png");
]])
?

Re: Geyser UI Template

Posted: Thu Sep 26, 2013 4:02 am
by Akaya
You're applying the GUI.IconCSS stylesheet to GUI.BashingIcon and then setting the stylesheet yet again.
Instead, you can create a new CSSMan.new() and set that.
It would look something like this:
Code: [show] | [select all] lua
--Create the label for the image within the icon
--Notice that I add it to GUI.Icon1 and not GUI.Header
GUI.BashingIcon = Geyser.Label:new({
  name = "GUI.BashingIcon",
},GUI.Icon1)
--Here's where you create a new CSSMan.new specifically for GUI.BashingIcon
GUI.BashingIconCSS = CSSMan.new([[
  margin: 2px;
  border-image: url("]]..getMudletHomeDir():gsub("\\","/")..[[/images/alertness.png");
]])
--Here is where you set the stylesheet.
--Notice that it is GUI.BashingIconCSS and not GUI.IconCSS
GUI.BashingIcon:setStyleSheet(GUI.BashingIconCSS:getCSS())
-- GUI.BashingIcon:cecho("<red><center>GUI Bashing")
 
You'll need to do this for each icon. It's a long way about it, but unless you study up on how the CSSMan script works, this fits the bill.

Re: Geyser UI Template

Posted: Thu Sep 26, 2013 4:13 am
by icesteruk
Hmm What are you using for icon1?

edit: OOOO I see :P.. I add to add in width = 80% and height = 80% but seems to work,

Re: Geyser UI Template

Posted: Thu Sep 26, 2013 4:18 am
by Akaya
GUI.Icon1:flash() will show you. flash() is a nifty Geyser function.

Re: Geyser UI Template

Posted: Thu Sep 26, 2013 4:39 am
by icesteruk
So, that worked :)

Heres the finished product minus a few things (the top buttons being clickable)

Re: Geyser UI Template

Posted: Thu Sep 26, 2013 5:31 pm
by Akaya
Awesome!