Module ...

Module that handles message history in a mouse wheel scrollable zone

Functions

_M:call (str, ...) Appends text to the log This method is set as the call methamethod too, this means it is usable like this:
log = LogDisplay.new(...)
log("foo %s", s)
_M:empty () Clear the log
_M:getLines (number) Get Last Lines From Log
_M:getLog (extra) Returns the full log
_M:getNewestLine () Gets the last log line
_M:init (x, y, w, h, max, fontname, fontsize, color, bgcolor) Creates the log zone
_M:resize (x, y, w, h) Resize the display area
_M:scrollUp (i) Scroll the zone
_M:showLogDialog (title, shadow) Make a dialog popup with the full log


Functions

_M:call (str, ...)
Appends text to the log This method is set as the call methamethod too, this means it is usable like this:
log = LogDisplay.new(...)
log("foo %s", s)

Parameters

  • str:
  • ...:
_M:empty ()
Clear the log
_M:getLines (number)
Get Last Lines From Log

Parameters

  • number: number of lines to retrieve
_M:getLog (extra)
Returns the full log

Parameters

  • extra:
_M:getNewestLine ()
Gets the last log line
_M:init (x, y, w, h, max, fontname, fontsize, color, bgcolor)
Creates the log zone

Parameters

  • x:
  • y:
  • w:
  • h:
  • max:
  • fontname:
  • fontsize:
  • color:
  • bgcolor:
_M:resize (x, y, w, h)
Resize the display area

Parameters

  • x:
  • y:
  • w:
  • h:
_M:scrollUp (i)
Scroll the zone

Parameters

  • i: number representing how many lines to scroll
_M:showLogDialog (title, shadow)
Make a dialog popup with the full log

Parameters

  • title:
  • shadow:

Valid XHTML 1.0!