package com.medievaltech.gui; import android.graphics.*; public class GUIObject { protected int x, y, width, height; protected Paint p; //all properties of the object are determined through the paint object public GUIObject(int newX, int newY, int newWidth, int newHeight, Paint p) { x = newX; y = newY; width = newWidth; height = newHeight; this.p = p; } public void draw(Canvas c) { } public boolean isClicked(float xCoord, float yCoord) { return x <= xCoord && xCoord <= x+width && y <= yCoord && yCoord <= y+height; } public int getX() { return x; } public int getY() { return y; } public int getWidth() { return width; } public int getHeight() { return height; } }