Class Index | File Index

Classes


Class Scroller


Extends DraggableView.
draggable part of the scrollbar !CONSTRUCTOR PARAMETERS ARE PROVIDED IN A OBJECT LITERAL!
Defined in: gamejs-gui.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Scroller(parent, size, image, min_x, max_x, min_y, max_y, position, surface, visible)
Field Summary
Field Attributes Field Name and Description
 
img
Image object created if image parameter was provided
Fields borrowed from class DraggableView:
max_x, max_y, min_x, min_y
Fields borrowed from class View:
children, parent, position, size, surface
Method Summary
Method Attributes Method Name and Description
 
resize(size)
resizes image along with scroller
Methods borrowed from class DraggableView:
move
Methods borrowed from class View:
addChild, blitChild, center, despatchEvent, destroy, draw, getGUI, getPosition, getRect, getSize, hide, isFocused, isHovered, isVisible, moveRelative, on, paint, refresh, removeChild, show, update
Class Detail
Scroller(parent, size, image, min_x, max_x, min_y, max_y, position, surface, visible)
Parameters:
{View} parent
parent element
{Array} size
array containing width & height of the element, eg. [width, height]
{gamejs.Surface} image
iamge to use for the scroller, OPTIONAL
{Number} min_x
minimum x coordinate view can be dragged to, OPTIONAL
{Number} max_x
maximum x coordinate view can be dragged to, OPTIONAL
{Number} min_y
minimum y coordinate view can be dragged to, OPTIONAL
{Number} max_y
maximum y coordinate view can be dragged to, OPTIONAL
{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
{Image} img
Image object created if image parameter was provided
Method Detail
resize(size)
resizes image along with scroller
Parameters:
size

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