public override void LoadContent()
        {
            base.LoadContent();
            activeOption = 0;
            rect = new Rectangle(20, 20, 200, 30);
            //rect = new Rectangle(20, 20, 120, 30);
            rect3 = new Rectangle(20, 60, 160, 30);
            rect2 = new Rectangle(20, 100, 300, 340);

            boxFrame = new FrameBox(5, rect, Color.DarkBlue);
            boxFrame.InternalRect = rect;
            boxFrame.BorderWidth = 5;
            boxFrame.InternalColor = Color.DarkBlue;
            boxFrame.LoadContent();

            secondFrame = new FrameBox(5, rect2, Color.DarkBlue);
            secondFrame.LoadContent();

            thirdFrame = new FrameBox(5, rect3, Color.DarkBlue);
            thirdFrame.LoadContent();

            internalText = new FloatingText[4];

            for (int i = 0; i < 4; i++)
            {
                internalText[i] = new FloatingText();
            }

            internalText[0].Text = "Use";
            internalText[1].Text = "Equip";
            internalText[2].Text = "Save";
            internalText[3].Text = "Exit";
            /*
            internalText[0].Text = "Buy";
            internalText[1].Text = "Sell";
            internalText[2].Text = "Exit";
            */
            internalText[0].Position = new Vector2(rect.Left + 10, rect.Top + 5);

            for (int i = 1; i < internalText.Length; i++)
            {
                internalText[i].Position = internalText[i-1].Position + new Vector2(internalText[i-1].StringSize().X + 10, 0);
                internalText[i].TextColor = Color.Gray;
            }

            internalText[0].TextColor = Color.White;

            foreach (var item in internalText)
            {
                item.LoadContent();
            }
        }
Esempio n. 2
0
 public ListBox()
 {
     this.Frame = new FrameBox(Constants.BordeWidth, Constants.ListBoxDimensions, Color.DarkBlue);
     this.IsVisible = false;
     this.activeElement = 0;
 }