public class HelpScreen
extends java.lang.Object
| Constructor and Description |
|---|
HelpScreen(processing.core.PApplet applet,
processing.core.PFont font)
Creates a help screen object with default text size.
|
HelpScreen(processing.core.PApplet applet,
processing.core.PFont font,
int textSize)
Creates a help screen object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSpacer()
Adds a vertical space (of the current font height) to the help screen entries.
|
void |
draw()
Draws the help screen centred on the sketch.
|
boolean |
getIsActive()
Reports whether or not the help window is currently active.
|
void |
putEntry(java.lang.String action,
java.lang.String instruction)
Adds a help entry to the help screen.
|
void |
setBackgroundColour(int bgColour)
Sets the background colour of the help window.
|
void |
setFooter(java.lang.String text,
int verticalSpace,
int textSize)
Provides the optional text to appear at the foot of the help screen.
|
void |
setFooterTextColour(int colour)
Sets footer text colour.
|
void |
setForegroundColour(int fgColour)
Sets the foreground colour of the help window.
|
void |
setHeader(java.lang.String text,
int verticalSpace,
int textSize)
Provides the optional text to appear at the top of the help screen.
|
void |
setHeaderTextColour(int colour)
Sets header text colour.
|
void |
setIsActive(boolean isActive)
Determines whether or not the help screen should be currently active.
|
void |
setTextColour(int colour)
Sets main text colour.
|
void |
setTextSize(float textSize)
Sets the current text size in pixels.
|
public HelpScreen(processing.core.PApplet applet,
processing.core.PFont font)
applet - Parent sketch to which this help screen is to be attached.font - Font used for text in help screen.public HelpScreen(processing.core.PApplet applet,
processing.core.PFont font,
int textSize)
applet - Parent sketch to which this help screen is to be attached.font - Font used for text in help screen.textSize - Size of text to use in help screen (pixels).public void putEntry(java.lang.String action,
java.lang.String instruction)
action - The user interaction (e.g. key press) to be documented.instruction - Description of the action.public void addSpacer()
public void setHeader(java.lang.String text,
int verticalSpace,
int textSize)
text - The text to appear in the header.verticalSpace - The space between the header and the text in the help window.textSize - Size of text in pixels.public void setFooter(java.lang.String text,
int verticalSpace,
int textSize)
text - The text to appear in the footer.verticalSpace - The space between the footer and the text in the help window.textSize - Size of text in pixels.public boolean getIsActive()
public void setIsActive(boolean isActive)
isActive - If true, the help window is made active.public void setTextSize(float textSize)
textSize - New text size in pixels.public void setHeaderTextColour(int colour)
colour - Colour of header text, expressed as a Processing integer colour.public void setFooterTextColour(int colour)
colour - Colour of footer text, expressed as a Processing integer colour.public void setTextColour(int colour)
colour - Main text colour expressed as a Processing integer colour.public void setBackgroundColour(int bgColour)
bgColour - Background colour expressed as a Processing integer colour.public void setForegroundColour(int fgColour)
fgColour - Foreground colour expressed as a Processing integer colour.public void draw()
getIsActive() /
setIsActive().