Ejemplo n.º 1
0
        public SubStateGameMenu(StateAbstract parent)
            : base(parent)
        {
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors = new Color[8];
            menu = new string[colors.Length];

            menu[0] = "Items";
            menu[1] = "Equip";
            menu[2] = "Rune";
            menu[3] = "Status";
            menu[4] = "Formation";
            menu[5] = "Party Order";
            menu[6] = "Return to Title";
            menu[7] = "Exit";

            for (int i = 1; i < colors.Length; i++)
                colors[i] = Color.DarkGray;
            colors[0] = Color.White;

            mX = 30;
            mY = 30;
            width = 960;
            height = 690;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }
Ejemplo n.º 2
0
        public SubStateCombatMenu(StateAbstract parent)
            : base(parent)
        {
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors = new Color[4];
            menu = new string[4];

            menu[0] = "Attack";
            menu[1] = "Magic";
            menu[2] = "Items";
            menu[3] = "Defend";

            colors[0] = Color.White;
            colors[1] = Color.DarkGray;
            colors[2] = Color.DarkGray;
            colors[3] = Color.DarkGray;

            mX = 450;
            mY = 600;
            width = 185;
            height = 125;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true);
        }
        public SubStateTitleScreenMenu(StateAbstract parent)
            : base(parent)
        {
            StateHandler.SetDelay(0);
            messageBoxes = new MessageBox[1];
            colors = new Color[4];
            menu = new string[4];

            menu[0] = "New Game";
            menu[1] = "Continue";
            menu[2] = "Options";
            menu[3] = "Credits";

            colors[0] = Color.White;
            colors[1] = Color.DarkGray;
            colors[2] = Color.DarkGray;
            colors[3] = Color.DarkGray;

            mX = 400;
            mY = 550;
            width = 200;
            height = 120;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true);
        }
Ejemplo n.º 4
0
        public SubStateStatusMenu(StateAbstract parent)
            : base(parent)
        {
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors = new Color[31];
            menu = new string[colors.Length];

            PC temp = null;
            for (int i = 0; i < 29; i += 10)
            {
                temp = StateHandler.GetPC(i / 10);
                menu[i] = temp.Name + " " + temp.getTitle();
                menu[i + 1] = temp.getExp() + @"/" + (temp.getLevel() * 1000);
                menu[i + 2] = "Level: " + temp.getLevel();
                menu[i + 3] = "Health: " + temp.Health + "/" + temp.MaxHealth;
                menu[i + 4] = "MP: " + temp.Mp + "/" + temp.MaxMp;
                menu[i + 5] = "Attack: " + temp.getAttack();
                menu[i + 6] = "Defense: " + temp.getDefense();
                menu[i + 7] = "Magic: " + temp.getMagic();
                menu[i + 8] = "Magic Defense: " + temp.getMagicDefense();
                menu[i + 9] = "";
            }
            menu[30] = "Formation: " + FormationHandler.FormName;

            for (int i = 0; i < colors.Length; i++)
                colors[i] = Color.White;

            mX = 30;
            mY = 30;
            width = 960;
            height = 690;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }
        public SubStateListMenuRune(StateAbstract parent, int thePC, int theSlot)
            : base(parent)
        {
            PCid = thePC;
            slot = theSlot;
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            int adjustedLen = ItemHandler.runeList.Count + 1;
            colors = new Color[adjustedLen];
            menu = new string[adjustedLen];

            int i = 0;
            foreach (ItemAbstract item in ItemHandler.runeList)
            {
                colors[i] = Color.DarkGray;
                menu[i] = item.Name;
                i++;
            }

            menu[i] = "Unequip";
            colors[i] = Color.DarkGray;

            colors[0] = Color.White;

            mX = 240;
            mY = 75;
            width = 660;
            height = 390;

            int tempVal = (int)(Globals.hmod * height);

            tempVal /= Globals.FONT_HEIGHT;

            tempVal -= 1;

            if (tempVal > adjustedLen)
                tempVal = adjustedLen;

            string[] tempMenu = new string[tempVal];

            for (i = 0; i < tempVal; i++)
                tempMenu[i] = menu[i];

            messageBoxes[0] = new MessageBox(mX, mY, width, height, tempMenu, colors, true, true, true);

            StateHandler.State = new SubStateRuneChange(this, PCid, slot, 0);
        }
        public SubStateDisplayMessage(string[] toDisplay, int Height, int Width, int X, int Y, StateAbstract parent)
            : base(parent)
        {
            mX = X;
            mY = Y;
            height = Height;
            width = Width;
            messageBoxes = new MessageBox[1];
            size = new int[toDisplay.Length];
            colors = new Color[toDisplay.Length];

            for (int i = 0; i < toDisplay.Length; i++)
            {
                size[i] = 16;
                colors[i] = Color.White;
            }

            messageBoxes[0] = new MessageBox(mX, mY, width, height, toDisplay, colors, true);
        }
Ejemplo n.º 7
0
        public SubStateItemMenu(StateAbstract theparent)
            : base(theparent)
        {
            absolute = false;
            parent = theparent;
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];

            colors = new Color[ItemHandler.itemList.Count];
            menu = new string[ItemHandler.itemList.Count];

            int i = 0;
            foreach(ConsumableAbstract item in ItemHandler.itemList)
            {
                colors[i] = Color.DarkGray;
                menu[i] = item.getName();
                i++;
            }

            if (ItemHandler.itemList.Count > 0)
                colors[0] = Color.White;

            mX = 100;
            mY = 45;
            width = 860;
            height = 590;

            int tempVal = (int)(Globals.hmod * height);

            tempVal /= Globals.FONT_HEIGHT;

            tempVal -= 1;

            if (tempVal > menu.Length)
                tempVal = menu.Length;

            string[] tempMenu = new string[tempVal];

            for (i = 0; i < tempVal; i++)
                tempMenu[i] = menu[i];

            messageBoxes[0] = new MessageBox(mX, mY, width, height, tempMenu, colors, true, true, true);
        }
        public SubStateFeatureNotImplemented(StateAbstract parent)
            : base(parent)
        {
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors = new Color[1];
            menu = new string[1];

            menu[0] = "This feature is currently not working.";

            for (int i = 0; i < colors.Length; i++)
                colors[i] = Color.White;

            mX = 30;
            mY = 30;
            width = 960;
            height = 690;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }
        public SubStateDisplayFormation(StateAbstract parent, int formation)
            : base(parent)
        {
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors = new Color[4];
            menu = new string[4];

            menu = setFormation(formation);

            for (int i = 1; i < colors.Length; i++)
                colors[i] = Color.DarkGray;

            colors[0] = Color.White;

            mX = 130;
            mY = 40;
            width = 0;
            height = 0;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }
        public SubStateOrderChangeOne(SubStateAbstract theparent)
            : base(theparent)
        {
            int i = 0;
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors = new Color[3];
            menu = new string[colors.Length];

            for (i = 0; i < menu.Length; i++)
                menu[i] = StateHandler.GetPC(i).Name;

            for (i = 1; i < colors.Length; i++)
                colors[i] = Color.DarkGray;
            colors[0] = Color.White;

            mX = 60;
            mY = 60;
            width = 930;
            height = 660;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }
        public SubStateFormationMenu(SubStateAbstract theparent)
            : base(theparent)
        {
            StateHandler.AddDelay();
            messageBoxes = new MessageBox[1];
            colors = new Color[4];
            menu = new string[4];

            menu[0] = "The Intern";
            menu[1] = "Defense";
            menu[2] = "Caster";
            menu[3] = "Offense";

            for (int i = 1; i < colors.Length; i++)
                colors[i] = Color.DarkGray;
            colors[0] = Color.White;

            mX = 30;
            mY = 30;
            width = 960;
            height = 690;

            messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true);
        }
Ejemplo n.º 12
0
        public override void Input(int input)
        {
            if (input == Globals.KEY_UP || input == Globals.KEY_DOWN)
            {
                MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.menuMove, "menuMove");

                StateHandler.SetDelay(8);

                colors[count] = Color.DarkGray;

                if (input == Globals.KEY_UP)
                {
                    if (count == 0)
                        count = menu.Length-1;
                    else
                        count--;
                }
                else if (input == Globals.KEY_DOWN)
                    count = (count + 1) % menu.Length;

                colors[count] = Color.White;

                int tempVal = (int)(Globals.hmod * height);

                tempVal /= Globals.FONT_HEIGHT;

                tempVal -= 1;

                Color[] tempColor = null;
                string[] tempMenu = null;
                int prefCount = tempVal / 2;

                if (tempVal >= menu.Length || absolute) // The total amount of options is less than the size of the menu box
                {
                    tempColor = colors;
                    tempMenu = menu;
                }
                else
                {
                    int realCount;
                    tempMenu = new string[tempVal];

                    if (prefCount > count)
                    {
                        realCount = count;
                        for (int i = 0; i < tempVal; i++)
                        {
                            tempMenu[i] = menu[i];
                        }
                    }
                    else if (prefCount >= menu.Length - count)
                    {
                        realCount = count - (menu.Length - tempVal);
                        // Menu from menu-tval to menu)
                        for (int i = 0; i < tempVal; i++)
                            tempMenu[i] = menu[(menu.Length - tempVal) + i];
                    }
                    else
                    {
                        realCount = tempVal / 2;
                        for (int i = 0; i < tempVal; i++)
                            tempMenu[i] = menu[(count-prefCount) + i];
                    }

                    tempColor = new Color[tempVal];

                    for (int i = 0; i < tempVal; i++)
                        tempColor[i] = Color.DarkGray;

                    tempColor[realCount] = Color.White;
                }

                messageBoxes[0] = new MessageBox(mX, mY, width, height, tempMenu, tempColor, true, messageBoxes[0].Scaling(), messageBoxes[0].IsChildMessage());
            }
            else if (input == Globals.KEY_CANCEL)
            {
                StateHandler.AddDelay();
                MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.menuBack, "menuBack");

                StateHandler.State = Parent;
            }
        }
Ejemplo n.º 13
0
        public override void Update()
        {
            int mX, mY, width, height;
            count++;
            if (fresh)
            {
                fresh = false;
                MediaHandler.Background = "teamlogo.jpg";
            }

            Color[] colors;

            if (count < 260)
            {//title

                colors = new Color[3];

                colors[0] = Color.White;
                colors[1] = Color.White;
                colors[2] = Color.White;

                mX = 400;
                mY = 100;
                height = 100;
                width = 345;

                messageBoxes[0] = new MessageBox(mX, mY, width, height, credits[0], colors, true);
            }

            else if(count < 520)
            {//team

                mX = 250;
                mY = 250;
                height = 80;
                width = 210;

                colors = new Color[2];
                colors[0] = Color.White;
                colors[1] = Color.White;

                messageBoxes[0] = new MessageBox(mX, mY, width, height, credits[1], colors, true);
            }

            else if (count < 780)
            {//lead

                mX = 500;
                mY = 250;
                height = 100;
                width = 165;

                colors = new Color[3];
                colors[0] = Color.White;
                colors[1] = Color.White;
                colors[2] = Color.White;

                messageBoxes[0] = new MessageBox(mX, mY, width, height, credits[2], colors, true);
            }

            else if (count < 1040)
            {//programmers

                mX = 300;
                mY = 450;
                height = 175;
                width = 290;

                colors = new Color[6];
                colors[0] = Color.White;
                colors[1] = Color.White;
                colors[2] = Color.White;
                colors[3] = Color.White;
                colors[4] = Color.White;
                colors[5] = Color.White;

                messageBoxes[0] = new MessageBox(mX, mY, width, height, credits[3], colors, true);
            }

            else if (count < 1300)
            {//3D Art

                mX = 110;
                mY = 211;
                height = 120;
                width = 150;

                colors = new Color[4];
                colors[0] = Color.White;
                colors[1] = Color.White;
                colors[2] = Color.White;
                colors[3] = Color.White;

                messageBoxes[0] = new MessageBox(mX, mY, width, height, credits[4], colors, true);
            }

            else if (count < 1560)
            {//2D Art

                mX = 454;
                mY = 316;
                height = 140;
                width = 150;

                colors = new Color[5];
                colors[0] = Color.White;
                colors[1] = Color.White;
                colors[2] = Color.White;
                colors[3] = Color.White;
                colors[4] = Color.White;

                messageBoxes[0] = new MessageBox(mX, mY, width, height, credits[5], colors, true);
            }

            else if (count < 1820)
            {//Sound

                mX = 303;
                mY = 434;
                height = 90;
                width = 180;

                colors = new Color[3];
                colors[0] = Color.White;
                colors[1] = Color.White;
                colors[2] = Color.White;

                messageBoxes[0] = new MessageBox(mX, mY, width, height, credits[6], colors, true);
            }

            else if (count < 2080)
            {//Story

                mX = 601;
                mY = 430;
                height = 130;
                width = 170;

                colors = new Color[4];
                colors[0] = Color.White;
                colors[1] = Color.White;
                colors[2] = Color.White;
                colors[3] = Color.White;

                messageBoxes[0] = new MessageBox(mX, mY, width, height, credits[7], colors, true);
            }

            else if (count < 2140)
            {//Thanks1

                mX = 450;
                mY = 450;
                height = 120;
                width = 270;

                colors = new Color[1];
                colors[0] = Color.White;

                messageBoxes[0] = new MessageBox(mX, mY, width, height, credits[8], colors, true);
            }

            else if (count < 2400)
            {//Thanks2

                mX = 450;
                mY = 450;
                height = 120;
                width = 270;

                colors = new Color[3];
                colors[0] = Color.White;
                colors[1] = Color.White;
                colors[2] = Color.White;

                messageBoxes[0] = new MessageBox(mX, mY, width, height, credits[9], colors, true);
            }

            else if (count < 2680)
            {//Thanks3

                mX = 450;
                mY = 450;
                height = 120;
                width = 270;

                colors = new Color[4];
                colors[0] = Color.White;
                colors[1] = Color.White;
                colors[2] = Color.White;
                colors[3] = Color.White;

                messageBoxes[0] = new MessageBox(mX, mY, width, height, credits[10], colors, true);

            }
            else if (count < 2730)
            {//thanks for playing1
                mX = 500;
                mY = 500;
                height = 110;
                width = 110;

                colors = new Color[1];
                colors[0] = Color.White;

                messageBoxes[0] = new MessageBox(mX, mY, width, height, credits[11], colors, true);
            }
            else if (count < 2780)
            {//thanks for playing2
                mX = 500;
                mY = 500;
                height = 110;
                width = 110;

                colors = new Color[2];
                colors[0] = Color.White;
                colors[1] = Color.White;

                messageBoxes[0] = new MessageBox(mX, mY, width, height, credits[12], colors, true);
            }
            else if (count < 2940)
            {

                mX = 500;
                mY = 500;
                height = 110;
                width = 110;

                colors = new Color[3];
                colors[0] = Color.White;
                colors[1] = Color.White;
                colors[2] = Color.White;

                messageBoxes[0] = new MessageBox(mX, mY, width, height, credits[13], colors, true);
            }

            else
                StateHandler.State = new StateTitleScreen();
        }