Requests/Bugs

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

Re: Requests/Bugs

Post by Vadi » Tue Jun 15, 2010 1:38 pm

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 » Tue Jun 15, 2010 10:33 pm

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: 4733
Joined: Sat Mar 14, 2009 3:13 pm

Re: Requests/Bugs

Post by Vadi » Mon Sep 27, 2010 5:24 pm

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 » Sun Apr 24, 2011 10:29 am

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: 4733
Joined: Sat Mar 14, 2009 3:13 pm

Re: Requests/Bugs

Post by Vadi » Sun Apr 24, 2011 4:52 pm

Thanks a ton!

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

Re: Requests/Bugs

Post by demonnic » Thu May 19, 2011 6:51 am

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 » Thu May 19, 2011 7:05 am

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: 595
Joined: Sat Dec 05, 2009 3:19 pm

Re: Requests/Bugs

Post by demonnic » Thu May 19, 2011 1:37 pm

Awesomesauce. Thanks!

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

Re: Requests/Bugs

Post by Vadi » Mon May 30, 2011 5:56 pm

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: 595
Joined: Sat Dec 05, 2009 3:19 pm

Re: Requests/Bugs

Post by demonnic » Mon May 30, 2011 6:02 pm

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

Who is online

Users browsing this forum: No registered users and 2 guests