/// <summary> /// Retrieve texture paths. /// If both low and high res are false, low res is still returned. /// Maps only have a single resolution. /// </summary> /// <param name="addLowRes"></param> /// <param name="addHiRes"></param> /// <returns></returns> public async Task <Dictionary <string, string> > GetTexPaths(bool addLowRes = true, bool addHiRes = false) { var resPaths = new Dictionary <string, string>(); if (SecondaryCategory == XivStrings.Maps) { var _tex = new Tex(XivCache.GameInfo.GameDirectory); var mapNamePaths = await _tex.GetMapAvailableTex(UiPath); return(mapNamePaths); } else if (SecondaryCategory == XivStrings.HUD) { //ui/uld/aozactionlearned.tex HasHiRes = true; if (addHiRes && !addLowRes) { resPaths.Add(Name, "ui/uld/" + Name.ToLower() + HiResUiExt + ".tex"); } else if (addHiRes && addLowRes) { resPaths.Add(Name + "SD", "ui/uld/" + Name.ToLower() + ".tex"); resPaths.Add(Name + "HD", "ui/uld/" + Name.ToLower() + HiResUiExt + ".tex"); } else { resPaths.Add(Name, "ui/uld/" + Name.ToLower() + ".tex"); } } else if (SecondaryCategory == XivStrings.LoadingScreen) { resPaths.Add(Name, UiPath + '/' + Name + ".tex"); } else { HasHiRes = true; var block = ((IconNumber / 1000) * 1000).ToString().PadLeft(6, '0'); var icon = IconNumber.ToString().PadLeft(6, '0'); if (addHiRes && !addLowRes) { resPaths.Add(Name, "ui/icon/" + block + '/' + icon + HiResUiExt + ".tex"); } else if (addHiRes && addLowRes) { resPaths.Add(Name + "SD", "ui/icon/" + block + '/' + icon + ".tex"); resPaths.Add(Name + "HD", "ui/icon/" + block + '/' + icon + HiResUiExt + ".tex"); } else { resPaths.Add(Name, "ui/icon/" + block + '/' + icon + ".tex"); } } return(resPaths); }
/// <summary> /// Creates a new tooltip /// </summary> /// <param name="name">The title of the tooltip</param> /// <param name="desc">The text of the tooltip</param> /// <param name="reqs">The assets required for the described ContextButton</param> /// <param name="icons">The IconNumbers to slot</param> public Tooltip(string name, string desc, List <string> reqs, params IconNumber[] icons) { Name = name; Description = desc; if (reqs != null) { foreach (string req in reqs) { Requirements.Add(UnitType.GetUnitType(req).Name); } } if (icons.Length > 0) { Icon1 = icons[0]; } else { Icon1 = null; } if (icons.Length > 1) { Icon2 = icons[1]; } else { Icon2 = null; } if (icons.Length > 2) { Icon3 = icons[2]; } else { Icon3 = null; } if (icons.Length > 3) { Icon4 = icons[3]; } else { Icon4 = null; } if (icons.Length > 4) { Icon5 = icons[4]; } else { Icon5 = null; } if (icons.Length > 5) { Icon6 = icons[5]; } else { Icon6 = null; } }