//GENERAL public void nullOutControls() { btnReturn = null; ctrlUpArrow = null; ctrlDownArrow = null; ctrlLeftArrow = null; ctrlRightArrow = null; ctrlUpRightArrow = null; ctrlDownLeftArrow = null; ctrlUpLeftArrow = null; ctrlDownRightArrow = null; btnInventory = null; btnHelp = null; tglSound = null; }
public void setToggleButtonsStart() { if (tglSound == null) { tglSound = new IbbToggleButton(gv); tglSound.ImgOn = this.LoadBitmap("tgl_music_on"); // BitmapFactory.decodeResource(getResources(), R.drawable.tgl_sound_on); tglSound.ImgOff = this.LoadBitmap("tgl_music_off"); // BitmapFactory.decodeResource(getResources(), R.drawable.tgl_sound_off); tglSound.X = 3 * gv.squareSize + gv.oXshift + (gv.squareSize/2); tglSound.Y = 9 * (gv.squareSize) + (gv.squareSize/2); tglSound.Height = (int)(gv.ibbheight / 2 * gv.screenDensity); tglSound.Width = (int)(gv.ibbwidthR / 2 * gv.screenDensity); } }
public void setToggleButtonsStart() { int pW = (int)((float)gv.screenWidth / 100.0f); int pH = (int)((float)gv.screenHeight / 100.0f); int padW = gv.squareSize/6; if (tglGrid == null) { tglGrid = new IbbToggleButton(gv); tglGrid.ImgOn = gv.cc.LoadBitmap("tgl_grid_on"); tglGrid.ImgOff = gv.cc.LoadBitmap("tgl_grid_off"); tglGrid.X = 1 * gv.squareSize + gv.oXshift + (gv.squareSize/2); tglGrid.Y = 9 * (gv.squareSize) + (gv.squareSize/2); tglGrid.Height = (int)(gv.ibbheight / 2 * gv.screenDensity); tglGrid.Width = (int)(gv.ibbwidthR / 2 * gv.screenDensity); tglGrid.toggleOn = true; } if (tglHP == null) { tglHP = new IbbToggleButton(gv); tglHP.ImgOn = gv.cc.LoadBitmap("tgl_hp_on"); // BitmapFactory.decodeResource(getResources(), R.drawable.tgl_hp_on); tglHP.ImgOff = gv.cc.LoadBitmap("tgl_hp_off"); // BitmapFactory.decodeResource(getResources(), R.drawable.tgl_hp_off); tglHP.X = 2 * gv.squareSize + gv.oXshift + (gv.squareSize/2); tglHP.Y = 8 * gv.squareSize + (gv.squareSize/2); tglHP.Height = (int)(gv.ibbheight / 2 * gv.screenDensity); tglHP.Width = (int)(gv.ibbwidthR / 2 * gv.screenDensity); } if (tglSP == null) { tglSP = new IbbToggleButton(gv); tglSP.ImgOn = gv.cc.LoadBitmap("tgl_sp_on"); // BitmapFactory.decodeResource(getResources(), R.drawable.tgl_sp_on); tglSP.ImgOff = gv.cc.LoadBitmap("tgl_sp_off"); // BitmapFactory.decodeResource(getResources(), R.drawable.tgl_sp_off); tglSP.X = 3 * gv.squareSize + gv.oXshift + (gv.squareSize/2); tglSP.Y = 8 * gv.squareSize + (gv.squareSize/2); tglSP.Height = (int)(gv.ibbheight / 2 * gv.screenDensity); tglSP.Width = (int)(gv.ibbwidthR / 2 * gv.screenDensity); } if (tglSpeed == null) { tglSpeed = new IbbToggleButton(gv); tglSpeed.ImgOn = gv.cc.LoadBitmap("tgl_speed_1"); // BitmapFactory.decodeResource(getResources(), R.drawable.tgl_sp_on); tglSpeed.ImgOff = gv.cc.LoadBitmap("tgl_speed_1"); // BitmapFactory.decodeResource(getResources(), R.drawable.tgl_sp_off); tglSpeed.X = 4 * gv.squareSize + gv.oXshift + (gv.squareSize/2); tglSpeed.Y = 9 * gv.squareSize + (gv.squareSize/2); tglSpeed.Height = (int)(gv.ibbheight / 2 * gv.screenDensity); tglSpeed.Width = (int)(gv.ibbwidthR / 2 * gv.screenDensity); } if (tglSoundFx == null) { tglSoundFx = new IbbToggleButton(gv); tglSoundFx.ImgOn = gv.cc.LoadBitmap("tgl_sound_on"); // BitmapFactory.decodeResource(getResources(), R.drawable.tgl_sp_on); tglSoundFx.ImgOff = gv.cc.LoadBitmap("tgl_sound_off"); // BitmapFactory.decodeResource(getResources(), R.drawable.tgl_sp_off); tglSoundFx.X = 5 * gv.squareSize + gv.oXshift + (gv.squareSize/2); tglSoundFx.Y = 9 * gv.squareSize + (gv.squareSize/2); tglSoundFx.Height = (int)(gv.ibbheight / 2 * gv.screenDensity); tglSoundFx.Width = (int)(gv.ibbwidthR / 2 * gv.screenDensity); } if (tglHelp == null) { tglHelp = new IbbToggleButton(gv); tglHelp.ImgOn = gv.cc.LoadBitmap("tgl_help_on"); // BitmapFactory.decodeResource(getResources(), R.drawable.tgl_sp_on); tglHelp.ImgOff = gv.cc.LoadBitmap("tgl_help_on"); // BitmapFactory.decodeResource(getResources(), R.drawable.tgl_sp_off); tglHelp.X = 5 * gv.squareSize + gv.oXshift + (gv.squareSize/2); tglHelp.Y = 8 * gv.squareSize + (gv.squareSize/2); tglHelp.Height = (int)(gv.ibbheight / 2 * gv.screenDensity); tglHelp.Width = (int)(gv.ibbwidthR / 2 * gv.screenDensity); } if (tglKill == null) { tglKill = new IbbToggleButton(gv); tglKill.ImgOn = gv.cc.LoadBitmap("tgl_kill_on"); // BitmapFactory.decodeResource(getResources(), R.drawable.tgl_sp_on); tglKill.ImgOff = gv.cc.LoadBitmap("tgl_kill_on"); // BitmapFactory.decodeResource(getResources(), R.drawable.tgl_sp_off); tglKill.X = 0 * gv.squareSize + gv.oXshift + (gv.squareSize/2); tglKill.Y = 9 * gv.squareSize + (gv.squareSize/2); tglKill.Height = (int)(gv.ibbheight / 2 * gv.screenDensity); tglKill.Width = (int)(gv.ibbwidthR / 2 * gv.screenDensity); } }