DEADSOFTWARE

Optimize font
[cavedroid.git] / core / src / ru / deadsoftware / cavecraft / menu / objects / Button.java
1 package ru.deadsoftware.cavecraft.menu.objects;
3 import com.badlogic.gdx.math.Rectangle;
5 public class Button {
7 private Rectangle rect;
8 private String label;
9 private int type;
11 public Button(String label, float x, float y, float width, float heigth, int type) {
12 this.label = label;
13 rect = new Rectangle(x, y, width, heigth);
14 this.type = type;
15 }
17 public Button(String label, float x, float y, float width, float heigth) {
18 this(label, x, y, width, heigth, 1);
19 }
21 public Button(String label, float x, float y) {
22 this(label, x, y, 200, 20, 1);
23 }
25 public Rectangle getRect() {
26 return rect;
27 }
29 public String getLabel() {
30 return label;
31 }
33 public float getX() {
34 return rect.x;
35 }
37 public float getY() {
38 return rect.y;
39 }
41 public float getWidth() {
42 return rect.width;
43 }
45 public float getHeight() {
46 return rect.height;
47 }
49 public int getType() {
50 return type;
51 }
53 public void setType(int type) {
54 this.type = type;
55 }
57 }