zombie.ui
Class GenericButton

java.lang.Object
  extended by zombie.ui.UIElement
      extended by zombie.ui.GenericButton

public class GenericButton
extends UIElement

Author:
Nick

Field Summary
 boolean clicked
           
 UIElement MessageTarget
           
 boolean mouseOver
           
 java.lang.String name
           
 java.lang.String text
           
 
Fields inherited from class zombie.ui.UIElement
anchorBottom, anchorLeft, anchorRight, anchorTop, bScrollChildren, bScrollWithParent, capture, clickedValue, Controls, defaultDraw, followGameWorld, height, IgnoreLossControl, Parent, playerContext, table, visible, width, x, y
 
Constructor Summary
GenericButton(UIElement messages, float x, float y, float width, float height, java.lang.String name, java.lang.String text, Texture UpTex, Texture DownTex)
           
GenericButton(UIEventHandler messages, float x, float y, float width, float height, java.lang.String name, java.lang.String text, Texture UpTex, Texture DownTex)
           
 
Method Summary
 boolean onMouseDown(int x, int y)
           
 boolean onMouseMove(int dx, int dy)
           
 void onMouseMoveOutside(int dx, int dy)
           
 boolean onMouseUp(int x, int y)
           
 void render()
           
 
Methods inherited from class zombie.ui.UIElement
AddChild, bringToTop, ButtonClicked, ClearChildren, clearMaxDrawHeight, clearStencilRect, DrawText, DrawText, DrawTextCentre, DrawTextCentre, DrawTextRight, DrawTextRight, DrawTexture_FlippedX, DrawTexture_FlippedXIgnoreOffset, DrawTexture, DrawTextureCol, DrawTextureColor, DrawTextureIgnoreOffset, DrawTextureScaled, DrawTextureScaledCol, DrawTextureScaledCol, DrawTextureScaledColor, DrawUVSliceTexture, getAbsoluteX, getAbsoluteY, getClickedValue, getControls, getHeight, getParent, getPlayerContext, getScrollChildren, getScrollWithParent, getTable, getWidth, getX, getXScroll, getXScrolled, getY, getYScroll, getYScrolled, ignoreHeightChange, ignoreWidthChange, isAnchorBottom, isAnchorLeft, isAnchorRight, isAnchorTop, isCapture, isDefaultDraw, isFollowGameWorld, isIgnoreLossControl, isVisible, onMouseWheel, onresize, onResize, onRightMouseDown, onRightMouseUp, RemoveChild, RemoveControl, resumeStencil, setAlwaysOnTop, setAnchorBottom, setAnchorLeft, setAnchorRight, setAnchorTop, setCapture, setClickedValue, setConsumeMouseEvents, setControls, setDefaultDraw, setFollowGameWorld, setHeight, setHeightSilent, setIgnoreLossControl, setMaxDrawHeight, setParent, setPlayerContext, setScrollChildren, setScrollWithParent, setStencilRect, setTable, setVisible, setWidth, setWidthSilent, setX, setXScroll, setY, setYScroll, suspendStencil, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clicked

public boolean clicked

MessageTarget

public UIElement MessageTarget

mouseOver

public boolean mouseOver

name

public java.lang.String name

text

public java.lang.String text
Constructor Detail

GenericButton

public GenericButton(UIElement messages,
                     float x,
                     float y,
                     float width,
                     float height,
                     java.lang.String name,
                     java.lang.String text,
                     Texture UpTex,
                     Texture DownTex)

GenericButton

public GenericButton(UIEventHandler messages,
                     float x,
                     float y,
                     float width,
                     float height,
                     java.lang.String name,
                     java.lang.String text,
                     Texture UpTex,
                     Texture DownTex)
Method Detail

onMouseDown

public boolean onMouseDown(int x,
                           int y)
Overrides:
onMouseDown in class UIElement

onMouseMove

public boolean onMouseMove(int dx,
                           int dy)
Overrides:
onMouseMove in class UIElement

onMouseMoveOutside

public void onMouseMoveOutside(int dx,
                               int dy)
Overrides:
onMouseMoveOutside in class UIElement

onMouseUp

public boolean onMouseUp(int x,
                         int y)
Overrides:
onMouseUp in class UIElement

render

public void render()
Overrides:
render in class UIElement