Merge branch 'color-table'

This commit is contained in:
Ottermandias 2023-09-15 14:00:44 +02:00
commit 25cdc00404
6 changed files with 199 additions and 218 deletions

View file

@ -25,7 +25,7 @@ public partial class ModEditWindow
ret |= DrawMaterialShader(tab, disabled);
ret |= DrawMaterialTextureChange(tab, disabled);
ret |= DrawMaterialColorSetChange(tab, disabled);
ret |= DrawMaterialColorTableChange(tab, disabled);
ret |= DrawMaterialConstants(tab, disabled);
ImGui.Dummy(new Vector2(ImGui.GetTextLineHeight() / 2));
@ -42,7 +42,7 @@ public partial class ModEditWindow
if (ImGui.Button("Reload live preview"))
tab.BindToMaterialInstances();
if (tab.MaterialPreviewers.Count != 0 || tab.ColorSetPreviewers.Count != 0)
if (tab.MaterialPreviewers.Count != 0 || tab.ColorTablePreviewers.Count != 0)
return;
ImGui.SameLine();
@ -159,6 +159,13 @@ public partial class ModEditWindow
ImRaii.TreeNode($"#{set.Index:D2} - {set.Name}", ImGuiTreeNodeFlags.Leaf).Dispose();
}
using (var sets = ImRaii.TreeNode("Color Sets", ImGuiTreeNodeFlags.DefaultOpen))
{
if (sets)
foreach (var set in file.ColorSets)
ImRaii.TreeNode($"#{set.Index:D2} - {set.Name}", ImGuiTreeNodeFlags.Leaf).Dispose();
}
if (file.AdditionalData.Length <= 0)
return;