public void doCleanUp()
 {
     btnSpellSlots.Clear();
     btnHelp = null;
     btnSelect = null;
     btnExit = null;
 }
        public void setControlsStart()
        {
            int pW   = (int)((float)gv.screenWidth / 100.0f);
            int pH   = (int)((float)gv.screenHeight / 100.0f);
            int padW = gv.squareSize / 6;

            if (btnReturn == null)
            {
                btnReturn        = new IbbButton(gv, 1.0f);
                btnReturn.Text   = "RETURN SELECTED";
                btnReturn.Img    = gv.cc.LoadBitmap("btn_large");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnReturn.Glow   = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnReturn.X      = (gv.screenWidth / 2) - (int)(170.0f * gv.screenDensity / 2.0f);
                btnReturn.Y      = 10 * gv.squareSize + pH * 2;
                btnReturn.Height = (int)(50 * gv.screenDensity);
                btnReturn.Width  = (int)(170 * gv.screenDensity);
            }

            for (int x = 0; x < 6; x++)
            {
                IbbButton btnNew = new IbbButton(gv, 1.0f);
                btnNew.Img    = gv.cc.LoadBitmap("item_slot");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot);
                btnNew.Glow   = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnNew.X      = ((x) * gv.squareSize) + (padW * (x + 1)) + gv.oXshift;
                btnNew.Y      = pH * 2;
                btnNew.Height = (int)(50 * gv.screenDensity);
                btnNew.Width  = (int)(50 * gv.screenDensity);

                btnPartyIndex.Add(btnNew);
            }
        }
 public void doCleanUp()
 {
     btnPortraitSlot.Clear();
     btnPortraitsLeft  = null;
     btnPortraitsRight = null;
     btnPageIndex      = null;
     btnAction         = null;
     btnExit           = null;
 }
Beispiel #4
0
 public void doCleanUp()
 {
     btnTokenSlot.Clear();
     btnTokensLeft  = null;
     btnTokensRight = null;
     btnPageIndex   = null;
     btnAction      = null;
     btnExit        = null;
 }
 public void doCleanUp()
 {
     btnSpellSlots.Clear();
     btnHelp        = null;
     btnSelect      = null;
     btnExit        = null;
     btnTokensLeft  = null;
     btnTokensRight = null;
     btnPageIndex   = null;
 }
Beispiel #6
0
 public void journalCleanup()
 {
     //gv.screenType = "main";
     journalBack      = null;
     btnReturnJournal = null;
     ctrlUpArrow      = null;
     ctrlDownArrow    = null;
     ctrlLeftArrow    = null;
     ctrlRightArrow   = null;
 }
Beispiel #7
0
        public void setControlsStart()
        {
            int pW          = (int)((float)gv.screenWidth / 100.0f);
            int pH          = (int)((float)gv.screenHeight / 100.0f);
            int wideX       = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2);
            int smallLeftX  = wideX - (int)(gv.ibbwidthR * gv.screenDensity);
            int smallRightX = wideX + (int)(gv.ibbwidthL * gv.screenDensity);
            int padW        = gv.squareSize / 6;

            if (btnLeft == null)
            {
                btnLeft        = new IbbButton(gv, 1.0f);
                btnLeft.Img    = gv.cc.LoadBitmap("btn_small");
                btnLeft.Img2   = gv.cc.LoadBitmap("ctrl_left_arrow");
                btnLeft.Glow   = gv.cc.LoadBitmap("btn_small_glow");
                btnLeft.X      = smallLeftX;
                btnLeft.Y      = (5 * gv.squareSize) - (pH * 2);
                btnLeft.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnLeft.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnModuleName == null)
            {
                btnModuleName        = new IbbButton(gv, 1.0f);
                btnModuleName.Img    = gv.cc.LoadBitmap("btn_large");
                btnModuleName.Glow   = gv.cc.LoadBitmap("btn_large_glow");
                btnModuleName.Text   = "";
                btnModuleName.X      = wideX;
                btnModuleName.Y      = (5 * gv.squareSize) - (pH * 2);
                btnModuleName.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnModuleName.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnRight == null)
            {
                btnRight        = new IbbButton(gv, 1.0f);
                btnRight.Img    = gv.cc.LoadBitmap("btn_small");
                btnRight.Img2   = gv.cc.LoadBitmap("ctrl_right_arrow");
                btnRight.Glow   = gv.cc.LoadBitmap("btn_small_glow");
                btnRight.X      = smallRightX;
                btnRight.Y      = (5 * gv.squareSize) - (pH * 2);
                btnRight.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnRight.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }

            if (btnExit == null)
            {
                btnExit        = new IbbButton(gv, 1.0f);
                btnExit.Img    = gv.cc.LoadBitmap("btn_large");
                btnExit.Glow   = gv.cc.LoadBitmap("btn_large_glow");
                btnExit.Text   = "EXIT";
                btnExit.X      = wideX;
                btnExit.Y      = (9 * gv.squareSize) - (pH * 2);
                btnExit.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnExit.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
        }
 public void doCleanUp()
 {
     btnInventorySlot.Clear();
     btnInventoryLeft = null;
     btnInventoryRight = null;
     btnPageIndex = null;
     btnInfo = null;
     btnAction = null;
     btnExit = null;
     btnAction2 = null;
 }
Beispiel #9
0
        public void onTouchJournal(MouseEventArgs e, MouseEventType.EventType eventType)
        {
            ctrlUpArrow.glowOn = false;
            ctrlDownArrow.glowOn = false;
            ctrlLeftArrow.glowOn = false;
            ctrlRightArrow.glowOn = false;
            btnReturnJournal.glowOn = false;

            //int eventAction = event.getAction();
            switch (eventType)
            {
            case MouseEventType.EventType.MouseDown:
            case MouseEventType.EventType.MouseMove:
                int x = (int) e.X;
                int y = (int) e.Y;
                if (ctrlUpArrow.getImpact(x, y))
                {
                    ctrlUpArrow.glowOn = true;
                }
                else if (ctrlDownArrow.getImpact(x, y))
                {
                    ctrlDownArrow.glowOn = true;
                }
                else if (ctrlLeftArrow.getImpact(x, y))
                {
                    ctrlLeftArrow.glowOn = true;
                }
                else if (ctrlRightArrow.getImpact(x, y))
                {
                    ctrlRightArrow.glowOn = true;
                }
                else if (btnReturnJournal.getImpact(x, y))
                {
                    btnReturnJournal.glowOn = true;
                }

                break;

            case MouseEventType.EventType.MouseUp:
                x = (int) e.X;
                y = (int) e.Y;

                ctrlUpArrow.glowOn = false;
                ctrlDownArrow.glowOn = false;
                ctrlLeftArrow.glowOn = false;
                ctrlRightArrow.glowOn = false;
                btnReturnJournal.glowOn = false;

                if (ctrlUpArrow.getImpact(x, y))
                {
                    //if (mod.playButtonSounds) {gv.playSoundEffect(android.view.SoundEffectConstants.CLICK);}
                    //if (mod.playButtonHaptic) {gv.performHapticFeedback(android.view.HapticFeedbackConstants.VIRTUAL_KEY);}
                    if (journalScreenQuestIndex > 0)
                    {
                        journalScreenQuestIndex--;
                        journalScreenEntryIndex = mod.partyJournalQuests[journalScreenQuestIndex].Entries.Count - 1;
                    }
                }
                else if (ctrlDownArrow.getImpact(x, y))
                {
                    //if (mod.playButtonSounds) {gv.playSoundEffect(android.view.SoundEffectConstants.CLICK);}
                    //if (mod.playButtonHaptic) {gv.performHapticFeedback(android.view.HapticFeedbackConstants.VIRTUAL_KEY);}
                    if (journalScreenQuestIndex < mod.partyJournalQuests.Count - 1)
                    {
                        journalScreenQuestIndex++;
                        journalScreenEntryIndex = mod.partyJournalQuests[journalScreenQuestIndex].Entries.Count - 1;
                    }
                }
                else if (ctrlLeftArrow.getImpact(x, y))
                {
                    //if (mod.playButtonSounds) {gv.playSoundEffect(android.view.SoundEffectConstants.CLICK);}
                    //if (mod.playButtonHaptic) {gv.performHapticFeedback(android.view.HapticFeedbackConstants.VIRTUAL_KEY);}
                    if (journalScreenEntryIndex > 0)
                    {
                        journalScreenEntryIndex--;
                    }
                }
                else if (ctrlRightArrow.getImpact(x, y))
                {
                    //if (mod.playButtonSounds) {gv.playSoundEffect(android.view.SoundEffectConstants.CLICK);}
                    //if (mod.playButtonHaptic) {gv.performHapticFeedback(android.view.HapticFeedbackConstants.VIRTUAL_KEY);}
                    if (journalScreenEntryIndex < mod.partyJournalQuests[journalScreenQuestIndex].Entries.Count - 1)
                    {
                        journalScreenEntryIndex++;
                    }
                }
                else if (btnReturnJournal.getImpact(x, y))
                {
                    //if (mod.playButtonSounds) {gv.playSoundEffect(android.view.SoundEffectConstants.CLICK);}
                    //if (mod.playButtonHaptic) {gv.performHapticFeedback(android.view.HapticFeedbackConstants.VIRTUAL_KEY);}
                    gv.screenType = "main";
                    journalBack = null;
                    btnReturnJournal = null;
                    ctrlUpArrow = null;
                    ctrlDownArrow = null;
                    ctrlLeftArrow = null;
                    ctrlRightArrow = null;
                }
                break;
            }
        }
Beispiel #10
0
        public void setControlsStart()
        {
            int pW = (int)((float)gv.screenWidth / 100.0f);
            int pH = (int)((float)gv.screenHeight / 100.0f);
            int padW = gv.squareSize/6;
            int xShift = gv.squareSize/2;
            int yShift = gv.squareSize/2;

            description = new IbbHtmlTextBox(gv, 320, 100, 500, 300);
            description.showBoxBorder = false;

            if (ctrlUpArrow == null)
            {
                ctrlUpArrow = new IbbButton(gv, 1.0f);
                ctrlUpArrow.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                ctrlUpArrow.Img2 = gv.cc.LoadBitmap("ctrl_up_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_up_arrow);
                ctrlUpArrow.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.arrow_glow);
                ctrlUpArrow.X = 12 * gv.squareSize;
                ctrlUpArrow.Y = 1 * gv.squareSize + pH * 2;
                ctrlUpArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlUpArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlDownArrow == null)
            {
                ctrlDownArrow = new IbbButton(gv, 1.0f);
                ctrlDownArrow.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                ctrlDownArrow.Img2 = gv.cc.LoadBitmap("ctrl_down_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_down_arrow);
                ctrlDownArrow.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.arrow_glow);
                ctrlDownArrow.X = 12 * gv.squareSize;
                ctrlDownArrow.Y = 2 * gv.squareSize + pH * 3;
                ctrlDownArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlDownArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlLeftArrow == null)
            {
                ctrlLeftArrow = new IbbButton(gv, 1.0f);
                ctrlLeftArrow.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                ctrlLeftArrow.Img2 = gv.cc.LoadBitmap("ctrl_left_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_left_arrow);
                ctrlLeftArrow.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.arrow_glow);
                ctrlLeftArrow.X = 10 * gv.squareSize + xShift;
                ctrlLeftArrow.Y = pH * 34;
                ctrlLeftArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlLeftArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlRightArrow == null)
            {
                ctrlRightArrow = new IbbButton(gv, 1.0f);
                ctrlRightArrow.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                ctrlRightArrow.Img2 = gv.cc.LoadBitmap("ctrl_right_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_right_arrow);
                ctrlRightArrow.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.arrow_glow);
                ctrlRightArrow.X = 11 * gv.squareSize + pW * 2 + xShift;
                ctrlRightArrow.Y = pH * 34;
                ctrlRightArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlRightArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnReturnJournal == null)
            {
                btnReturnJournal = new IbbButton(gv, 1.2f);
                btnReturnJournal.Text = "RETURN";
                btnReturnJournal.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnReturnJournal.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnReturnJournal.X = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnReturnJournal.Y = 9 * gv.squareSize + pH * 2;
                btnReturnJournal.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnReturnJournal.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
        }
Beispiel #11
0
        public void setControlsStart()
        {
            int pH = (int)((float)gv.screenHeight / 100.0f);

            if (btnNewGame == null)
            {
                btnNewGame = new IbbButton(gv, 1.0f);
                btnNewGame.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnNewGame.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnNewGame.Text = "New Game";
                btnNewGame.X = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnNewGame.Y = (4 * gv.squareSize) + (2 * pH);
                btnNewGame.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNewGame.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnLoadSavedGame == null)
            {
                btnLoadSavedGame = new IbbButton(gv, 1.0f);
                btnLoadSavedGame.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnLoadSavedGame.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnLoadSavedGame.Text = "Load Saved Game";
                btnLoadSavedGame.X = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnLoadSavedGame.Y = (5 * gv.squareSize) + (4 * pH);
                btnLoadSavedGame.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnLoadSavedGame.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnPlayerGuide == null)
            {
                btnPlayerGuide = new IbbButton(gv, 1.0f);
                btnPlayerGuide.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnPlayerGuide.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnPlayerGuide.Text = "Player's Guide";
                btnPlayerGuide.X = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnPlayerGuide.Y = (6 * gv.squareSize) + (6 * pH);
                btnPlayerGuide.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnPlayerGuide.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnBeginnerGuide == null)
            {
                btnBeginnerGuide = new IbbButton(gv, 1.0f);
                btnBeginnerGuide.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnBeginnerGuide.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnBeginnerGuide.Text = "Beginner's Guide";
                btnBeginnerGuide.X = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnBeginnerGuide.Y = (7 * gv.squareSize) + (8 * pH);
                btnBeginnerGuide.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnBeginnerGuide.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnAbout == null)
            {
                btnAbout = new IbbButton(gv, 1.0f);
                btnAbout.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnAbout.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnAbout.Text = "Credits";
                btnAbout.X = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnAbout.Y = (8 * gv.squareSize) + (10 * pH);
                btnAbout.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnAbout.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
        }
        public void setControlsStart()
        {
            int pW = (int)((float)gv.screenWidth / 100.0f);
            int pH = (int)((float)gv.screenHeight / 100.0f);
            int padW = gv.squareSize/6;
            int center = gv.screenWidth / 2;

            if (ctrlUpArrow == null)
            {
                ctrlUpArrow = new IbbButton(gv, 1.0f);
                ctrlUpArrow.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                ctrlUpArrow.Img2 = gv.cc.LoadBitmap("ctrl_up_arrow"); // BitmapFactory.decodeResource(getResources(), R.drawable.ctrl_up_arrow);
                ctrlUpArrow.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.arrow_glow);
                ctrlUpArrow.X = 12 * gv.squareSize;
                ctrlUpArrow.Y = 7 * gv.squareSize + pH * 2;
                ctrlUpArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlUpArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlLeftArrow == null)
            {
                ctrlLeftArrow = new IbbButton(gv, 1.0f);
                ctrlLeftArrow.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                ctrlLeftArrow.Img2 = gv.cc.LoadBitmap("ctrl_left_arrow"); // BitmapFactory.decodeResource(getResources(), R.drawable.ctrl_left_arrow);
                ctrlLeftArrow.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.arrow_glow);
                ctrlLeftArrow.X = 11 * gv.squareSize;
                ctrlLeftArrow.Y = 8 * gv.squareSize + pH * 2;
                ctrlLeftArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlLeftArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlRightArrow == null)
            {
                ctrlRightArrow = new IbbButton(gv, 1.0f);
                ctrlRightArrow.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                ctrlRightArrow.Img2 = gv.cc.LoadBitmap("ctrl_right_arrow"); // BitmapFactory.decodeResource(getResources(), R.drawable.ctrl_right_arrow);
                ctrlRightArrow.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.arrow_glow);
                ctrlRightArrow.X = 13 * gv.squareSize;
                ctrlRightArrow.Y = 8 * gv.squareSize + pH * 2;
                ctrlRightArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlRightArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlDownArrow == null)
            {
                ctrlDownArrow = new IbbButton(gv, 1.0f);
                ctrlDownArrow.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                ctrlDownArrow.Img2 = gv.cc.LoadBitmap("ctrl_down_arrow"); // BitmapFactory.decodeResource(getResources(), R.drawable.ctrl_down_arrow);
                ctrlDownArrow.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.arrow_glow);
                ctrlDownArrow.X = 12 * gv.squareSize;
                ctrlDownArrow.Y = 9 * gv.squareSize + pH * 2;
                ctrlDownArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlDownArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnPlayerGuideOnPcCreation == null)
            {
                btnPlayerGuideOnPcCreation = new IbbButton(gv, 1.0f);
                btnPlayerGuideOnPcCreation.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnPlayerGuideOnPcCreation.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnPlayerGuideOnPcCreation.Text = "Player's Guide";
                btnPlayerGuideOnPcCreation.X = center - (int)(gv.ibbwidthL * gv.screenDensity) - pW * 1;
                btnPlayerGuideOnPcCreation.Y = 7 * gv.squareSize;
                btnPlayerGuideOnPcCreation.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnPlayerGuideOnPcCreation.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnBeginnerGuideOnPcCreation == null)
            {
                btnBeginnerGuideOnPcCreation = new IbbButton(gv, 1.0f);
                btnBeginnerGuideOnPcCreation.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnBeginnerGuideOnPcCreation.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnBeginnerGuideOnPcCreation.Text = "Beginner's Guide";
                btnBeginnerGuideOnPcCreation.X = center - (int)(gv.ibbwidthL * gv.screenDensity) - pW * 1;
                btnBeginnerGuideOnPcCreation.Y = 8 * gv.squareSize + pH;
                btnBeginnerGuideOnPcCreation.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnBeginnerGuideOnPcCreation.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnRollStats == null)
            {
                btnRollStats = new IbbButton(gv, 1.0f);
                btnRollStats.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnRollStats.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnRollStats.Text = "Roll Stats";
                btnRollStats.X = center - (int)(gv.ibbwidthL * gv.screenDensity) - pW * 1;
                btnRollStats.Y = 6 * gv.squareSize - pH;
                btnRollStats.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnRollStats.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnFinished == null)
            {
                btnFinished = new IbbButton(gv, 1.0f);
                btnFinished.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnFinished.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnFinished.Text = "Finished";
                btnFinished.X = center + pW * 1;
                btnFinished.Y = 6 * gv.squareSize - pH;
                btnFinished.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnFinished.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnAbort == null)
            {
                btnAbort = new IbbButton(gv, 0.8f);
                btnAbort.Text = "Abort";
                btnAbort.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                btnAbort.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small_glow);
                btnAbort.X = 8 * gv.squareSize + padW * 1 + gv.oXshift;
                btnAbort.Y = 9 * gv.squareSize + pH * 2;
                btnAbort.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnAbort.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
        }
Beispiel #13
0
        public void setControlsStart()
        {
            int pW = (int)((float)gv.screenWidth / 100.0f);
            int pH = (int)((float)gv.screenHeight / 100.0f);
            int padW = gv.squareSize/6;

            htmltext = new IbbHtmlTextBox(gv, 320, 100, 500, 300);
            htmltext.showBoxBorder = false;

            for (int x = 0; x < 6; x++)
            {
                IbbButton btnNew = new IbbButton(gv, 1.0f);
                btnNew.Img = gv.cc.LoadBitmap("item_slot"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot);
                btnNew.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnNew.X = ((x+5) * gv.squareSize) + (padW * (x+1)) + gv.oXshift;
                btnNew.Y = 9 * gv.squareSize + (pH * 2);
                btnNew.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNew.Width = (int)(gv.ibbwidthR * gv.screenDensity);

                btnPartyIndex.Add(btnNew);
            }
        }
Beispiel #14
0
        public void setControlsStart()
        {
            int pW = (int)((float)gv.screenWidth / 100.0f);
            int pH = (int)((float)gv.screenHeight / 100.0f);
            int padW = gv.squareSize/6;

            if (btnSpells == null)
            {
                btnSpells = new IbbButton(gv, 0.6f);
                btnSpells.Text = "SPELLS";
                btnSpells.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnSpells.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnSpells.X = 5 * gv.squareSize + padW * 1 + gv.oXshift;
                //btnSpells.Y = 10 * gv.squareSize + pH * 2; See OnDraw for Y
                btnSpells.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnSpells.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnTraits == null)
            {
                btnTraits = new IbbButton(gv, 0.6f);
                btnTraits.Text = "TRAITS";
                btnTraits.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnTraits.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnTraits.X = 6 * gv.squareSize + padW * 2 + gv.oXshift;
                //btnSpells.Y = 10 * gv.squareSize + pH * 2; See OnDraw for Y
                btnTraits.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnTraits.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnEffects == null)
            {
                btnEffects = new IbbButton(gv, 0.6f);
                btnEffects.Text = "EFFECTS";
                btnEffects.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnEffects.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnEffects.X = 7 * gv.squareSize + padW * 3 + gv.oXshift;
                //btnSpells.Y = 10 * gv.squareSize + pH * 2; See OnDraw for Y
                btnEffects.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnEffects.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnOthers == null)
            {
                btnOthers = new IbbButton(gv, 0.6f);
                btnOthers.Text = "OTHERS";
                btnOthers.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnOthers.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnOthers.X = 8 * gv.squareSize + padW * 4 + gv.oXshift;
                //btnSpells.Y = 10 * gv.squareSize + pH * 2; See OnDraw for Y
                btnOthers.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnOthers.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnPartyRoster == null)
            {
                btnPartyRoster = new IbbButton(gv, 0.6f);
                btnPartyRoster.Text = "ROSTER";
                btnPartyRoster.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnPartyRoster.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnPartyRoster.X = 10 * gv.squareSize + (gv.squareSize/2) + gv.oXshift;
                btnPartyRoster.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnPartyRoster.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnHelp == null)
            {
                btnHelp = new IbbButton(gv, 0.8f);
                btnHelp.Text = "HELP";
                btnHelp.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnHelp.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnHelp.X = 5 * gv.squareSize + padW * 1 + gv.oXshift;
                btnHelp.Y = 9 * gv.squareSize + pH * 2;
                btnHelp.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnHelp.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnInfo == null)
            {
                btnInfo = new IbbButton(gv, 0.8f);
                btnInfo.Text = "INFO";
                btnInfo.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnInfo.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnInfo.X = (15 * gv.squareSize) - padW * 1 + gv.oXshift;
                btnInfo.Y = 9 * gv.squareSize + pH * 2;
                btnInfo.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnInfo.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnReturn == null)
            {
                btnReturn = new IbbButton(gv, 1.2f);
                btnReturn.Text = "RETURN";
                btnReturn.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnReturn.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnReturn.X = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnReturn.Y = 9 * gv.squareSize + pH * 2;
                btnReturn.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnReturn.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnLevelUp == null)
            {
                btnLevelUp = new IbbButton(gv, 1.2f);
                btnLevelUp.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnLevelUp.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnLevelUp.Text = "Level Up";
                btnLevelUp.X = 8 * gv.squareSize + padW * 4 + gv.oXshift;
                btnLevelUp.Y = pH * 4;
                btnLevelUp.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnLevelUp.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }

            if (btnMainHand == null)
            {
                btnMainHand = new IbbButton(gv, 1.0f);
                btnMainHand.Img = gv.cc.LoadBitmap("item_slot_mainhand"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot_mainhand);
                btnMainHand.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnMainHand.X = 5 * gv.squareSize + (padW * 1) + gv.oXshift;
                btnMainHand.Y = 2 * gv.squareSize; //not used, see onDraw function
                btnMainHand.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnMainHand.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnHead == null)
            {
                btnHead = new IbbButton(gv, 1.0f);
                btnHead.Img = gv.cc.LoadBitmap("item_slot_head"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot_head);
                btnHead.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnHead.X = 6 * gv.squareSize + (padW * 2) + gv.oXshift;
                btnHead.Y = 2 * gv.squareSize; //not used, see onDraw function
                btnHead.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnHead.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnNeck == null)
            {
                btnNeck = new IbbButton(gv, 1.0f);
                btnNeck.Img = gv.cc.LoadBitmap("item_slot_neck"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot_neck);
                btnNeck.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnNeck.X = 7 * gv.squareSize + (padW * 3) + gv.oXshift;
                btnNeck.Y = 2 * gv.squareSize; //not used, see onDraw function
                btnNeck.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNeck.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnOffHand == null)
            {
                btnOffHand = new IbbButton(gv, 1.0f);
                btnOffHand.Img = gv.cc.LoadBitmap("item_slot_offhand"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot_offhand);
                btnOffHand.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnOffHand.X = 8 * gv.squareSize + (padW * 4) + gv.oXshift;
                btnOffHand.Y = 2 * gv.squareSize; //not used, see onDraw function
                btnOffHand.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnOffHand.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnRing == null)
            {
                btnRing = new IbbButton(gv, 1.0f);
                btnRing.Img = gv.cc.LoadBitmap("item_slot_ring"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot_ring);
                btnRing.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnRing.X = 5 * gv.squareSize + (padW * 1) + gv.oXshift;
                btnRing.Y = 2 * gv.squareSize; //not used, see onDraw function
                btnRing.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnRing.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnBody == null)
            {
                btnBody = new IbbButton(gv, 1.0f);
                btnBody.Img = gv.cc.LoadBitmap("item_slot_body"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot_body);
                btnBody.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnBody.X = 6 * gv.squareSize + (padW * 2) + gv.oXshift;
                btnBody.Y = 2 * gv.squareSize; //not used, see onDraw function
                btnBody.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnBody.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnFeet == null)
            {
                btnFeet = new IbbButton(gv, 1.0f);
                btnFeet.Img = gv.cc.LoadBitmap("item_slot_feet"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot_feet);
                btnFeet.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnFeet.X = 7 * gv.squareSize + (padW * 3) + gv.oXshift;
                btnFeet.Y = 2 * gv.squareSize; //not used, see onDraw function
                btnFeet.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnFeet.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnRing2 == null)
            {
                btnRing2 = new IbbButton(gv, 1.0f);
                btnRing2.Img = gv.cc.LoadBitmap("item_slot_ring"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot_ring);
                btnRing2.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnRing2.X = 8 * gv.squareSize + (padW * 4) + gv.oXshift;
                btnRing2.Y = 3 * gv.squareSize + padW; //not used, see onDraw function
                btnRing2.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnRing2.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnAmmo == null)
            {
                btnAmmo = new IbbButton(gv, 1.0f);
                btnAmmo.Img = gv.cc.LoadBitmap("item_slot_ammo"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot_ring);
                btnAmmo.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnAmmo.X = 9 * gv.squareSize + (padW * 5) + gv.oXshift;
                btnAmmo.Y = 3 * gv.squareSize + padW; //not used, see onDraw function
                btnAmmo.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnAmmo.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }

            for (int x = 0; x < 6; x++)
            {
                IbbButton btnNew = new IbbButton(gv, 1.0f);
                btnNew.Img = gv.cc.LoadBitmap("item_slot"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot);
                btnNew.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnNew.X = ((x+5) * gv.squareSize) + (padW * (x+1)) + gv.oXshift;
                btnNew.Y = pH * 2;
                btnNew.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNew.Width = (int)(gv.ibbwidthR * gv.screenDensity);

                btnPartyIndex.Add(btnNew);
            }
        }
        public void setControlsStart()
        {
            int pW = (int)((float)gv.screenWidth / 100.0f);
            int pH = (int)((float)gv.screenHeight / 100.0f);
            int padW = gv.squareSize/6;

            description = new IbbHtmlTextBox(gv, 320, 100, 500, 300);
            description.showBoxBorder = false;

            if (btnInventoryLeft == null)
            {
                btnInventoryLeft = new IbbButton(gv, 1.0f);
                btnInventoryLeft.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnInventoryLeft.Img2 = gv.cc.LoadBitmap("ctrl_left_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_left_arrow);
                btnInventoryLeft.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnInventoryLeft.X = 8 * gv.squareSize;
                btnInventoryLeft.Y = (1 * gv.squareSize) - (pH * 2);
                btnInventoryLeft.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnInventoryLeft.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnPageIndex == null)
            {
                btnPageIndex = new IbbButton(gv, 1.0f);
                btnPageIndex.Img = gv.cc.LoadBitmap("btn_small_off"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_off);
                btnPageIndex.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnPageIndex.Text = "1/10";
                btnPageIndex.X = 9 * gv.squareSize;
                btnPageIndex.Y = (1 * gv.squareSize) - (pH * 2);
                btnPageIndex.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnPageIndex.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnInventoryRight == null)
            {
                btnInventoryRight = new IbbButton(gv, 1.0f);
                btnInventoryRight.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnInventoryRight.Img2 = gv.cc.LoadBitmap("ctrl_right_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_right_arrow);
                btnInventoryRight.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnInventoryRight.X = 10 * gv.squareSize;
                btnInventoryRight.Y = (1 * gv.squareSize) - (pH * 2);
                btnInventoryRight.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnInventoryRight.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }

            if (btnAction == null)
            {
                btnAction = new IbbButton(gv, 1.0f);
                if (itemSelectorType.Equals("container"))
                {
                    btnAction.Text = "TAKE ALL";
                }
                else if (itemSelectorType.Equals("equip"))
                {
                    btnAction.Text = "EQUIP SELECTED";
                }
                btnAction.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnAction.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnAction.X = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f) - (gv.squareSize * 4);
                btnAction.Y = 9 * gv.squareSize + pH * 2;
                btnAction.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnAction.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnAction2 == null)
            {
                btnAction2 = new IbbButton(gv, 1.0f);
                if (itemSelectorType.Equals("container"))
                {
                    btnAction2.Text = "TAKE SELECTED";
                }
                else if (itemSelectorType.Equals("equip"))
                {
                    btnAction2.Text = "UNEQUIP";
                }
                btnAction2.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnAction2.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnAction2.X = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f) + (gv.squareSize * 4);
                btnAction2.Y = 9 * gv.squareSize + pH * 2;
                btnAction2.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnAction2.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnExit == null)
            {
                btnExit = new IbbButton(gv, 1.0f);
                btnExit.Text = "EXIT";
                btnExit.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnExit.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnExit.X = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnExit.Y = 9 * gv.squareSize + pH * 2;
                btnExit.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnExit.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnInfo == null)
            {
                btnInfo = new IbbButton(gv, 0.8f);
                btnInfo.Text = "INFO";
                btnInfo.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnInfo.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnInfo.X = (16 * gv.squareSize) - padW * 1 + gv.oXshift;
                btnInfo.Y = 9 * gv.squareSize + pH * 2;
                btnInfo.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnInfo.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            for (int y = 0; y < slotsPerPage; y++)
            {
                IbbButton btnNew = new IbbButton(gv, 1.0f);
                btnNew.Img = gv.cc.LoadBitmap("item_slot"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot);
                btnNew.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);

                if (y < 5)
                {
                    btnNew.X = ((y + 2 + 4) * gv.squareSize) + (padW * (y+1)) + gv.oXshift;
                    btnNew.Y = 2 * gv.squareSize;
                }
                else if ((y >=5 ) && (y < 10))
                {
                    btnNew.X = ((y-5 + 2 + 4) * gv.squareSize) + (padW * ((y-5)+1)) + gv.oXshift;
                    btnNew.Y = 3 * gv.squareSize + padW;
                }
                else if ((y >=10 ) && (y < 15))
                {
                    btnNew.X = ((y-10 + 2 + 4) * gv.squareSize) + (padW * ((y-10)+1)) + gv.oXshift;
                    btnNew.Y = 4 * gv.squareSize + (padW * 2);
                }
                else
                {
                    btnNew.X = ((y-15 + 2 + 4) * gv.squareSize) + (padW * ((y-15)+1)) + gv.oXshift;
                    btnNew.Y = 5 * gv.squareSize + (padW * 3);
                }

                btnNew.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNew.Width = (int)(gv.ibbwidthR * gv.screenDensity);

                btnInventorySlot.Add(btnNew);
            }
        }
        public void setControlsStart()
        {
            List <string>       spellsForLearningTags = new List <string>();
            List <SpellAllowed> spellsForLearning     = new List <SpellAllowed>();

            int pW   = (int)((float)gv.screenWidth / 100.0f);
            int pH   = (int)((float)gv.screenHeight / 100.0f);
            int padW = gv.squareSize / 6;

            description = new IbbHtmlTextBox(gv, 320, 100, 500, 300);
            description.showBoxBorder = false;

            //added
            if (btnTokensLeft == null)
            {
                btnTokensLeft        = new IbbButton(gv, 1.0f);
                btnTokensLeft.Img    = gv.cc.LoadBitmap("btn_small");       // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnTokensLeft.Img2   = gv.cc.LoadBitmap("ctrl_left_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_left_arrow);
                btnTokensLeft.Glow   = gv.cc.LoadBitmap("btn_small_glow");  // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnTokensLeft.X      = (int)(5 * gv.squareSize) + (3 * pW);
                btnTokensLeft.Y      = (2 * gv.squareSize);
                btnTokensLeft.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnTokensLeft.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            //added
            if (btnPageIndex == null)
            {
                btnPageIndex        = new IbbButton(gv, 1.0f);
                btnPageIndex.Img    = gv.cc.LoadBitmap("btn_small_off");  // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_off);
                btnPageIndex.Glow   = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnPageIndex.Text   = "1/20";
                btnPageIndex.X      = (int)(6 * gv.squareSize) + (3 * pW);
                btnPageIndex.Y      = (2 * gv.squareSize);
                btnPageIndex.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnPageIndex.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            //added
            if (btnTokensRight == null)
            {
                btnTokensRight        = new IbbButton(gv, 1.0f);
                btnTokensRight.Img    = gv.cc.LoadBitmap("btn_small");        // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnTokensRight.Img2   = gv.cc.LoadBitmap("ctrl_right_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_right_arrow);
                btnTokensRight.Glow   = gv.cc.LoadBitmap("btn_small_glow");   // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnTokensRight.X      = (int)(7f * gv.squareSize) + (3 * pW);
                btnTokensRight.Y      = (2 * gv.squareSize);
                btnTokensRight.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnTokensRight.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }

            if (btnSelect == null)
            {
                btnSelect        = new IbbButton(gv, 0.8f);
                btnSelect.Text   = gv.mod.playerList[gv.screenCastSelector.castingPlayerIndex].playerClass.labelForUseTraitAction.ToUpper() + " SELECTED " + gv.mod.playerList[gv.screenCastSelector.castingPlayerIndex].playerClass.spellLabelSingular.ToUpper();
                btnSelect.Img    = gv.cc.LoadBitmap("btn_large");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnSelect.Glow   = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnSelect.X      = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnSelect.Y      = 9 * gv.squareSize + pH * 2;
                btnSelect.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnSelect.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnHelp == null)
            {
                btnHelp        = new IbbButton(gv, 0.8f);
                btnHelp.Text   = "HELP";
                btnHelp.Img    = gv.cc.LoadBitmap("btn_small");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnHelp.Glow   = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnHelp.X      = 5 * gv.squareSize + padW * 1 + gv.oXshift;
                btnHelp.Y      = 9 * gv.squareSize + pH * 2;
                btnHelp.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnHelp.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnExit == null)
            {
                btnExit        = new IbbButton(gv, 0.8f);
                btnExit.Text   = "RETURN";
                btnExit.Img    = gv.cc.LoadBitmap("btn_small");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnExit.Glow   = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnExit.X      = (15 * gv.squareSize) - padW * 1 + gv.oXshift;
                btnExit.Y      = 9 * gv.squareSize + pH * 2;
                btnExit.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnExit.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            for (int y = 0; y < slotsPerPage; y++)
            {
                IbbButton btnNew = new IbbButton(gv, 1.0f);
                btnNew.Img    = gv.cc.LoadBitmap("btn_small");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnNew.ImgOff = gv.cc.LoadBitmap("btn_small_off");
                btnNew.Glow   = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);

                int x  = y % 5;
                int yy = y / 5;
                btnNew.X = ((x + 4) * gv.squareSize) + (padW * (x + 1)) + gv.oXshift;
                btnNew.Y = (3 + yy) * gv.squareSize + (padW * yy + padW);

                btnNew.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNew.Width  = (int)(gv.ibbwidthR * gv.screenDensity);

                btnSpellSlots.Add(btnNew);
            }
            //DRAW ALL SPELL SLOTS
            if (isInCombat)
            {
                int cntSlot = 0;
                foreach (IbbButton btn in btnSpellSlots)
                {
                    Player pc = getCastingPlayer();

                    if (cntSlot == spellSlotIndex)
                    {
                        btn.glowOn = true;
                    }
                    else
                    {
                        btn.glowOn = false;
                    }

                    sortTraitsForLevelUp(pc);

                    //show only spells for the PC class
                    //if (cntSlot < pc.playerClass.spellsAllowed.Count)
                    if ((cntSlot + (tknPageIndex * slotsPerPage)) < backupKnownSpellTagsInCombat.Count)
                    {
                        //SpellAllowed sa = pc.playerClass.spellsAllowed[cntSlot];
                        Spell sp = gv.mod.getSpellByTag(backupKnownSpellTagsInCombat[cntSlot + (tknPageIndex * slotsPerPage)]);

                        btn.Img2     = gv.cc.LoadBitmap(sp.spellImage);
                        btn.Img2Off  = gv.cc.LoadBitmap(sp.spellImage + "_off");
                        btn.btnState = buttonState.Normal;

                        /*
                         * if (pc.knownSpellsTags.Contains(sp.tag))
                         * {
                         *  if (isInCombat) //all spells can be used in combat
                         *  {
                         *      //btn.Img = gv.cc.LoadBitmap("btn_small");
                         *      btn.btnState = buttonState.Normal;
                         *  }
                         *  //not in combat so check if spell can be used on adventure maps
                         *  else if ((sp.useableInSituation.Equals("Always")) || (sp.useableInSituation.Equals("OutOfCombat")))
                         *  {
                         *      //btn.Img = gv.cc.LoadBitmap("btn_small");
                         *      btn.btnState = buttonState.Normal;
                         *      //btn.Img2 = gv.cc.LoadBitmap(sp.spellImage);
                         *  }
                         *  else //can't be used on adventure map
                         *  {
                         *      btn.btnState = buttonState.Off;
                         *      //btn.Img2 = gv.cc.LoadBitmap(sp.spellImage);
                         *      //btn.Img2Off = gv.cc.LoadBitmap(sp.spellImage + "_off");
                         *  }
                         * }
                         * else //spell not known
                         * {
                         *  btn.btnState = buttonState.Off;
                         *  //btn.Img2 = gv.cc.LoadBitmap(sp.spellImage);
                         *  //btn.Img2Off = gv.cc.LoadBitmap(sp.spellImage + "_off");
                         * }
                         */
                    }
                    else //slot is not in spells allowed index range
                    {
                        btn.btnState = buttonState.Off;
                        btn.Img2     = null;
                        btn.Img2Off  = null;
                    }
                    cntSlot++;
                }
            }
            //ouside combat
            else
            {
                int cntSlot = 0;
                foreach (IbbButton btn in btnSpellSlots)
                {
                    Player pc = getCastingPlayer();

                    if (cntSlot == spellSlotIndex)
                    {
                        btn.glowOn = true;
                    }
                    else
                    {
                        btn.glowOn = false;
                    }

                    sortTraitsForLevelUp(pc);

                    //show only spells for the PC class
                    //if (cntSlot < pc.playerClass.spellsAllowed.Count)
                    if ((cntSlot + (tknPageIndex * slotsPerPage)) < backupKnownSpellTagsOutsideCombat.Count)
                    {
                        //SpellAllowed sa = pc.playerClass.spellsAllowed[cntSlot];
                        Spell sp = gv.mod.getSpellByTag(backupKnownSpellTagsOutsideCombat[cntSlot + (tknPageIndex * slotsPerPage)]);

                        btn.Img2     = gv.cc.LoadBitmap(sp.spellImage);
                        btn.Img2Off  = gv.cc.LoadBitmap(sp.spellImage + "_off");
                        btn.btnState = buttonState.Normal;
                    }
                    else //slot is not in spells allowed index range
                    {
                        btn.btnState = buttonState.Off;
                        btn.Img2     = null;
                        btn.Img2Off  = null;
                    }
                }
                cntSlot++;
            }
        }
        public void setControlsStart()
        {
            int pW   = (int)((float)gv.screenWidth / 100.0f);
            int pH   = (int)((float)gv.screenHeight / 100.0f);
            int padW = gv.squareSize / 6;

            for (int x = 0; x < gv.mod.MaxPartySize; x++)
            {
                IbbButton btnNew = new IbbButton(gv, 1.0f);
                gv.cc.DisposeOfBitmap(ref btnNew.Img);
                btnNew.Img = gv.cc.LoadBitmap("item_slot");         // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot);
                gv.cc.DisposeOfBitmap(ref btnNew.Glow);
                btnNew.Glow   = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnNew.X      = ((x + 5) * gv.squareSize) + (padW * (x + 1)) + gv.oXshift;
                btnNew.Y      = (gv.squareSize / 2) + (pH * 1);
                btnNew.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNew.Width  = (int)(gv.ibbwidthR * gv.screenDensity);

                btnPartyIndex.Add(btnNew);
            }
            for (int x = 0; x < 6; x++)
            {
                IbbButton btnNew = new IbbButton(gv, 1.0f);
                gv.cc.DisposeOfBitmap(ref btnNew.Img);
                btnNew.Img = gv.cc.LoadBitmap("item_slot");         // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot);
                gv.cc.DisposeOfBitmap(ref btnNew.Glow);
                btnNew.Glow   = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnNew.X      = ((x + 5) * gv.squareSize) + (padW * (x + 1)) + gv.oXshift;
                btnNew.Y      = (3 * gv.squareSize) + (pH * 2);
                btnNew.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNew.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
                btnPartyRosterIndex.Add(btnNew);
            }
            for (int x = 0; x < 6; x++)
            {
                IbbButton btnNew = new IbbButton(gv, 1.0f);
                gv.cc.DisposeOfBitmap(ref btnNew.Img);
                btnNew.Img = gv.cc.LoadBitmap("item_slot");         // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot);
                gv.cc.DisposeOfBitmap(ref btnNew.Glow);
                btnNew.Glow   = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnNew.X      = ((x + 5) * gv.squareSize) + (padW * (x + 1)) + gv.oXshift;
                btnNew.Y      = (4 * gv.squareSize) + (pH * 3);
                btnNew.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNew.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
                btnPartyRosterIndex.Add(btnNew);
            }
            if (btnDown == null)
            {
                btnDown        = new IbbButton(gv, 1.0f);
                btnDown.Img    = gv.cc.LoadBitmap("btn_small");       // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnDown.Img2   = gv.cc.LoadBitmap("ctrl_down_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_left_arrow);
                btnDown.Glow   = gv.cc.LoadBitmap("btn_small_glow");  // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnDown.X      = 7 * gv.squareSize + (gv.squareSize / 2) - (pW * 1);
                btnDown.Y      = 2 * gv.squareSize - (pH * 2);
                btnDown.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnDown.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnUp == null)
            {
                btnUp        = new IbbButton(gv, 1.0f);
                btnUp.Img    = gv.cc.LoadBitmap("btn_small");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnUp.Img2   = gv.cc.LoadBitmap("ctrl_up_arrow");  // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_right_arrow);
                btnUp.Glow   = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnUp.X      = 8 * gv.squareSize + (gv.squareSize / 2) + (pW * 1);
                btnUp.Y      = 2 * gv.squareSize - (pH * 2);
                btnUp.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnUp.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnHelp == null)
            {
                btnHelp        = new IbbButton(gv, 0.8f);
                btnHelp.Text   = "HELP";
                btnHelp.Img    = gv.cc.LoadBitmap("btn_small");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnHelp.Glow   = gv.cc.LoadBitmap("btn_small_glow");     // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnHelp.X      = 5 * gv.squareSize + padW * 1 + gv.oXshift;
                btnHelp.Y      = 9 * gv.squareSize + (pH * 2);
                btnHelp.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnHelp.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnReturn == null)
            {
                btnReturn        = new IbbButton(gv, 1.2f);
                btnReturn.Text   = "RETURN";
                btnReturn.Img    = gv.cc.LoadBitmap("btn_large");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnReturn.Glow   = gv.cc.LoadBitmap("btn_large_glow");     // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnReturn.X      = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnReturn.Y      = 9 * gv.squareSize + (pH * 2);
                btnReturn.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnReturn.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
        }
Beispiel #18
0
        public void setControlsStart()
        {
            int pW   = (int)((float)gv.screenWidth / 100.0f);
            int pH   = (int)((float)gv.screenHeight / 100.0f);
            int padW = gv.squareSize / 6;

            if (btnTokensLeft == null)
            {
                btnTokensLeft        = new IbbButton(gv, 1.0f);
                btnTokensLeft.Img    = gv.cc.LoadBitmap("btn_small");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnTokensLeft.Img2   = gv.cc.LoadBitmap("ctrl_left_arrow");    // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_left_arrow);
                btnTokensLeft.Glow   = gv.cc.LoadBitmap("btn_small_glow");     // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnTokensLeft.X      = 8 * gv.squareSize;
                btnTokensLeft.Y      = (1 * gv.squareSize) - (pH * 2);
                btnTokensLeft.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnTokensLeft.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnPageIndex == null)
            {
                btnPageIndex        = new IbbButton(gv, 1.0f);
                btnPageIndex.Img    = gv.cc.LoadBitmap("btn_small_off");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_off);
                btnPageIndex.Glow   = gv.cc.LoadBitmap("btn_small_glow");         // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnPageIndex.Text   = "1/10";
                btnPageIndex.X      = 9 * gv.squareSize;
                btnPageIndex.Y      = (1 * gv.squareSize) - (pH * 2);
                btnPageIndex.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnPageIndex.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnTokensRight == null)
            {
                btnTokensRight        = new IbbButton(gv, 1.0f);
                btnTokensRight.Img    = gv.cc.LoadBitmap("btn_small");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnTokensRight.Img2   = gv.cc.LoadBitmap("ctrl_right_arrow");   // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_right_arrow);
                btnTokensRight.Glow   = gv.cc.LoadBitmap("btn_small_glow");     // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnTokensRight.X      = 10 * gv.squareSize;
                btnTokensRight.Y      = (1 * gv.squareSize) - (pH * 2);
                btnTokensRight.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnTokensRight.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }

            if (btnAction == null)
            {
                btnAction        = new IbbButton(gv, 1.0f);
                btnAction.Text   = "USE SELECTED";
                btnAction.Img    = gv.cc.LoadBitmap("btn_large");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnAction.Glow   = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnAction.X      = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f) - (gv.squareSize * 4);
                btnAction.Y      = 9 * gv.squareSize + pH * 2;
                btnAction.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnAction.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnExit == null)
            {
                btnExit        = new IbbButton(gv, 1.0f);
                btnExit.Text   = "Return";
                btnExit.Img    = gv.cc.LoadBitmap("btn_large");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnExit.Glow   = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnExit.X      = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnExit.Y      = 9 * gv.squareSize + pH * 2;
                btnExit.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnExit.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            for (int y = 0; y < slotsPerPage; y++)
            {
                IbbButton btnNew = new IbbButton(gv, 1.0f);
                gv.cc.DisposeOfBitmap(ref btnNew.Img);
                btnNew.Img = gv.cc.LoadBitmap("item_slot");       // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot);
                gv.cc.DisposeOfBitmap(ref btnNew.Glow);
                btnNew.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);

                if (y < 5)
                {
                    btnNew.X = ((y + 2 + 4) * gv.squareSize) + (padW * (y + 1)) + gv.oXshift;
                    btnNew.Y = 2 * gv.squareSize;
                }
                else if ((y >= 5) && (y < 10))
                {
                    btnNew.X = ((y - 5 + 2 + 4) * gv.squareSize) + (padW * ((y - 5) + 1)) + gv.oXshift;
                    btnNew.Y = 3 * gv.squareSize + padW;
                }
                else if ((y >= 10) && (y < 15))
                {
                    btnNew.X = ((y - 10 + 2 + 4) * gv.squareSize) + (padW * ((y - 10) + 1)) + gv.oXshift;
                    btnNew.Y = 4 * gv.squareSize + (padW * 2);
                }
                else
                {
                    btnNew.X = ((y - 15 + 2 + 4) * gv.squareSize) + (padW * ((y - 15) + 1)) + gv.oXshift;
                    btnNew.Y = 5 * gv.squareSize + (padW * 3);
                }

                btnNew.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNew.Width  = (int)(gv.ibbwidthR * gv.screenDensity);

                btnTokenSlot.Add(btnNew);
            }
        }
Beispiel #19
0
        public void setControlsStart()
        {
            int pW     = (int)((float)gv.screenWidth / 100.0f);
            int pH     = (int)((float)gv.screenHeight / 100.0f);
            int center = gv.screenWidth / 2;
            int padW   = gv.squareSize / 6;

            for (int x = 0; x < gv.mod.numberOfPlayerMadePcsAllowed; x++)
            {
                IbbButton btnNew = new IbbButton(gv, 1.0f);
                btnNew.Img    = gv.cc.LoadBitmap("item_slot");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot);
                btnNew.Glow   = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnNew.X      = ((x + 5) * gv.squareSize) + (padW * (x + 1)) + gv.oXshift;
                btnNew.Y      = (gv.squareSize / 2) + (pH * 2);
                btnNew.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNew.Width  = (int)(gv.ibbwidthR * gv.screenDensity);

                btnPartyIndex.Add(btnNew);
            }

            if (btnAdd == null)
            {
                btnAdd        = new IbbButton(gv, 1.0f);
                btnAdd.Img    = gv.cc.LoadBitmap("btn_large");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnAdd.Glow   = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnAdd.Text   = "Add Character";
                btnAdd.X      = center - (int)(gv.ibbwidthL * gv.screenDensity) - pW * 1;
                btnAdd.Y      = 2 * gv.squareSize + pH;
                btnAdd.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnAdd.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnRemove == null)
            {
                btnRemove        = new IbbButton(gv, 1.0f);
                btnRemove.Img    = gv.cc.LoadBitmap("btn_large");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnRemove.Glow   = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnRemove.Text   = "Remove Character";
                btnRemove.X      = center + pW * 1;
                btnRemove.Y      = 2 * gv.squareSize + pH;
                btnRemove.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnRemove.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }

            if (btnLeft == null)
            {
                btnLeft        = new IbbButton(gv, 1.0f);
                btnLeft.Img    = gv.cc.LoadBitmap("btn_small");       // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnLeft.Img2   = gv.cc.LoadBitmap("ctrl_left_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_left_arrow);
                btnLeft.Glow   = gv.cc.LoadBitmap("btn_small_glow");  // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnLeft.X      = center - gv.squareSize * 2;
                btnLeft.Y      = (3 * gv.squareSize) + (pH * 2);
                btnLeft.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnLeft.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnPcListIndex == null)
            {
                btnPcListIndex        = new IbbButton(gv, 1.0f);
                btnPcListIndex.Img    = gv.cc.LoadBitmap("item_slot");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_off);
                btnPcListIndex.Glow   = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnPcListIndex.Text   = "";
                btnPcListIndex.X      = center - gv.squareSize / 2;
                btnPcListIndex.Y      = (3 * gv.squareSize) + (pH * 2);
                btnPcListIndex.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnPcListIndex.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnRight == null)
            {
                btnRight        = new IbbButton(gv, 1.0f);
                btnRight.Img    = gv.cc.LoadBitmap("btn_small");        // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnRight.Img2   = gv.cc.LoadBitmap("ctrl_right_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_right_arrow);
                btnRight.Glow   = gv.cc.LoadBitmap("btn_small_glow");   // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnRight.X      = center + gv.squareSize * 1;
                btnRight.Y      = (3 * gv.squareSize) + (pH * 2);
                btnRight.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnRight.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnCreate == null)
            {
                btnCreate        = new IbbButton(gv, 1.0f);
                btnCreate.Text   = "CREATE CHARACTER";
                btnCreate.Img    = gv.cc.LoadBitmap("btn_large");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnCreate.Glow   = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnCreate.X      = center - (int)((gv.ibbwidthL / 2) * gv.screenDensity);
                btnCreate.Y      = 4 * gv.squareSize + (pH * 3);
                btnCreate.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnCreate.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }

            if (btnHelp == null)
            {
                btnHelp      = new IbbButton(gv, 0.8f);
                btnHelp.Text = "HELP";
                btnHelp.Img  = gv.cc.LoadBitmap("btn_small");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnHelp.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnHelp.X    = 2 * gv.squareSize + padW * 1 + gv.oXshift;
                //btnHelp.X = pW * 2;
                btnHelp.Y      = 9 * gv.squareSize + (pH * 2);
                btnHelp.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnHelp.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnReturn == null)
            {
                btnReturn        = new IbbButton(gv, 1.0f);
                btnReturn.Text   = "START GAME";
                btnReturn.Img    = gv.cc.LoadBitmap("btn_large");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnReturn.Glow   = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnReturn.X      = center - (int)((gv.ibbwidthL / 2) * gv.screenDensity);
                btnReturn.Y      = 9 * gv.squareSize + (pH * 2);
                btnReturn.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnReturn.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
        }
        public void setControlsStart()
        {
            int pW = (int)((float)gv.screenWidth / 100.0f);
            int pH = (int)((float)gv.screenHeight / 100.0f);
            int padW = gv.squareSize / 6;

            if (btnReturn == null)
            {
                btnReturn = new IbbButton(gv, 1.0f);
                btnReturn.Text = "RETURN SELECTED";
                btnReturn.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnReturn.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnReturn.X = (gv.screenWidth / 2) - (int)(170.0f * gv.screenDensity / 2.0f);
                btnReturn.Y = 10 * gv.squareSize + pH * 2;
                btnReturn.Height = (int)(50 * gv.screenDensity);
                btnReturn.Width = (int)(170 * gv.screenDensity);
            }

            for (int x = 0; x < 6; x++)
            {
                IbbButton btnNew = new IbbButton(gv, 1.0f);
                btnNew.Img = gv.cc.LoadBitmap("item_slot"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot);
                btnNew.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnNew.X = ((x) * gv.squareSize) + (padW * (x + 1)) + gv.oXshift;
                btnNew.Y = pH * 2;
                btnNew.Height = (int)(50 * gv.screenDensity);
                btnNew.Width = (int)(50 * gv.screenDensity);

                btnPartyIndex.Add(btnNew);
            }
        }
Beispiel #21
0
        public void setControlsStart()
        {
            int pW = (int)((float)gv.screenWidth / 100.0f);
            int pH = (int)((float)gv.screenHeight / 100.0f);
            int padW = gv.squareSize/6;
            //int shift = squareSize / 2;

            if (btnSelect == null)
            {
                btnSelect = new IbbButton(gv, 0.8f);
                btnSelect.Text = "SELECT";
                btnSelect.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                btnSelect.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small_glow);
                btnSelect.X = 17 * gv.squareSize;
                btnSelect.Y = 8 * gv.squareSize + pH * 2;
                btnSelect.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnSelect.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnMove == null)
            {
                btnMove = new IbbButton(gv, 0.8f);
                btnMove.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                btnMove.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small_glow);
                btnMove.Text = "MOVE";
                btnMove.X = 9 * gv.squareSize + padW * 0 + gv.oXshift;
                btnMove.Y = 9 * gv.squareSize + pH;
                btnMove.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnMove.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnAttack == null)
            {
                btnAttack = new IbbButton(gv, 0.8f);
                btnAttack.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                btnAttack.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small_glow);
                btnAttack.Text = "ATTACK";
                btnAttack.X = 10 * gv.squareSize + padW * 0 + gv.oXshift;
                btnAttack.Y = 9 * gv.squareSize + pH;
                btnAttack.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnAttack.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnCast == null)
            {
                btnCast = new IbbButton(gv, 0.8f);
                btnCast.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                btnCast.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small_glow);
                btnCast.Text = "CAST";
                btnCast.X = 11 * gv.squareSize + padW * 0 + gv.oXshift;
                btnCast.Y = 9 * gv.squareSize + pH;
                btnCast.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnCast.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnSkipTurn == null)
            {
                btnSkipTurn = new IbbButton(gv, 0.8f);
                btnSkipTurn.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                btnSkipTurn.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small_glow);
                btnSkipTurn.Text = "SKIP";
                btnSkipTurn.X = 8 * gv.squareSize + padW * 0 + gv.oXshift;
                btnSkipTurn.Y = 9 * gv.squareSize + pH;
                btnSkipTurn.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnSkipTurn.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnSwitchWeapon == null)
            {
                btnSwitchWeapon = new IbbButton(gv, 1.0f);
                btnSwitchWeapon.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                btnSwitchWeapon.Img2 = gv.cc.LoadBitmap("btnparty"); // BitmapFactory.decodeResource(getResources(), R.drawable.btnparty);
                btnSwitchWeapon.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small_glow);
                btnSwitchWeapon.X = 6 * gv.squareSize + padW * 0 + gv.oXshift;
                btnSwitchWeapon.Y = 9 * gv.squareSize + pH;
                btnSwitchWeapon.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnSwitchWeapon.Width = (int)(gv.ibbwidthR * gv.screenDensity);

            }
        }
Beispiel #22
0
        public void setControlsStart()
        {
            int pW     = (int)((float)gv.screenWidth / 100.0f);
            int pH     = (int)((float)gv.screenHeight / 100.0f);
            int padW   = gv.squareSize / 6;
            int xShift = gv.squareSize / 2;
            int yShift = gv.squareSize / 2;

            description = new IbbHtmlTextBox(gv, 320, 100, 500, 300);
            description.showBoxBorder = false;

            if (ctrlUpArrow == null)
            {
                ctrlUpArrow        = new IbbButton(gv, 1.0f);
                ctrlUpArrow.Img    = gv.cc.LoadBitmap("btn_small");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                ctrlUpArrow.Img2   = gv.cc.LoadBitmap("ctrl_up_arrow");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_up_arrow);
                ctrlUpArrow.Glow   = gv.cc.LoadBitmap("btn_small_glow");     // BitmapFactory.decodeResource(gv.getResources(), R.drawable.arrow_glow);
                ctrlUpArrow.X      = 12 * gv.squareSize;
                ctrlUpArrow.Y      = 1 * gv.squareSize + pH * 2;
                ctrlUpArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlUpArrow.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlDownArrow == null)
            {
                ctrlDownArrow        = new IbbButton(gv, 1.0f);
                ctrlDownArrow.Img    = gv.cc.LoadBitmap("btn_small");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                ctrlDownArrow.Img2   = gv.cc.LoadBitmap("ctrl_down_arrow");    // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_down_arrow);
                ctrlDownArrow.Glow   = gv.cc.LoadBitmap("btn_small_glow");     // BitmapFactory.decodeResource(gv.getResources(), R.drawable.arrow_glow);
                ctrlDownArrow.X      = 12 * gv.squareSize;
                ctrlDownArrow.Y      = 2 * gv.squareSize + pH * 3;
                ctrlDownArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlDownArrow.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlLeftArrow == null)
            {
                ctrlLeftArrow        = new IbbButton(gv, 1.0f);
                ctrlLeftArrow.Img    = gv.cc.LoadBitmap("btn_small");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                ctrlLeftArrow.Img2   = gv.cc.LoadBitmap("ctrl_left_arrow");    // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_left_arrow);
                ctrlLeftArrow.Glow   = gv.cc.LoadBitmap("btn_small_glow");     // BitmapFactory.decodeResource(gv.getResources(), R.drawable.arrow_glow);
                ctrlLeftArrow.X      = 10 * gv.squareSize + xShift;
                ctrlLeftArrow.Y      = pH * 34;
                ctrlLeftArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlLeftArrow.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlRightArrow == null)
            {
                ctrlRightArrow        = new IbbButton(gv, 1.0f);
                ctrlRightArrow.Img    = gv.cc.LoadBitmap("btn_small");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                ctrlRightArrow.Img2   = gv.cc.LoadBitmap("ctrl_right_arrow");   // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_right_arrow);
                ctrlRightArrow.Glow   = gv.cc.LoadBitmap("btn_small_glow");     // BitmapFactory.decodeResource(gv.getResources(), R.drawable.arrow_glow);
                ctrlRightArrow.X      = 11 * gv.squareSize + pW * 2 + xShift;
                ctrlRightArrow.Y      = pH * 34;
                ctrlRightArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlRightArrow.Width  = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnReturnJournal == null)
            {
                btnReturnJournal        = new IbbButton(gv, 1.2f);
                btnReturnJournal.Text   = "RETURN";
                btnReturnJournal.Img    = gv.cc.LoadBitmap("btn_large");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnReturnJournal.Glow   = gv.cc.LoadBitmap("btn_large_glow");     // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnReturnJournal.X      = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnReturnJournal.Y      = 9 * gv.squareSize + pH * 2;
                btnReturnJournal.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnReturnJournal.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
        }
Beispiel #23
0
 //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;
 }
Beispiel #24
0
        public void setControlsStart()
        {
            int pH = (int)((float)gv.screenHeight / 100.0f);
            int padW = gv.squareSize/6;

            if (ctrlUpArrow == null)
            {
                ctrlUpArrow = new IbbButton(gv, 1.0f);
                ctrlUpArrow.Img = this.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                ctrlUpArrow.Img2 = this.LoadBitmap("ctrl_up_arrow"); // BitmapFactory.decodeResource(getResources(), R.drawable.ctrl_up_arrow);
                ctrlUpArrow.Glow = this.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.arrow_glow);
                ctrlUpArrow.X = 17 * gv.squareSize;
                ctrlUpArrow.Y = 7 * gv.squareSize + pH * 2;
                ctrlUpArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlUpArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlLeftArrow == null)
            {
                ctrlLeftArrow = new IbbButton(gv, 1.0f);
                ctrlLeftArrow.Img = this.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                ctrlLeftArrow.Img2 = this.LoadBitmap("ctrl_left_arrow"); // BitmapFactory.decodeResource(getResources(), R.drawable.ctrl_left_arrow);
                ctrlLeftArrow.Glow = this.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.arrow_glow);
                ctrlLeftArrow.X = 16 * gv.squareSize;
                ctrlLeftArrow.Y = 8 * gv.squareSize + pH * 2;
                ctrlLeftArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlLeftArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlRightArrow == null)
            {
                ctrlRightArrow = new IbbButton(gv, 1.0f);
                ctrlRightArrow.Img = this.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                ctrlRightArrow.Img2 = this.LoadBitmap("ctrl_right_arrow"); // BitmapFactory.decodeResource(getResources(), R.drawable.ctrl_right_arrow);
                ctrlRightArrow.Glow = this.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.arrow_glow);
                ctrlRightArrow.X = 18 * gv.squareSize;
                ctrlRightArrow.Y = 8 * gv.squareSize + pH * 2;
                ctrlRightArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlRightArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlDownArrow == null)
            {
                ctrlDownArrow = new IbbButton(gv, 1.0f);
                ctrlDownArrow.Img = this.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                ctrlDownArrow.Img2 = this.LoadBitmap("ctrl_down_arrow"); // BitmapFactory.decodeResource(getResources(), R.drawable.ctrl_down_arrow);
                ctrlDownArrow.Glow = this.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.arrow_glow);
                ctrlDownArrow.X = 17 * gv.squareSize;
                ctrlDownArrow.Y = 9 * gv.squareSize + pH * 2;
                ctrlDownArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlDownArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlUpRightArrow == null)
            {
                ctrlUpRightArrow = new IbbButton(gv, 1.0f);
                ctrlUpRightArrow.Img = this.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                ctrlUpRightArrow.Img2 = this.LoadBitmap("ctrl_up_right_arrow"); // BitmapFactory.decodeResource(getResources(), R.drawable.ctrl_up_right_arrow);
                ctrlUpRightArrow.Glow = this.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.arrow_glow);
                ctrlUpRightArrow.X = 18 * gv.squareSize;
                ctrlUpRightArrow.Y = 7 * gv.squareSize + pH * 2;
                ctrlUpRightArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlUpRightArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlUpLeftArrow == null)
            {
                ctrlUpLeftArrow = new IbbButton(gv, 1.0f);
                ctrlUpLeftArrow.Img = this.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                ctrlUpLeftArrow.Img2 = this.LoadBitmap("ctrl_up_left_arrow"); // BitmapFactory.decodeResource(getResources(), R.drawable.ctrl_up_left_arrow);
                ctrlUpLeftArrow.Glow = this.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.arrow_glow);
                ctrlUpLeftArrow.X = 16 * gv.squareSize;
                ctrlUpLeftArrow.Y = 7 * gv.squareSize + pH * 2;
                ctrlUpLeftArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlUpLeftArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlDownRightArrow == null)
            {
                ctrlDownRightArrow = new IbbButton(gv, 1.0f);
                ctrlDownRightArrow.Img = this.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                ctrlDownRightArrow.Img2 = this.LoadBitmap("ctrl_down_right_arrow"); // BitmapFactory.decodeResource(getResources(), R.drawable.ctrl_down_right_arrow);
                ctrlDownRightArrow.Glow = this.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.arrow_glow);
                ctrlDownRightArrow.X = 18 * gv.squareSize;
                ctrlDownRightArrow.Y = 9 * gv.squareSize + pH * 2;
                ctrlDownRightArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlDownRightArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (ctrlDownLeftArrow == null)
            {
                ctrlDownLeftArrow = new IbbButton(gv, 1.0f);
                ctrlDownLeftArrow.Img = this.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                ctrlDownLeftArrow.Img2 = this.LoadBitmap("ctrl_down_left_arrow"); // BitmapFactory.decodeResource(getResources(), R.drawable.ctrl_down_left_arrow);
                ctrlDownLeftArrow.Glow = this.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.arrow_glow);
                ctrlDownLeftArrow.X = 16 * gv.squareSize;
                ctrlDownLeftArrow.Y = 9 * gv.squareSize + pH * 2;
                ctrlDownLeftArrow.Height = (int)(gv.ibbheight * gv.screenDensity);
                ctrlDownLeftArrow.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnInventory == null)
            {
                btnInventory = new IbbButton(gv, 1.0f);
                btnInventory.Img = this.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                btnInventory.Img2 = this.LoadBitmap("btninventory"); // BitmapFactory.decodeResource(getResources(), R.drawable.btninventory);
                btnInventory.Glow = this.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small_glow);
                btnInventory.X = 7 * gv.squareSize + padW * 0 + gv.oXshift;
                btnInventory.Y = 9 * gv.squareSize + pH;
                btnInventory.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnInventory.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnHelp == null)
            {
                btnHelp = new IbbButton(gv, 0.8f);
                btnHelp.Text = "HELP";
                btnHelp.Img = this.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small);
                btnHelp.Glow = this.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_small_glow);
                btnHelp.X = 6 * gv.squareSize + padW * 1 + gv.oXshift;
                btnHelp.Y = 9 * gv.squareSize + pH * 2;
                btnHelp.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnHelp.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnReturn == null)
            {
                btnReturn = new IbbButton(gv, 1.0f);
                btnReturn.Text = "RETURN";
                btnReturn.Img = this.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_large);
                btnReturn.Glow = this.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(getResources(), R.drawable.btn_large_glow);
                btnReturn.X = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnReturn.Y = 10 * gv.squareSize + pH * 2;
                btnReturn.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnReturn.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
        }
Beispiel #25
0
        public void setControlsStart()
        {
            int pH = (int)((float)gv.screenHeight / 100.0f);

            if (btnNewGame == null)
            {
                btnNewGame        = new IbbButton(gv, 1.0f);
                btnNewGame.Img    = gv.cc.LoadBitmap("btn_large");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnNewGame.Glow   = gv.cc.LoadBitmap("btn_large_glow");     // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnNewGame.Text   = "New Game";
                btnNewGame.X      = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnNewGame.Y      = (1 * gv.squareSize) + (2 * pH);
                btnNewGame.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNewGame.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnLoadSavedGame == null)
            {
                btnLoadSavedGame        = new IbbButton(gv, 1.0f);
                btnLoadSavedGame.Img    = gv.cc.LoadBitmap("btn_large");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnLoadSavedGame.Glow   = gv.cc.LoadBitmap("btn_large_glow");     // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnLoadSavedGame.Text   = "Load Saved Game";
                btnLoadSavedGame.X      = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnLoadSavedGame.Y      = (2 * gv.squareSize) + (4 * pH);
                btnLoadSavedGame.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnLoadSavedGame.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnPlayerGuide == null)
            {
                btnPlayerGuide        = new IbbButton(gv, 1.0f);
                btnPlayerGuide.Img    = gv.cc.LoadBitmap("btn_large");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnPlayerGuide.Glow   = gv.cc.LoadBitmap("btn_large_glow");     // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnPlayerGuide.Text   = "Player's Guide";
                btnPlayerGuide.X      = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnPlayerGuide.Y      = (3 * gv.squareSize) + (6 * pH);
                btnPlayerGuide.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnPlayerGuide.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnBeginnerGuide == null)
            {
                btnBeginnerGuide        = new IbbButton(gv, 1.0f);
                btnBeginnerGuide.Img    = gv.cc.LoadBitmap("btn_large");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnBeginnerGuide.Glow   = gv.cc.LoadBitmap("btn_large_glow");     // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnBeginnerGuide.Text   = "Beginner's Guide";
                btnBeginnerGuide.X      = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnBeginnerGuide.Y      = (4 * gv.squareSize) + (8 * pH);
                btnBeginnerGuide.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnBeginnerGuide.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnAbout == null)
            {
                btnAbout        = new IbbButton(gv, 1.0f);
                btnAbout.Img    = gv.cc.LoadBitmap("btn_large");          // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnAbout.Glow   = gv.cc.LoadBitmap("btn_large_glow");     // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnAbout.Text   = "Credits";
                btnAbout.X      = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnAbout.Y      = (5 * gv.squareSize) + (10 * pH);
                btnAbout.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnAbout.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnExit == null)
            {
                btnExit        = new IbbButton(gv, 1.0f);
                btnExit.Img    = gv.cc.LoadBitmap("btn_large");      // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnExit.Glow   = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnExit.Text   = "Exit";
                btnExit.X      = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnExit.Y      = (6 * gv.squareSize) + (12 * pH);
                btnExit.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnExit.Width  = (int)(gv.ibbwidthL * gv.screenDensity);
            }
        }
Beispiel #26
0
        public void setControlsStart()
        {
            int pW = (int)((float)gv.screenWidth / 100.0f);
            int pH = (int)((float)gv.screenHeight / 100.0f);
            int padW = gv.squareSize/6;

            description = new IbbHtmlTextBox(gv, 320, 100, 500, 300);
            description.showBoxBorder = false;

            if (btnInventoryLeft == null)
            {
                btnInventoryLeft = new IbbButton(gv, 1.0f);
                btnInventoryLeft.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnInventoryLeft.Img2 = gv.cc.LoadBitmap("ctrl_left_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_left_arrow);
                btnInventoryLeft.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnInventoryLeft.X = 7 * gv.squareSize;
                btnInventoryLeft.Y = (5 * gv.squareSize) - (pH * 2);
                btnInventoryLeft.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnInventoryLeft.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnPageIndex == null)
            {
                btnPageIndex = new IbbButton(gv, 1.0f);
                btnPageIndex.Img = gv.cc.LoadBitmap("btn_small_off"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_off);
                btnPageIndex.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnPageIndex.Text = "1/10";
                btnPageIndex.X = 8 * gv.squareSize;
                btnPageIndex.Y = (5 * gv.squareSize) - (pH * 2);
                btnPageIndex.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnPageIndex.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnInventoryRight == null)
            {
                btnInventoryRight = new IbbButton(gv, 1.0f);
                btnInventoryRight.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnInventoryRight.Img2 = gv.cc.LoadBitmap("ctrl_right_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_right_arrow);
                btnInventoryRight.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnInventoryRight.X = 9 * gv.squareSize;
                btnInventoryRight.Y = (5 * gv.squareSize) - (pH * 2);
                btnInventoryRight.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnInventoryRight.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnShopLeft == null)
            {
                btnShopLeft = new IbbButton(gv, 1.0f);
                btnShopLeft.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnShopLeft.Img2 = gv.cc.LoadBitmap("ctrl_left_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_left_arrow);
                btnShopLeft.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnShopLeft.X = 7 * gv.squareSize;
                btnShopLeft.Y = (1 * gv.squareSize) - (pH * 2);
                btnShopLeft.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnShopLeft.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnShopPageIndex == null)
            {
                btnShopPageIndex = new IbbButton(gv, 1.0f);
                btnShopPageIndex.Img = gv.cc.LoadBitmap("btn_small_off"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_off);
                btnShopPageIndex.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnShopPageIndex.Text = "1/10";
                btnShopPageIndex.X = 8 * gv.squareSize;
                btnShopPageIndex.Y = (1 * gv.squareSize) - (pH * 2);
                btnShopPageIndex.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnShopPageIndex.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnShopRight == null)
            {
                btnShopRight = new IbbButton(gv, 1.0f);
                btnShopRight.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnShopRight.Img2 = gv.cc.LoadBitmap("ctrl_right_arrow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.ctrl_right_arrow);
                btnShopRight.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnShopRight.X = 9 * gv.squareSize;
                btnShopRight.Y = (1 * gv.squareSize) - (pH * 2);
                btnShopRight.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnShopRight.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnReturn == null)
            {
                btnReturn = new IbbButton(gv, 1.2f);
                btnReturn.Text = "EXIT SHOP";
                btnReturn.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnReturn.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnReturn.X = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnReturn.Y = 9 * gv.squareSize + pH * 2;
                btnReturn.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnReturn.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnHelp == null)
            {
                btnHelp = new IbbButton(gv, 0.8f);
                btnHelp.Text = "HELP";
                btnHelp.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnHelp.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnHelp.X = 0 * gv.squareSize + padW * 1 + gv.oXshift;
                btnHelp.Y = 9 * gv.squareSize + pH * 2;
                btnHelp.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnHelp.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            for (int j = 0; j < 10; j++)
            {
                IbbButton btnNew = new IbbButton(gv, 1.0f);
                btnNew.Img = gv.cc.LoadBitmap("item_slot"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot);
                btnNew.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                if (j < 5)
                {
                    btnNew.X = ((j+2+4) * gv.squareSize) + (padW * (j+1)) + gv.oXshift;
                    btnNew.Y = 6 * gv.squareSize;
                }
                else
                {
                    btnNew.X = ((j-5+2+4) * gv.squareSize) + (padW * ((j-5)+1)) + gv.oXshift;
                    btnNew.Y = 7 * gv.squareSize + padW;
                }
                btnNew.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNew.Width = (int)(gv.ibbwidthR * gv.screenDensity);

                btnInventorySlot.Add(btnNew);
            }
            for (int j = 0; j < 10; j++)
            {
                IbbButton btnNew = new IbbButton(gv, 1.0f);
                btnNew.Img = gv.cc.LoadBitmap("item_slot"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.item_slot);
                btnNew.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                if (j < 5)
                {
                    btnNew.X = ((j+2+4) * gv.squareSize) + (padW * (j+1)) + gv.oXshift;
                    btnNew.Y = 2 * gv.squareSize;
                }
                else
                {
                    btnNew.X = ((j-5+2+4) * gv.squareSize) + (padW * ((j-5)+1)) + gv.oXshift;
                    btnNew.Y = 3 * gv.squareSize + padW;
                }
                btnNew.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNew.Width = (int)(gv.ibbwidthR * gv.screenDensity);

                btnShopSlot.Add(btnNew);
            }
        }
        public void setControlsStart()
        {
            int pW = (int)((float)gv.screenWidth / 100.0f);
            int pH = (int)((float)gv.screenHeight / 100.0f);
            int padW = gv.squareSize/6;

            description = new IbbHtmlTextBox(gv, 320, 100, 500, 300);
            description.showBoxBorder = false;

            if (btnSelect == null)
            {
                btnSelect = new IbbButton(gv, 0.8f);
                btnSelect.Text = "LEARN SELECTED TRAIT";
                btnSelect.Img = gv.cc.LoadBitmap("btn_large"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large);
                btnSelect.Glow = gv.cc.LoadBitmap("btn_large_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_large_glow);
                btnSelect.X = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2.0f);
                btnSelect.Y = 9 * gv.squareSize + pH * 2;
                btnSelect.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnSelect.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnHelp == null)
            {
                btnHelp = new IbbButton(gv, 0.8f);
                btnHelp.Text = "HELP";
                btnHelp.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnHelp.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnHelp.X = 5 * gv.squareSize + padW * 1 + gv.oXshift;
                btnHelp.Y = 9 * gv.squareSize + pH * 2;
                btnHelp.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnHelp.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnExit == null)
            {
                btnExit = new IbbButton(gv, 0.8f);
                btnExit.Text = "EXIT";
                btnExit.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnExit.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);
                btnExit.X = (15 * gv.squareSize) - padW * 1 + gv.oXshift;
                btnExit.Y = 9 * gv.squareSize + pH * 2;
                btnExit.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnExit.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            for (int y = 0; y < slotsPerPage; y++)
            {
                IbbButton btnNew = new IbbButton(gv, 1.0f);
                btnNew.Img = gv.cc.LoadBitmap("btn_small"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small);
                btnNew.Glow = gv.cc.LoadBitmap("btn_small_glow"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.btn_small_glow);

                int x = y % 5;
                int yy = y / 5;
                btnNew.X = ((x + 4) * gv.squareSize) + (padW * (x+1)) + gv.oXshift;
                btnNew.Y = (1 + yy) * gv.squareSize + (padW * yy);

                btnNew.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnNew.Width = (int)(gv.ibbwidthR * gv.screenDensity);

                btnTraitSlots.Add(btnNew);
            }
        }
Beispiel #28
0
        public void setControlsStart()
        {
            int pW = (int)((float)gv.screenWidth / 100.0f);
            int pH = (int)((float)gv.screenHeight / 100.0f);
            int wideX = (gv.screenWidth / 2) - (int)(gv.ibbwidthL * gv.screenDensity / 2);
            int smallLeftX = wideX - (int)(gv.ibbwidthR * gv.screenDensity);
            int smallRightX = wideX + (int)(gv.ibbwidthL * gv.screenDensity);
            int padW = gv.squareSize/6;

            if (btnLeft == null)
            {
                btnLeft = new IbbButton(gv, 1.0f);
                btnLeft.Img = gv.cc.LoadBitmap("btn_small");
                btnLeft.Img2 = gv.cc.LoadBitmap("ctrl_left_arrow");
                btnLeft.Glow = gv.cc.LoadBitmap("btn_small_glow");
                btnLeft.X = smallLeftX;
                btnLeft.Y = (5 * gv.squareSize) - (pH * 2);
                btnLeft.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnLeft.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
            if (btnModuleName == null)
            {
                btnModuleName = new IbbButton(gv, 1.0f);
                btnModuleName.Img = gv.cc.LoadBitmap("btn_large");
                btnModuleName.Glow = gv.cc.LoadBitmap("btn_large_glow");
                btnModuleName.Text = "";
                btnModuleName.X = wideX;
                btnModuleName.Y = (5 * gv.squareSize) - (pH * 2);
                btnModuleName.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnModuleName.Width = (int)(gv.ibbwidthL * gv.screenDensity);
            }
            if (btnRight == null)
            {
                btnRight = new IbbButton(gv, 1.0f);
                btnRight.Img = gv.cc.LoadBitmap("btn_small");
                btnRight.Img2 = gv.cc.LoadBitmap("ctrl_right_arrow");
                btnRight.Glow = gv.cc.LoadBitmap("btn_small_glow");
                btnRight.X = smallRightX;
                btnRight.Y = (5 * gv.squareSize) - (pH * 2);
                btnRight.Height = (int)(gv.ibbheight * gv.screenDensity);
                btnRight.Width = (int)(gv.ibbwidthR * gv.screenDensity);
            }
        }
Beispiel #29
0
        public void onTouchJournal(MouseEventArgs e, MouseEventType.EventType eventType)
        {     //1
            try
            { //2
                ctrlUpArrow.glowOn      = false;
                ctrlDownArrow.glowOn    = false;
                ctrlLeftArrow.glowOn    = false;
                ctrlRightArrow.glowOn   = false;
                btnReturnJournal.glowOn = false;

                switch (eventType)
                {//3
                case MouseEventType.EventType.MouseDown:
                case MouseEventType.EventType.MouseMove:
                    int x = (int)e.X;
                    int y = (int)e.Y;
                    if (ctrlUpArrow.getImpact(x, y))
                    {
                        ctrlUpArrow.glowOn = true;
                    }
                    else if (ctrlDownArrow.getImpact(x, y))
                    {
                        ctrlDownArrow.glowOn = true;
                    }
                    else if (ctrlLeftArrow.getImpact(x, y))
                    {
                        ctrlLeftArrow.glowOn = true;
                    }
                    else if (ctrlRightArrow.getImpact(x, y))
                    {
                        ctrlRightArrow.glowOn = true;
                    }
                    else if (btnReturnJournal.getImpact(x, y))
                    {
                        btnReturnJournal.glowOn = true;
                    }

                    break;

                case MouseEventType.EventType.MouseUp:
                    x = (int)e.X;
                    y = (int)e.Y;

                    ctrlUpArrow.glowOn      = false;
                    ctrlDownArrow.glowOn    = false;
                    ctrlLeftArrow.glowOn    = false;
                    ctrlRightArrow.glowOn   = false;
                    btnReturnJournal.glowOn = false;

                    if (ctrlUpArrow.getImpact(x, y))
                    {
                        if (journalScreenQuestIndex > 0)
                        {
                            journalScreenQuestIndex--;
                            journalScreenEntryIndex = gv.mod.partyJournalQuests[journalScreenQuestIndex].Entries.Count - 1;
                        }
                    }
                    else if (ctrlDownArrow.getImpact(x, y))
                    {
                        if (journalScreenQuestIndex < gv.mod.partyJournalQuests.Count - 1)
                        {
                            journalScreenQuestIndex++;
                            journalScreenEntryIndex = gv.mod.partyJournalQuests[journalScreenQuestIndex].Entries.Count - 1;
                        }
                    }
                    else if (ctrlLeftArrow.getImpact(x, y))
                    {
                        if (journalScreenEntryIndex > 0)
                        {
                            journalScreenEntryIndex--;
                        }
                    }
                    else if (ctrlRightArrow.getImpact(x, y))
                    {
                        if (journalScreenEntryIndex < gv.mod.partyJournalQuests[journalScreenQuestIndex].Entries.Count - 1)
                        {
                            journalScreenEntryIndex++;
                        }
                    }
                    else if (btnReturnJournal.getImpact(x, y))
                    {
                        gv.screenType    = "main";
                        journalBack      = null;
                        btnReturnJournal = null;
                        ctrlUpArrow      = null;
                        ctrlDownArrow    = null;
                        ctrlLeftArrow    = null;
                        ctrlRightArrow   = null;
                    }
                    break;
                } //3
            }     //2
            catch
            { }
        }