@Override public void main(int delta) { GameData.render(); GL11.glLoadIdentity(); GL11.glOrtho(0, GameSettings.getScreenX(), 0, GameSettings.getScreenY(), -1, 1); GL11.glColor4d(0, 0, 0, .7); GL11.glBegin(GL11.GL_TRIANGLE_FAN); GL11.glVertex2d(0, 0); GL11.glVertex2d(GameSettings.getScreenX(), 0); GL11.glVertex2d(GameSettings.getScreenX(), GameSettings.getScreenY()); GL11.glVertex2d(0, GameSettings.getScreenY()); GL11.glEnd(); float ratio = ((float) (GameSettings.getScreenY()) / GameSettings.getScreenX()); GL11.glLoadIdentity(); GL11.glOrtho( -GameData.zoom, GameSettings.getScreenX() + GameData.zoom, -GameData.zoom * (ratio), GameSettings.getScreenY() + GameData.zoom * (ratio), -1, 1); for (Button b : buttons) { b.render(); } }
@Override public void mouseInput(ArrayList<Integer> a) { for (Button b : buttons) { b.mouseInput(a); } }