static internal string CodexToHTML(this List <Skill> codex) { // Update this with the following modes: // 1. List. Shouldn't put breaks or newlines in between skills, just spaces. Skills should be separated // out by category (<h2>warrior</h2><h3>strength</h3>). // 2. When using just icons, just plop all of them together and let the webpage newline it. // 3. Use something more like what I've got now for the full descriptions, maybe with headers for profession and attribute as above. string html = ""; // if(Mode is list)... { Skill.Professions lastProf = (Skill.Professions)(-1); Skill.Attributes lastAttr = (Skill.Attributes)(-1); foreach (Skill skill in codex) { if (skill.Profession != lastProf) { html += "<h2>" + skill.Profession.ToString() + "</h2>" + Environment.NewLine; lastProf = skill.Profession; } if (skill.Attribute != lastAttr) { html += "<h3>" + skill.AttributeName + "</h3>" + Environment.NewLine; lastAttr = skill.Attribute; } html += skill.AHref() + " | "; } } return(html); }
internal void SetByProfession(Skill.Professions profession, bool value) { for (int i = 0; i < Skills.Count; ++i) { if (Skills[i].first.Profession == profession) { Skills[i].second = value; } } UpdateSetDescription?.Invoke(); Redraw(); }