@@ -0,0 +1,1235 @@
+package eco;%0A%0Aimport org.lwjgl.opengl.GL11;%0Aimport java.awt.Rectangle;%0A%0Apublic class Button%7B%0A%0A%09public float x;%0A%09public float y;%0A%0A%09public float size;%0A%0A%09private boolean clickFlag = false;%0A%0A%09public int tex;%0A%09public int tey;%0A%09%0A%09public Button(float x, float y, float size, int tex, int tey)%7B%0A%09%09this.x = x;%0A%09%09this.y = y;%0A%09%09this.size = size;%0A%09%09this.tex = tex;%0A%09%09this.tey = tey;%0A%09%7D%0A%0A%09public void click(float mousex, float mousey)%7B%0A%09%09Rectangle rect = new Rectangle((int) x, (int)y, (int)size, (int)size);%0A%09%09if (rect.contains(mousex, mousey))%7B%09%0A%09%09%09clickFlag = true;%09%09%0A%09%09%7D%0A%09%7D%0A%0A%09public boolean checkForClick()%7B%0A%09%09if (clickFlag)%7B%0A%09%09%09clickFlag = false;%0A%09%09%09return true;%09%09%0A%09%09%7D%0A%09%09return false;%0A%09%7D%0A%0A%09public void render()%7B%0A%09%09TextureAtlas atlas = Render.atlas;%09%09%0A%09%09GL11.glBegin(GL11.GL_QUADS);%0A%09%09GL11.glVertex2f(x, y);%0A%09%09GL11.glTexCoord2f(atlas.getCoord(tex, true), atlas.getCoord(tey, true));%0A%09%09GL11.glVertex2f(x + size, y);%0A%09%09GL11.glTexCoord2f(atlas.getCoord(tex, false), atlas.getCoord(tey, true));%0A%09%09GL11.glVertex2f(x + size, y + size);%0A%09%09GL11.glTexCoord2f(atlas.getCoord(tex, false), atlas.getCoord(tey, false));%0A%09%09GL11.glVertex2f(x, y + size);%0A%09%09GL11.glTexCoord2f(atlas.getCoord(tex, true), atlas.getCoord(tey, false));%0A%09%09GL11.glEnd();%0A%09%09%0A%09%7D%0A%0A%09%0A%09%0A%7D%0A

Create Button.java