Requests/Bugs

Geyser is an object oriented framework for creating, updating and organizing GUI elements within Mudlet.
User avatar
Vadi
Posts: 4844
Joined: Sat Mar 14, 2009 3:13 pm

Re: Requests/Bugs

Post by Vadi »

Calculatable dimensions... for example, height = "100% - 50px". I have a box I need to stretch depending on the screen size, but it has static elements both below and above it; and I need it to fit in between.

I guess this resembles something like so: http://hacks.mozilla.org/2010/06/css3-calc/

naftali
Posts: 138
Joined: Wed Jan 20, 2010 8:42 pm

Re: Requests/Bugs

Post by naftali »

agreed. I use the Geyser.Container:get_width() and such functions for that purpose, but it'd be nicer if you could do that instead.

User avatar
Vadi
Posts: 4844
Joined: Sat Mar 14, 2009 3:13 pm

Re: Requests/Bugs

Post by Vadi »

One more... seems the setLabelStyleSheet function needs to be hooked up, so you can do <label object>:setLabelStyleSheet(css).

Current workaround of setLabelStyleSheet("<label object name>", css) works. Anyone up for adding this simple thing?

Beliar
Posts: 19
Joined: Fri Apr 22, 2011 12:51 pm

Re: Requests/Bugs

Post by Beliar »

Here the style sheet method(s) as requested:

Label:
Code: [show] | [select all] lua
--- Sets the style sheet of the label
-- @param css The style sheet string
function Geyser.Label:setStyleSheet(css)
	setLabelStyleSheet(self.name, css)
end
Gauge:
Code: [show] | [select all] lua
-- Sets the style sheet for the gauge
-- @param css Style sheet for the front label
-- @param cssback Style sheet for the back label
function Geyser.Gauge:setStyleSheet(css, cssback)
	self.front:setStyleSheet(css)
	self.back:setStyleSheet(cssback or css)
end
Just put them in appropiate positions in GeyserLabel.lua and GeyserGauge.lua and restart Mudlet.

Note that the gauge builds on the label having the method added.

User avatar
Vadi
Posts: 4844
Joined: Sat Mar 14, 2009 3:13 pm

Re: Requests/Bugs

Post by Vadi »

Thanks a ton!

User avatar
demonnic
Posts: 663
Joined: Sat Dec 05, 2009 3:19 pm

Re: Requests/Bugs

Post by demonnic »

Found a bug when creating new miniconsoles. They don't set their fontSize. I -think- just adding this at line 107 of GeyserMiniConsole.lua will fix it, but if I'm way off base let me know:
Code: [show] | [select all] lua
  if cons.fontSize then
    me:setFontSize(cons.fontSize)
  else
    me:setFontSize(8)
  end

I took the line number from the file at your github account, Beliar. I put the else in because miniconsoles -really- don't work very well if they don't have their font size set. It's possible you may want to grab the value from the parent, rather than defaulting to 8. I didn't look into the code quite deeply enough to see how to go about that though.

Beliar
Posts: 19
Joined: Fri Apr 22, 2011 12:51 pm

Re: Requests/Bugs

Post by Beliar »

Ok, I'll added that code with a minor modification:
Code: [show] | [select all] lua
   if cons.fontSize then
      me:setFontSize(cons.fontSize)
   elseif container then
      me:setFontSize(container.fontSize)
   else
      me:setFontSize(8)
   end

User avatar
demonnic
Posts: 663
Joined: Sat Dec 05, 2009 3:19 pm

Re: Requests/Bugs

Post by demonnic »

Awesomesauce. Thanks!

User avatar
Vadi
Posts: 4844
Joined: Sat Mar 14, 2009 3:13 pm

Re: Requests/Bugs

Post by Vadi »

Is it possible to bring all of the API documentation for Geyser in http://wiki.mudlet.org/w/Manual:Geyser? So it'll become *the* place for all Geyser things to link to / learn.

User avatar
demonnic
Posts: 663
Joined: Sat Dec 05, 2009 3:19 pm

Re: Requests/Bugs

Post by demonnic »

sent a pull request from my branch to include Geyser.MiniConsole:append() and Geyser.MiniConsole:clear() in order to get appendBuffer and clearUserWindow() functionality with the Geyser auto-named miniconsoles. I found with my tabbed chat, and last night while working on porting my lusternian calendar that I was having to give my miniconsoles names anyways. This should let Geyser handled all of that.

Post Reply