public void DrawDetails(NTree dataTree) { if (Type == NodeType.Skill) { var skill = RPG.PlayerData.Skills.First(s => s.Name == Ref); new UIText(Ref, new Point(UI.WIDTH / 2, UI.HEIGHT - 95), 0.3f, Color.White, 0, true).Draw(); new UIText(skill.Description, new Point(UI.WIDTH / 2, UI.HEIGHT - 75), 0.22f, Color.White, 0, true).Draw(); var topPoint = new Point(UI.WIDTH / 2, UI.HEIGHT - 62); var i = 0; var sparams = SkillRepository.GetVisibleParams(Ref); foreach (var kvp in sparams) { new UIText(kvp.Key + ": " + kvp.Value.Invoke(skill), topPoint + new Size(0, 10 * i), 0.20f, Color.DodgerBlue, 0, true).Draw(); i++; } new UIText(skill.Unlocked ? "unlocked" : "unlock for " + skill.PointsToUnlock + " SP", new Point(UI.WIDTH / 2, UI.HEIGHT - 22), 0.20f, Color.Gray, 0, true).Draw(); Sprite.Draw(new Point(UI.WIDTH / 2 - 140, UI.HEIGHT - 50), 40, 40, Color.FromArgb(120, 255, 255, 255)); } else if (Type == NodeType.Weapon) { var wep = RPG.PlayerData.Weapons.FirstOrDefault(s => s.WeaponHash == WepHash); new UIText(Ref, new Point(UI.WIDTH / 2, UI.HEIGHT - 95), 0.3f, Color.White, 0, true).Draw(); new UIText(wep.Description, new Point(UI.WIDTH / 2, UI.HEIGHT - 75), 0.22f, Color.White, 0, true).Draw(); var topPoint = new Point(UI.WIDTH / 2, UI.HEIGHT - 62); //var i = 0; //var sparams = SkillRepository.GetVisibleParams(Ref); //foreach (var kvp in sparams) //{ // new UIText(kvp.Key +": " + kvp.Value.Invoke(skill) ,topPoint + new Size(0,10 * i) , 0.20f, Color.DodgerBlue, 0, true).Draw(); // i++; //} new UIText(wep.Unlocked ? "unlocked" : "unlock for " + wep.PointsToUnlock + " SP [Requires Lv." + wep.LevelToUnlock + "]", new Point(UI.WIDTH / 2, UI.HEIGHT - 22), 0.20f, Color.Gray, 0, true).Draw(); Sprite.Draw(new Point(UI.WIDTH / 2 - 140, UI.HEIGHT - 50), 40, 40, Color.FromArgb(120, 255, 255, 255)); } else if (Type == NodeType.SkillMod) { new UIText(Ref, new Point(UI.WIDTH / 2, UI.HEIGHT - 95), 0.3f, Color.White, 0, true).Draw(); new UIText(Description, new Point(UI.WIDTH / 2, UI.HEIGHT - 75), 0.22f, Color.White, 0, true).Draw(); var skillForMod = RPG.PlayerData.Skills.FirstOrDefault(s => s.Name == dataTree.TreeRef); var mod = skillForMod.UsedMods.FirstOrDefault(s => s == Ref); var unlockedText = mod != null ? "unlocked" : "unlock for " + skillForMod.Mods[Ref] + " SP"; new UIText(unlockedText, new Point(UI.WIDTH / 2, UI.HEIGHT - 22), 0.20f, Color.Gray, 0, true).Draw(); Sprite.Draw(new Point(UI.WIDTH / 2 - 140, UI.HEIGHT - 50), 40, 40, Color.FromArgb(120, 255, 255, 255)); } }
public override void Draw(Size offset) { if (!RPGSettings.ShowUI) { return; } if (ExtendWindowHeight) { new UIRectangle(new Point(offset.Width, offset.Height - UI.HEIGHT), new Size(300, UI.HEIGHT), UnselectedItemColor).Draw(); } _banner.Draw(new Point(offset.Width, offset.Height), 300, 70); new UIText(_bannerCaption, new Point(offset.Width + 150, offset.Height + 18), 0.8f, Color.White, 0, true).Draw(); base.Draw(offset + new Size(0, 70)); var bottomY = offset.Height + 70 + Items.Count * ItemHeight; if (HasFooter) { bottomY += FooterHeight; } bottomY += HeaderHeight; if (ExtendWindowHeight) { new UIRectangle(new Point(offset.Width, bottomY), new Size(300, UI.HEIGHT), UnselectedItemColor).Draw(); new UIRectangle(new Point(offset.Width + 300, offset.Height - UI.HEIGHT), new Size(2, UI.HEIGHT * 2), Color.FromArgb(200, 8, 8, 8)).Draw(); } }