feud.testgame.gui
Class Button
java.lang.Object
feud.testgame.gui.GUIComponent
feud.testgame.gui.Button
- public class Button
- extends GUIComponent
Constructor Summary |
Button(int xpos,
int ypos,
int xdim,
int ydim)
|
Method Summary |
void |
draw(com.threed.jpct.FrameBuffer buffer)
Draws this component and all of its childs. |
boolean |
evaluateInput(MouseMapper mouse,
com.threed.jpct.util.KeyMapper keyMapper)
Processes key and mouse events in the context of this component. |
void |
setHideLabel(boolean hide)
|
void |
setLabel(java.lang.String label)
|
void |
setListener(GUIListener bl)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Button
public Button(int xpos,
int ypos,
int xdim,
int ydim)
setHideLabel
public void setHideLabel(boolean hide)
setLabel
public void setLabel(java.lang.String label)
setListener
public void setListener(GUIListener bl)
evaluateInput
public boolean evaluateInput(MouseMapper mouse,
com.threed.jpct.util.KeyMapper keyMapper)
- Description copied from class:
GUIComponent
- Processes key and mouse events in the context of this component. It then continues processing
on the child components until the event got comsumed by one or the last child has been processed.
- Overrides:
evaluateInput
in class GUIComponent
- Parameters:
mouse
- the MouseMapper used to process mouse eventskeyMapper
- the KeyMapper used to process key events
- Returns:
- boolean true, if an event occured in the context of this component or one of its child components.
draw
public void draw(com.threed.jpct.FrameBuffer buffer)
- Description copied from class:
GUIComponent
- Draws this component and all of its childs. Drawing in this "toolkit" is limited to label and
text rendering. Rendering the actual component isn't done by this toolkit, but can be added easily.
- Overrides:
draw
in class GUIComponent
- Parameters:
buffer
- the FrameBuffer on which to draw to