Class engine.LogDisplay
Module that handles message history in a mouse wheel scrollable zone
Methods
engine.LogDisplay:init (x, y, w, h, max, fontname, fontsize, color, bgcolor)
Creates the log zone
engine.LogDisplay:resize (x, y, w, h)
Resize the display area
engine.LogDisplay:getLog (extra, timestamp)
Returns the full log
engine.LogDisplay:showLogDialog (title, shadow)
Make a dialog popup with the full log
engine.LogDisplay: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)
engine.LogDisplay:getNewestLine ()
Gets the last log line
engine.LogDisplay:empty ()
Clear the log
engine.LogDisplay:getLines (number)
Get Last Lines From Log
engine.LogDisplay:scrollUp (i)
Scroll the zone
Methods
- engine.LogDisplay:init (x, y, w, h, max, fontname, fontsize, color, bgcolor)
-
Creates the log zone
Parameters:
- x
- y
- w
- h
- max
- fontname
- fontsize
- color
- bgcolor
- engine.LogDisplay:resize (x, y, w, h)
-
Resize the display area
Parameters:
- x
- y
- w
- h
- engine.LogDisplay:getLog (extra, timestamp)
-
Returns the full log
Parameters:
- extra
- timestamp
- engine.LogDisplay:showLogDialog (title, shadow)
-
Make a dialog popup with the full log
Parameters:
- title
- shadow
- engine.LogDisplay: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
- ...
- engine.LogDisplay:getNewestLine ()
- Gets the last log line
- engine.LogDisplay:empty ()
- Clear the log
- engine.LogDisplay:getLines (number)
-
Get Last Lines From Log
Parameters:
- number number of lines to retrieve
- engine.LogDisplay:scrollUp (i)
-
Scroll the zone
Parameters:
- i number representing how many lines to scroll