Class Button
represents button
Defined in: raphaeltools.src.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Button(raphael, params)
Button
|
Field Attributes | Field Name and Description |
---|---|
background color of button
|
|
background color of button when clicked
|
|
font size of button text
|
|
length of slider [pixels]
|
|
raphael instance
|
|
rectangle of receiver
|
|
object of receiver
|
|
length of slider [pixels]
|
|
x coordinate of left upper end
|
|
z coordinate of left upper end
|
Method Attributes | Method Name and Description |
---|---|
<static> |
Button.create(raphael, params)
Creates new Button object, for parameters meaning see Button
|
onclick()
What to do when clicked.
|
Class Detail
Button(raphael, params)
Button
- Parameters:
- {Raphael} raphael
- raphael instance
- {Object} params
- parameters, see below
- {string} params.str Optional, Default: "str"
- displayed string of button
- {float} params.x Optional, Default: 100.
- x coordinate of left upper end
- {float} params.z Optional, Default: 100.
- z coordinate of left upper end
- {float} params.width Optional, Default: 100.
- length of slider [pixels]
- {float} params.height Optional, Default: 30.
- length of slider [pixels]
- {float} params.fontSize Optional, Default: 20.
- font size of button str
- {float} params.rCorner Optional, Default: 4.
- radius of button corners camber
- {color} params.bgColor Optional, Default: "#bbb"
- background color of button
- {color} params.bgColorWhenClicked Optional, Default: "#aaa"
- background color of button when clicked
Field Detail
{color}
bgColor
background color of button
{color}
bgColorWhenClicked
background color of button when clicked
{float}
fontSize
font size of button text
{float}
height
length of slider [pixels]
{Raphael}
raphael
raphael instance
{Raphael.rect}
rect
rectangle of receiver
{Raphael.text}
text
object of receiver
{float}
width
length of slider [pixels]
{float}
x
x coordinate of left upper end
{float}
z
z coordinate of left upper end
Method Detail
<static>
{Button}
Button.create(raphael, params)
Creates new Button object, for parameters meaning see Button
- Parameters:
- raphael
- params
- Returns:
- {Button} new Button object
onclick()
What to do when clicked. Initially empty function, overwrite it by desired actions