gt: 		np.y = -0.3F;
context: /*
  Ace of Spades remake
  Copyright (C) 2013 ByteBit
  
  This program is free software; you can redistribute it and/or modify it under the terms of
  the GNU General Public License as published by the Free Software Foundation; either
  version 3 of the License, or (at your option) any later version.
  
  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU General Public License for more details.
  
  You should have received a copy of the GNU General Public License along with this program;
  if not, see <http://www.gnu.org/licenses/>.
  */
  
  
  package bin;
  
  import javax.media.opengl.GL2;
  import javax.media.opengl.glu.GLU;
  
  public class ScreenMainMenu extends Screen {
  	
  	public float rotate = 0.0F;
  	private boolean view = true;
  	public Entity player = new Entity(this.updater.render.world);
  	public Entity weapon = new Entity(this.updater.render.world);
  	
  	private int button = 0;
      
      private float logo_scale = 1.0F;
      private boolean logo_anim_direction = false;
  
  	public ScreenMainMenu(Updater update) {
  		super(update);
  		player.loadVoxelData("/kv6/player.kv6");
  		weapon.loadVoxelData("/kv6/rifle.kv6");
  		weapon.scale = true;
  	}
  	
  	public void mouseOver(int par0, int par1) {
  		/*if(par0<this.updater.width/2 && par1>this.updater.height/6 && par1<this.updater.height-this.updater.height/6) {
  			if(par0<this.updater.width/4) {
  				this.rotate = this.rotate - 1F;
  			} else {
  				this.rotate = this.rotate + 1F;
  			}
  		}*/
  	}
  	
  	public void mouse(int b, int x, int y) {
  		if(x<this.updater.width/2 && b==1) {
  			//view = !view;
  		}
  		
  		this.button = 0;
  		
  		if(x>(this.updater.width/2F*0.5F)+this.updater.width/2F-(this.updater.width/9.6F)*1.5F && x<(this.updater.width/2F*0.5F)+this.updater.width/2F+(this.updater.width/9.6F)*1.5F && y>this.updater.height/2+(this.updater.height/2*0.1F)-(this.updater.height/32F)*1.5F && y<this.updater.height/2+(this.updater.height/2*0.1F)+(this.updater.height/32F)*1.5F) {
  			this.button = 1;
  		}
  		
  		if(x>(this.updater.width/2F*0.5F)+this.updater.width/2F-(this.updater.width/9.6F)*1.5F && x<(this.updater.width/2F*0.5F)+this.updater.width/2F+(this.updater.width/9.6F)*1.5F && y>this.updater.height/2+(this.updater.height/2*0.3F)-(this.updater.height/32F)*1.5F && y<this.updater.height/2+(this.updater.height/2*0.3F)+(this.updater.height/32F)*1.5F) {
  			this.button = 2;
  		}
  		
  		if(x>(this.updater.width/2F*0.5F)+this.updater.width/2F-(this.updater.width/9.6F)*1.5F && x<(this.updater.width/2F*0.5F)+this.updater.width/2F+(this.updater.width/9.6F)*1.5F && y>this.updater.height/2+(this.updater.height/2*0.55F)-(this.updater.height/32F)*1.5F && y<this.updater.height/2+(this.updater.height/2*0.55F)+(this.updater.height/32F)*1.5F) {
  			this.button = 3;
  		}
  		
  		if(this.button==1 && b==1) {
  			this.updater.setScreen(new ScreenServerList(this.updater,this.rotate,this.player,this.weapon));
  		}
  		if(this.button==2 && b==1) {
  			this.updater.setScreen(new ScreenSettings(this.updater,this.rotate,this.player,this.weapon));
  		}
  		if(this.button==3 && b==1) {
  			this.updater.shutdown();
  		}
  	}
  	
  	public void update() {
  		if(!this.logo_anim_direction) {
  			this.logo_scale = this.logo_scale - 0.0005F;
  		}
  		if(this.logo_anim_direction) {
  			this.logo_scale = this.logo_scale + 0.0005F;
  		}
  		if(this.logo_anim_direction && this.logo_scale>1.0F) {
  			this.logo_anim_direction = false;
  		}
  		if(!this.logo_anim_direction && this.logo_scale<0.95F) {
  			this.logo_anim_direction = true;
  		}
  		this.rotate = this.rotate - 1F;
  	}
  
  	public void render(GL2 gl2, GLU glu) {
  		gl2.glMatrixMode(GL2.GL_PROJECTION);
  		gl2.glLoadIdentity();
  		glu.gluOrtho2D(0, 0, this.updater.width, this.updater.height);
  		gl2.glDisable(GL2.GL_DEPTH_TEST);
  		gl2.glDepthMask(false);
  		gl2.glMatrixMode(GL2.GL_MODELVIEW);
  		
  		gl2.glLoadIdentity();
  	    gl2.glColor3f(1.0F, 1.0F, 1.0F);
  	    this.updater.render.textureHelper.bindTexture(12, gl2);
  	    this.updater.render.textureHelper.setTextureFilter(true,gl2);
  		gl2.glBegin(GL2.GL_QUADS);
  		gl2.glTexCoord2f(0.0F,0.0F);
  		gl2.glVertex3f(-1F, -1F, 0.0F);
  		gl2.glTexCoord2f(1.0F,0.0F);
  		gl2.glVertex3f(1F, -1F, 0.0F);
  		gl2.glTexCoord2f(1.0F,1.0F);
  		gl2.glVertex3f(1F, 1F, 0.0F);
  		gl2.glTexCoord2f(0.0F,1.0F);
  		gl2.glVertex3f(-1F, 1F, 0.0F);
  	    gl2.glEnd();
  	    
  	    gl2.glDepthMask(true);
  	    gl2.glEnable(GL2.GL_DEPTH_TEST);
  		
  		//this.rotate = this.rotate + 0.1F;
  		gl2.glLoadIdentity();
  		gl2.glMatrixMode(GL2.GL_PROJECTION);
  		gl2.glLoadIdentity();
  		glu.gluPerspective(45, (float) this.updater.width / (float) this.updater.height,0.001,128);
  		if(view) {
  		 glu.gluLookAt(16F,5F,60F,16F,6F,0F,0F,1F,0F);
  		} else {
  		 glu.gluLookAt(8F,41F,43F,12F,10F,0F,0F,1F,0F);
  		}
  		gl2.glMatrixMode(GL2.GL_MATRIX_MODE);
  		this.updater.render.textureHelper.disableTextures(gl2);
  		gl2.glRotatef(this.rotate,0.0F,1.0F,0.0F);
  		gl2.glTranslatef(0.0F, 0.0F, 0.0F);
  		player.setPosition(-8, -8, -8);
  		player.render(gl2);
  		weapon.setPosition(12,18,-10);
  		weapon.render(gl2);
  		
  		super.render(gl2,glu);
  		
  	    gl2.glDisable(GL2.GL_CULL_FACE);
  	    
  	    this.updater.render.textureHelper.setTextureFilter(true, gl2);
  		
  		this.updater.render.textureHelper.bindTexture(11, gl2);
  		gl2.glPushMatrix();
  		gl2.glTranslatef(0.5F,0.5F,0.0F);
  		gl2.glScalef(((3.0F/this.updater.width)*(this.updater.width/9.6F))*this.logo_scale,((3.0F/this.updater.height)*(this.updater.height/7.2F))*this.logo_scale,1.0F);
  	    gl2.glBegin(GL2.GL_QUADS);
  		gl2.glTexCoord2f(0.0F,0.0F);
  		gl2.glVertex3f(-1F, -1F, 0.0F);
  		gl2.glTexCoord2f(1.0F,0.0F);
  		gl2.glVertex3f(1F, -1F, 0.0F);
  		gl2.glTexCoord2f(1.0F,1.0F);
  		gl2.glVertex3f(1F, 1F, 0.0F);
  		gl2.glTexCoord2f(0.0F,1.0F);
  		gl2.glVertex3f(-1F, 1F, 0.0F);
  	    gl2.glEnd();
  	    gl2.glPopMatrix();
  	    
  	    
  	    if(this.button==1) {
  	    	this.updater.render.textureHelper.bindTexture(10, gl2);
  	    } else {
  	    	this.updater.render.textureHelper.bindTexture(22, gl2);
  	    }
  	    
  	    this.updater.render.textureHelper.setTextureFilter(true, gl2);
  	    
  	    gl2.glPushMatrix();
  		gl2.glTranslatef(0.5F,-0.1F,0.0F);
  		gl2.glScalef((3.0F/this.updater.width)*(this.updater.width/9.6F),(3.0F/this.updater.height)*(this.updater.height/32F),1.0F);
  	    gl2.glBegin(GL2.GL_QUADS);
  		gl2.glTexCoord2f(0.0F,0.0F);
  		gl2.glVertex3f(-1F, -1F, 0.0F);
  		gl2.glTexCoord2f(1.0F,0.0F);
  		gl2.glVertex3f(1F, -1F, 0.0F);
  		gl2.glTexCoord2f(1.0F,1.0F);
  		gl2.glVertex3f(1F, 1F, 0.0F);
  		gl2.glTexCoord2f(0.0F,1.0F);
  		gl2.glVertex3f(-1F, 1F, 0.0F);
  	    gl2.glEnd();
  	    gl2.glPopMatrix();
  	    
  	    
  	    if(this.button==2) {
  	    	this.updater.render.textureHelper.bindTexture(10, gl2);
  	    } else {
  	    	this.updater.render.textureHelper.bindTexture(22, gl2);
  	    }
  	    
  	    this.updater.render.textureHelper.setTextureFilter(true, gl2);
  	    
  	    gl2.glPushMatrix();
  		gl2.glTranslatef(0.5F,-0.3F,0.0F);
  		gl2.glScalef((3.0F/this.updater.width)*(this.updater.width/9.6F),(3.0F/this.updater.height)*(this.updater.height/32F),1.0F);
  	    gl2.glBegin(GL2.GL_QUADS);
  		gl2.glTexCoord2f(0.0F,0.0F);
  		gl2.glVertex3f(-1F, -1F, 0.0F);
  		gl2.glTexCoord2f(1.0F,0.0F);
  		gl2.glVertex3f(1F, -1F, 0.0F);
  		gl2.glTexCoord2f(1.0F,1.0F);
  		gl2.glVertex3f(1F, 1F, 0.0F);
  		gl2.glTexCoord2f(0.0F,1.0F);
  		gl2.glVertex3f(-1F, 1F, 0.0F);
  	    gl2.glEnd();
  	    gl2.glPopMatrix();
  	    
  	    if(this.button==3) {
  	    	this.updater.render.textureHelper.bindTexture(10, gl2);
  	    } else {
  	    	this.updater.render.textureHelper.bindTexture(22, gl2);
  	    }
  	    
  	    this.updater.render.textureHelper.setTextureFilter(true, gl2);
  	    
  	    gl2.glPushMatrix();
  		gl2.glTranslatef(0.5F,-0.55F,0.0F);
  		gl2.glScalef((3.0F/this.updater.width)*(this.updater.width/9.6F),(3.0F/this.updater.height)*(this.updater.height/32F),1.0F);
  	    gl2.glBegin(GL2.GL_QUADS);
  		gl2.glTexCoord2f(0.0F,0.0F);
  		gl2.glVertex3f(-1F, -1F, 0.0F);
  		gl2.glTexCoord2f(1.0F,0.0F);
  		gl2.glVertex3f(1F, -1F, 0.0F);
  		gl2.glTexCoord2f(1.0F,1.0F);
  		gl2.glVertex3f(1F, 1F, 0.0F);
  		gl2.glTexCoord2f(0.0F,1.0F);
  		gl2.glVertex3f(-1F, 1F, 0.0F);
  	    gl2.glEnd();
  	    gl2.glPopMatrix();
  	    
  	    /*this.updater.render.textureHelper.bindTexture(27, gl2);
  	    gl2.glPushMatrix();
  		gl2.glTranslatef(-1.0F+(this.updater.serverlist.test.getWidth()/1920F)*(2.0F/16F*9F)/2F,-0.96F+(this.updater.serverlist.test.getHeight()/1920F)*(2.0F/16F*16F)/2F+(3.0F/this.updater.height)*(this.updater.height/32F)*(1F/2F)/1.5F*2.0F,0.0F);
  		gl2.glScalef((this.updater.serverlist.test.getWidth()/1920F)*(2.0F/16F*9F)/2F,(this.updater.serverlist.test.getHeight()/1920F)*(2.0F/16F*16F)/2F,1.0F);
  	    gl2.glBegin(GL2.GL_QUADS);
  		gl2.glTexCoord2f(0.0F,0.0F);
  		gl2.glVertex3f(-1F, -1F, 0.0F);
  		gl2.glTexCoord2f(1.0F,0.0F);
  		gl2.glVertex3f(1F, -1F, 0.0F);
  		gl2.glTexCoord2f(1.0F,1.0F);
  		gl2.glVertex3f(1F, 1F, 0.0F);
  		gl2.glTexCoord2f(0.0F,1.0F);
  		gl2.glVertex3f(-1F, 1F, 0.0F);
  	    gl2.glEnd();
  	    gl2.glPopMatrix();*/
  	    
  	    NumberPrinter np = new NumberPrinter();
  	    np.setNumber("Play game");
  		updater.render.textureHelper.bindTexture(8, gl2);
  		updater.render.textureHelper.setTextureFilter(true,gl2);
  		np.x = 0.55F-((3.0F/this.updater.width)*(this.updater.width/9.6F));
  		np.y = -0.1F;
  		np.setColor(1.0F,1.0F,1.0F);
  	    np.setScale(((3.0F/this.updater.height)*(this.updater.height/32F))*(0.4F/2F),(3.0F/this.updater.height)*(this.updater.height/32F)*(1F/2F));
  	    np.render(gl2);
  	    
  	    np.setNumber("Game settings");
  		updater.render.textureHelper.bindTexture(8, gl2);
  		np.setColor(1.0F,1.0F,1.0F);
  		updater.render.textureHelper.setTextureFilter(true,gl2);
  