public class PromptPopup
extends java.lang.Object
PromptManager
Modifier and Type | Field and Description |
---|---|
int |
backgroundColour |
int |
hightlightColour |
int |
iconColour |
static int |
LOCATION_BOTTOM_LEFT |
static int |
LOCATION_BOTTOM_RIGHT |
static int |
LOCATION_TOP_LEFT |
static int |
LOCATION_TOP_RIGHT |
int |
textColour |
Constructor and Description |
---|
PromptPopup(int x,
int y,
java.lang.String iconName)
Make a prompt with the given coordinates and icon.
|
PromptPopup(int x,
int y,
java.lang.String iconName,
java.lang.String text)
Make a prompt with the given coordinates, icon and message.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Start the disposal of the prompt.
|
void |
draw()
Draw the prompt using the given parameters.
|
void |
hideText()
Stop showing the text.
|
boolean |
isInvisible()
Get the visibility of the prompt.
|
void |
pause()
Pause the prompt.
|
void |
resume()
Resume the prompt.
|
void |
setCoordinates(float x,
float y)
Change the coordinates of the prompt to the given x and y.
|
void |
setCoordinates(int x,
int y)
Change the coordinates of the prompt to the given x and y.
|
void |
setCoordinates(processing.core.PVector v)
Change the coordinates of the prompt to the coordinates of the vector.
|
void |
setIcon(java.lang.String icon)
Change the icon to the provided one.
|
void |
setText(java.lang.String text)
Change the message to the provided text.
|
public static final int LOCATION_TOP_LEFT
public static final int LOCATION_TOP_RIGHT
public static final int LOCATION_BOTTOM_LEFT
public static final int LOCATION_BOTTOM_RIGHT
public int backgroundColour
public int hightlightColour
public int iconColour
public int textColour
public PromptPopup(int x, int y, java.lang.String iconName)
x
- x-coordinatey
- y-coordinateiconName
- name of the icon file not including the extension .svgpublic PromptPopup(int x, int y, java.lang.String iconName, java.lang.String text)
x
- x-coordinatey
- y-coordinateiconName
- name of the icon file not including the extension .svgtext
- prompt messagepublic void draw()
PromptManager.init(PApplet)
public void pause()
public void resume()
public void dispose()
PromptManager.draw()
public void setCoordinates(int x, int y)
x
- x-coordinatey
- y-coordinatepublic void setCoordinates(float x, float y)
x
- x-coordinatey
- y-coordinatepublic void setCoordinates(processing.core.PVector v)
v
- vectorpublic void setIcon(java.lang.String icon)
icon
- name of the icon must match one of the .svg files in folder
/data/vector/cue and must not contain the extension
.svg. For example: setting icon to the string "tap" will load
shape from file /data/vector/cue/tap.svg.public void setText(java.lang.String text)
text
- text of the messagepublic void hideText()
public boolean isInvisible()