Exemplo n.º 1
0
        public MenuScreen()
        {
            background = new Image("TitleScreen/background");
            sign       = new Image("TitleScreen/woodsign_marshal_law");
            poster     = new Image("TitleScreen/gun_poster1280x720");
            menuItems  = new MenuItem[text.Length];


            for (int i = 0; i < text.Length; i++)
            {
                menuItems[i] = new MenuItem();
                menuItems[i].imageselected   = new Image("TitleScreen/menutext_" + (i + 1).ToString() + "_selected");
                menuItems[i].imageunselected = new Image("TitleScreen/menutext_" + (i + 1).ToString() + "_unselected");
                menuItems[i].ItemID          = i;
            }
            menuItems[0].Selected = true;

            Size = new Vector2(1366, 768);
            ScreenManager.Instance.Dimensions       = Size;
            ScreenManager.Instance.ScreenDimChanged = true;

            foreach (DisplayMode dm in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes)
            {
                dmList.Add(dm);
            }

            test_text = new cText(dmList[0].AspectRatio.ToString() + " NumDisplaymodes:" + dmList.Count);
        }
Exemplo n.º 2
0
        public LevelIndicator()
        {
            Text = new cText("1", "DryGood");
            Text.LoadContent();

            width  = 1f / 3f * GameSettings.Instance.Tilescale.X;
            height = 0.25f * GameSettings.Instance.Tilescale.Y;
        }
Exemplo n.º 3
0
 /// <summary>
 /// Contructor for a Control Item
 /// </summary>
 /// <param name="">The title of the Item</param>
 public Control1_Field(int FieldID, int maxFields, string title, int numItems)
 {
     this.title     = new cText(title, "DryGood");
     this.FieldID   = FieldID;
     this.maxFields = maxFields;
     this.maxItems  = numItems;
     this.status    = 0;
     IsActive       = false;
 }
Exemplo n.º 4
0
        public Control1(int numFields, int currentNumItems)
        {
            #region "Create Instances of all the Images"
            background             = new Image("OptionsScreen/poster_background");
            field_active           = new Image("OptionsScreen/field_active");
            mainbuttonup           = new Image("OptionsScreen/buttonup_selected");
            mainbuttonmiddle       = new Image("OptionsScreen/buttonmiddel_selected");
            mainbuttondown         = new Image("OptionsScreen/buttondown_selected");
            mainbuttonup_pressed   = new Image("OptionsScreen/buttonup_selected_pressed");
            mainbuttondown_pressed = new Image("OptionsScreen/buttondown_selected_pressed");
            buttonback             = new cText("Back", "DryGood");
            buttoncontinue         = new cText("Continue", "DryGood");
            #endregion

            this.numberControlFields       = numFields;
            this.CurrentNumberControlItems = currentNumItems;
            currentSelectedMainControl     = selection.buttonmiddle;
            currentSelectedItemControl     = selection.arrow_left;


            int[] Fields = new int[numFields];
            CurrentActiveField = 0;
        }
Exemplo n.º 5
0
 public PauseMenuItem(string Text, int ID)
 {
     this.Text = new cText(Text, "DryGood");
     Name      = Text;
     ItemID    = ID;
 }
Exemplo n.º 6
0
        public Control1_Item(int itemID, string itemname, string itemsetting, int fieldID, int maxindex)
        {
            this.fieldID      = fieldID;
            ItemID            = itemID;
            this.itemtitle    = new cText(itemname + ":", "DryGood");
            this.itemsetting  = new cText(itemsetting, "DryGood");
            arrow_left        = new Image("OptionsScreen/arrow_left");
            arrow_right       = new Image("OptionsScreen/arrow_right");
            arrow_left.Color  = Color.Black;
            arrow_right.Color = Color.Black;
            fadeeffect        = new FadeEffect(1.5f, 1.0f, 0.3f);
            currentSelected   = selection.arrowleft;
            this.maxIndex     = maxindex;
            Random random = new Random();

            if (ScreenManager.Instance.Controllers[0].characterInfo.NotFound == true)
            {
                currentIndex = random.Next(0, maxindex);
            }
            else
            {
                if (fieldID == 1)
                {
                    switch (itemID)
                    {
                    case 0:
                        currentIndex = ScreenManager.Instance.Controllers[0].characterInfo.Gender;
                        break;

                    case 1:
                        currentIndex = ScreenManager.Instance.Controllers[0].characterInfo.Skincolor;
                        break;
                    }
                }
                else if (fieldID == 2)
                {
                    switch (itemID)
                    {
                    case 0:
                        currentIndex = ScreenManager.Instance.Controllers[0].characterInfo.Head;
                        break;

                    case 1:
                        currentIndex = ScreenManager.Instance.Controllers[0].characterInfo.Shirt;
                        break;

                    case 2:
                        currentIndex = ScreenManager.Instance.Controllers[0].characterInfo.Belt;
                        break;

                    case 3:
                        currentIndex = ScreenManager.Instance.Controllers[0].characterInfo.Pants;
                        break;
                    }
                }
                else if (fieldID == 0)
                {
                    currentIndex = ScreenManager.Instance.Controllers[0].characterInfo.NameIndex;
                }
            }
        }
Exemplo n.º 7
0
        public MenuScreen()
        {
            background = new Image("TitleScreen/background");
            sign = new Image("TitleScreen/woodsign_marshal_law");
            poster = new Image("TitleScreen/gun_poster1280x720");
            menuItems = new MenuItem[text.Length];

            for (int i = 0; i < text.Length; i++)
            {
                menuItems[i] = new MenuItem();
                menuItems[i].imageselected = new Image("TitleScreen/menutext_" + (i+1).ToString() + "_selected");
                menuItems[i].imageunselected = new Image("TitleScreen/menutext_" + (i+1).ToString() + "_unselected");
                menuItems[i].ItemID = i;
            }
            menuItems[0].Selected = true;

            Size = new Vector2(1366, 768);
            ScreenManager.Instance.Dimensions = Size;
            ScreenManager.Instance.ScreenDimChanged = true;

            foreach (DisplayMode dm in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes)
            {
                dmList.Add(dm);
            }

            test_text = new cText(dmList[0].AspectRatio.ToString() + " NumDisplaymodes:" + dmList.Count);
        }