Class FrameHeader
Extends
View.
draggable frame header with a close button !CONSTRUCTOR PARAMETERS ARE PROVIDED IN A OBJECT LITERAL!
Defined in: gamejs-gui.js.
Constructor Attributes | Constructor Name and Description |
---|---|
FrameHeader(parent, height, title, title_font, close_btn, close_icon, close_btn, surface, visible)
|
Field Attributes | Field Name and Description |
---|---|
- Fields borrowed from class :
- FrameHeader#
- Fields borrowed from class View:
- children, parent, position, size, surface
Method Attributes | Method Name and Description |
---|---|
move(pos)
moving header moves parent frame too
|
|
paint()
default paint implementation: gray background
|
|
setTitle(text)
set header title
|
- Methods borrowed from class View:
- addChild, blitChild, center, despatchEvent, destroy, draw, getGUI, getPosition, getRect, getSize, hide, isFocused, isHovered, isVisible, moveRelative, on, refresh, removeChild, resize, show, update
Class Detail
FrameHeader(parent, height, title, title_font, close_btn, close_icon, close_btn, surface, visible)
- Parameters:
- {Frame} parent
- frame object this header is applied to
- {Number} height
- frame height, OPTIONAL, DEFAULT 20
- {String} title
- frame title OPTIONAL
- {CachedFont} title_font
- font for title OPTIONAL
- {Bool} close_btn
- show close button? OPTIONAL, DEFAULT false
- {gamejs.Surface} close_icon
- image to use for close button, OPTIONAL
- {gamejs.Surface} close_btn
- close button image OPTIONAL
- {gamejs.Surface} surface
- surface to render this view on, OPTIONAL
- {Bool} visible
- is this view visible? OPTIONAL, DEFAULT true
Field Detail
{Number}
height
Method Detail
move(pos)
moving header moves parent frame too
- Parameters:
- {Array} pos
- position ot move header to
paint()
default paint implementation: gray background
setTitle(text)
set header title
- Parameters:
- {String} text
- new header title