Class Index | File Index

Classes


Class Label


Extends View.
single-line text display !CONSTRUCTOR PARAMETERS ARE PROVIDED IN A OBJECT LITERAL!
Defined in: gamejs-gui.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Label(font, text, parent, position, surface, visible)
Field Summary
Field Attributes Field Name and Description
 
 
Fields borrowed from class View:
children, parent, position, size, surface
Method Summary
Method Attributes Method Name and Description
 
paint implementation for label.
 
setText(text)
set new text for this label.
Methods borrowed from class View:
addChild, blitChild, center, despatchEvent, destroy, draw, getGUI, getPosition, getRect, getSize, hide, isFocused, isHovered, isVisible, move, moveRelative, on, refresh, removeChild, resize, show, update
Class Detail
Label(font, text, parent, position, surface, visible)
Parameters:
{CachedFont} font
font to draw text with. OPTIONAL, default gamejs-gui.DEFAULT_FONT
{String} text
text to draw
{View} parent
parent element
{Array} position
position of the view relative to parent, eg. [x, y]. OPTIONAL, default [0, 0]
{gamejs.Surface} surface
surface to render this view on, OPTIONAL
{Bool} visible
is this view visible? OPTIONAL, EFAULT true resized automatically to house text.
Field Detail
{CachedFont} font

{String} text
Method Detail
paint()
paint implementation for label. clears surface and renders text

setText(text)
set new text for this label. Resizes the view automatically.
Parameters:
{String} text
new text

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Aug 15 2011 16:17:32 GMT+0300 (EEST)