Class TextInput
Extends
View.
text input !CONSTRUCTOR PARAMETERS ARE PROVIDED IN A OBJECT LITERAL!
Defined in: gamejs-gui.js.
Constructor Attributes | Constructor Name and Description |
---|---|
TextInput(font, text, scw_size, parent, size, position, surface, visible)
|
Field Attributes | Field Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
paint()
default implementation: white fill, gray border
|
|
setText(text)
set input text.
|
|
update(msDuration)
implements blip updating
|
- 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
Class Detail
TextInput(font, text, scw_size, parent, size, position, surface, visible)
- Parameters:
- {CachedFont} font
- {String} text
- {Array} scw_size
- actual text display size, [width, height].
- {View} parent
- parent element
- {Array} size
- array containing width & height of the element, eg. [width, height]
- {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, DEFAULT true
Field Detail
{CachedFont}
font
{String}
text
Method Detail
paint()
default implementation: white fill, gray border
setText(text)
set input text. generates EVT_CHANGE
- Parameters:
- {String} text
update(msDuration)
implements blip updating
- Parameters:
- {Number} msDuration