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); }
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); }
public GuiGroup(GuiContainer parent) : base(0, 0) { EnableBackground = false; Align = GuiAlignment.Full; parent.Add(this); }
/** * Creates GuiAction slots for currently set character */ private void Sync() { SlotsContainer.Clear(); if (Character == null) { return; } for (int lp = 0; lp < NUMBER_OF_ACTIONS; lp++) { var slot = new GuiActionSlot(Character, lp) { X = 2 + lp * (GuiAction.SIZE + 4) }; ActionContainerList[lp] = slot; ActionContainerList[lp].OnMouseClicked += delegate { activate(slot.Action); }; SlotsContainer.Add(ActionContainerList[lp]); } }
/** 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); }
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); }