Exemplo n.º 1
0
 public GuiGroup(GuiContainer parent)
     : base(0, 0)
 {
     EnableBackground = false;
     Align            = GuiAlignment.Full;
     parent.Add(this);
 }
Exemplo n.º 2
0
        private GuiContainer createStatsArea()
        {
            var container = new GuiContainer(WIDTH, HEIGHT);

            stats           = new GuiLabel(10, 0, "");
            stats.FontColor = baseColor;
            container.Add(stats);

            statsValue           = new GuiLabel(60, 0, "");
            statsValue.FontColor = baseColor;
            container.Add(statsValue);

            statsBonus = new GuiLabel(90, 0, "");
            container.Add(statsBonus);

            otherStats          = new GuiLabel(10, 150, "");
            otherStats.FontSize = 12;
            container.Add(otherStats);

            resistanceInfo           = new GuiLabel(130, 0, "");
            resistanceInfo.FontColor = baseColor;
            resistanceInfo.FontSize  = 14;
            container.Add(resistanceInfo);

            playStatsInfo           = new GuiLabel(10, 200, "");
            playStatsInfo.FontColor = baseColor;
            playStatsInfo.FontSize  = 10;
            container.Add(playStatsInfo);

            return(container);
        }
Exemplo n.º 3
0
        private GuiContainer createSkillsArea()
        {
            var container = new GuiContainer(WIDTH, HEIGHT);

            skillNames           = new GuiLabel(10, 0, "");
            skillNames.FontColor = baseColor;
            skillNames.FontSize  = 14;

            skillValues           = new GuiLabel(140, 0, "", 100);
            skillValues.FontColor = baseColor;
            skillValues.TextAlign = TextAnchor.MiddleCenter;
            skillValues.FontSize  = 14;

            skillProgressBar = new GuiProgressBar[CoM.Skills.Count];

            for (int lp = 0; lp < CoM.Skills.Count; lp++)
            {
                var progressBar = new GuiProgressBar(100, 16);
                progressBar.X                = 140;
                progressBar.Color            = Color.black.Faded(0.25f);
                progressBar.ProgressColor    = Color.gray.Faded(0.5f);
                progressBar.EnableBackground = true;
                progressBar.Visible          = false;
                skillProgressBar[lp]         = progressBar;
                container.Add(progressBar);
            }

            container.Add(skillNames);
            container.Add(skillValues);

            return(container);
        }
Exemplo n.º 4
0
        private GuiContainer createGuildsArea()
        {
            var container = new GuiContainer(WIDTH, HEIGHT);

            guildInfo           = new GuiLabel(10, 0, "");
            guildInfo.FontColor = baseColor;
            container.Add(guildInfo);

            guildLevels           = new GuiLabel(120, 0, "");
            guildLevels.FontColor = new Color(0.7f, 0.7f, 0.7f);
            guildLevels.TextAlign = TextAnchor.MiddleRight;
            container.Add(guildLevels);

            return(container);
        }
Exemplo n.º 5
0
        /** Creates a new actionbar */
        public GuiActionBar()
            : base(0, 0)
        {
            Sprite sprite = ResourceManager.GetSprite("Gui/ActionBar", true);

            Width  = (int)sprite.rect.width;
            Height = (int)sprite.rect.height;

            Style         = Engine.CreateStyle(sprite);
            Style.padding = new RectOffset(6, 6, 8, 8);

            SlotsContainer = new GuiContainer(Width, Height);
            Add(SlotsContainer);

            ActionContainerList = new GuiActionSlot[NUMBER_OF_ACTIONS];

            GuiPartyInfo.OnPartyMemberChoosen += setSpellTarget;
        }
Exemplo n.º 6
0
        /** Creates a new gui character stats page.*/
        public GuiCharacterStatsPage()
        {
            var headerShadow = new GuiFillRect(0, 0, 0, 30, Color.black.Faded(0.5f));

            headerShadow.Align = GuiAlignment.Top;
            //Add(headerShadow);

            var mainArea = new GuiContainer(WIDTH, HEIGHT - 20);

            mainArea.Y = 35;
            Add(mainArea);

            var statsArea = createStatsArea();

            mainArea.Add(statsArea);

            var skillsArea = createSkillsArea();

            mainArea.Add(skillsArea);

            var guildsArea = createGuildsArea();

            mainArea.Add(guildsArea);

            var buttonGroup = new GuiRadioButtonGroup();

            buttonGroup.OnValueChanged += delegate {
                statsArea.Visible  = buttonGroup.SelectedIndex == 0;
                skillsArea.Visible = buttonGroup.SelectedIndex == 1;
                guildsArea.Visible = buttonGroup.SelectedIndex == 2;
            };

            buttonGroup.EnableBackground = false;
            buttonGroup.ButtonStyle      = Engine.GetStyleCopy("SmallButton");
            buttonGroup.ButtonSize       = new Vector2(80, 24);
            buttonGroup.ButtonSpacing    = 5;
            buttonGroup.AddItem("Stats");
            buttonGroup.AddItem("Skills");
            buttonGroup.AddItem("Guilds");
            buttonGroup.Y = -5;
            Add(buttonGroup, 0);
        }