Class Index | File Index

Classes


Class HorizontalScrollbar


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

Class Summary
Constructor Attributes Constructor Name and Description
 
HorizontalScrollbar(left_btn_image, scroller_image, right_btn_image, parent, size, position, surface, visible)
Field Summary
Field Attributes Field Name and Description
 
left scrollbar button
 
right scrollbar button
 
 
scroller class used to create scroller #TODO find better way to implement customization
Fields borrowed from class View:
children, parent, position, size, surface
Method Summary
Method Attributes Method Name and Description
 
scroll left by 0.1 of max scrollable amount
 
scroll right by 0.1 of max scrollable amount
 
setScroll(pos)
set scroll amount, relative
 
set relative scroller width
 
set scroll amount, px
Methods borrowed from class View:
addChild, blitChild, center, despatchEvent, destroy, draw, getGUI, getPosition, getRect, getSize, hide, isFocused, isHovered, isVisible, move, moveRelative, on, paint, refresh, removeChild, resize, show, update
Class Detail
HorizontalScrollbar(left_btn_image, scroller_image, right_btn_image, parent, size, position, surface, visible)
Parameters:
{gamejs.Surface} left_btn_image
image for left scrollbar button
{gamejs.Surface} scroller_image
image for scroller
{gamejs.Surface} right_btn_image
image for right scrollbar button
{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
{Button} left_btn
left scrollbar button

{Button} right_btn
right scrollbar button

{Scroller} scroller

{Function} scroller_class
scroller class used to create scroller #TODO find better way to implement customization
Method Detail
scrollLeft()
scroll left by 0.1 of max scrollable amount

scrollRight()
scroll right by 0.1 of max scrollable amount

setScroll(pos)
set scroll amount, relative
Parameters:
{Number} pos
scroll amount, between 0 and 1

setScrollerSize(sz)
set relative scroller width
Parameters:
{Number} sz
relative scroller width, between 0.1 and 1,

setScrollPX(pos)
set scroll amount, px
Parameters:
{Number} pos
scroll amount, px

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