|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcage.graphics.Clickable
cage.graphics.HotSpot
public class HotSpot
A HotSpot is a rectangular region defined by a point and X,Y sizes. This region can have an associated action and should be used to sub-divide a single Sprite into several active regions calling different CARL actions. When debug mode is on, the GraphicsEngine will draw the outlines of the HotSpots using their stored image.
Field Summary | |
---|---|
protected boolean |
active
If a HotSpot is active the MouseHandler will call the HotSpot's action when it is clicked |
protected java.lang.String |
name
The name of the HotSpot |
Fields inherited from class cage.graphics.Clickable |
---|
actionName, botRight, height, topLeft, width |
Constructor Summary | |
---|---|
HotSpot(java.lang.String name,
java.lang.String actionName,
int x,
int y,
int sizex,
int sizey,
boolean active)
Creates a HotSpot with the given parameters. |
Method Summary | |
---|---|
boolean |
getActive()
Returns true if the HotSpot is active. |
org.minueto.image.MinuetoImage |
getImage()
Gets the rectangle image showing the outine of the HotSpot. |
java.lang.String |
getName()
Gets the name of this HotSpot |
void |
scale(double xScale,
double yScale)
Rescales the HotSpot's location and size by the given X and Y factors. |
void |
setActive(boolean active)
Sets if this HotSpot should be considered when the mouse is clicked |
java.lang.String |
toXML()
Creates an XML String representing this HotSpot |
Methods inherited from class cage.graphics.Clickable |
---|
getLocation, getX, getY, inputCollision, performAction, setLocation, setLocation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected boolean active
Constructor Detail |
---|
public HotSpot(java.lang.String name, java.lang.String actionName, int x, int y, int sizex, int sizey, boolean active)
name
- The name of the HotSpotactionName
- The name of the action to call when clicked.x
- The top left X location.y
- The top left Y location.sizex
- The width of the HotSpot.sizey
- The height of the HotSpot.active
- If the HotSpot is active or not.Method Detail |
---|
public org.minueto.image.MinuetoImage getImage()
public void scale(double xScale, double yScale)
xScale
- The ratio to scale X by.yScale
- The ratio to scale Y by.public java.lang.String getName()
getName
in class Clickable
public java.lang.String toXML()
public void setActive(boolean active)
active
- the value to assign to the HotSpotpublic boolean getActive()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |