Package com.dragonboatrace.entities
Class Button
- java.lang.Object
-
- com.dragonboatrace.entities.Entity
-
- com.dragonboatrace.entities.Button
-
public class Button extends Entity
Represents a UI Button.
-
-
Constructor Summary
Constructors Constructor Description Button(com.badlogic.gdx.math.Vector2 pos, java.lang.String activeTexture, java.lang.String inactiveTexture)Create a new button at a position with an inactive texture and an active texture.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisHovering()If the mouse is hovering over the button.voidrender(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)Render the button on the screen.
-
-
-
Constructor Detail
-
Button
public Button(com.badlogic.gdx.math.Vector2 pos, java.lang.String activeTexture, java.lang.String inactiveTexture)Create a new button at a position with an inactive texture and an active texture.- Parameters:
pos- The position of the button on-screen.inactiveTexture- The texture of the button when not hovered over.activeTexture- The texture of the button when it is hovered over.
-
-