mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-23 08:17:59 +01:00
Update Combos.
This commit is contained in:
parent
95d5d6c4b0
commit
d2bfcefb89
6 changed files with 19 additions and 36 deletions
|
|
@ -32,7 +32,8 @@ public static class TextureDrawer
|
|||
|
||||
if (texture.LoadError is DllNotFoundException)
|
||||
{
|
||||
ImGuiUtil.TextColored(Colors.RegexWarningBorder, "A texture handling dependency could not be found. Try installing a current Microsoft VC Redistributable.");
|
||||
ImGuiUtil.TextColored(Colors.RegexWarningBorder,
|
||||
"A texture handling dependency could not be found. Try installing a current Microsoft VC Redistributable.");
|
||||
if (ImGui.Button("Microsoft VC Redistributables"))
|
||||
Dalamud.Utility.Util.OpenLink(link);
|
||||
ImGuiUtil.HoverTooltip($"Open {link} in your browser.");
|
||||
|
|
@ -111,14 +112,12 @@ public static class TextureDrawer
|
|||
}
|
||||
}
|
||||
|
||||
public sealed class PathSelectCombo : FilterComboCache<(string Path, bool Game, bool IsOnPlayer)>
|
||||
public sealed class PathSelectCombo(TextureManager textures, ModEditor editor, Func<ISet<string>> getPlayerResources)
|
||||
: FilterComboCache<(string Path, bool Game, bool IsOnPlayer)>(() => CreateFiles(textures, editor, getPlayerResources),
|
||||
MouseWheelType.None, Penumbra.Log)
|
||||
{
|
||||
private int _skipPrefix = 0;
|
||||
|
||||
public PathSelectCombo(TextureManager textures, ModEditor editor, Func<ISet<string>> getPlayerResources)
|
||||
: base(() => CreateFiles(textures, editor, getPlayerResources), Penumbra.Log)
|
||||
{ }
|
||||
|
||||
protected override string ToString((string Path, bool Game, bool IsOnPlayer) obj)
|
||||
=> obj.Path;
|
||||
|
||||
|
|
@ -140,7 +139,8 @@ public static class TextureDrawer
|
|||
return ret;
|
||||
}
|
||||
|
||||
private static IReadOnlyList<(string Path, bool Game, bool IsOnPlayer)> CreateFiles(TextureManager textures, ModEditor editor, Func<ISet<string>> getPlayerResources)
|
||||
private static IReadOnlyList<(string Path, bool Game, bool IsOnPlayer)> CreateFiles(TextureManager textures, ModEditor editor,
|
||||
Func<ISet<string>> getPlayerResources)
|
||||
{
|
||||
var playerResources = getPlayerResources();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue