mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-03 06:13:45 +01:00
Reinstate spacebar heating
This commit is contained in:
parent
e52b027545
commit
3754f57132
2 changed files with 59 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
|
using Dalamud.Interface.Utility;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
using OtterGui;
|
using OtterGui;
|
||||||
using OtterGui.Raii;
|
using OtterGui.Raii;
|
||||||
|
|
@ -188,4 +189,61 @@ public partial class ModEditWindow
|
||||||
if (t)
|
if (t)
|
||||||
Widget.DrawHexViewer(file.AdditionalData);
|
Widget.DrawHexViewer(file.AdditionalData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DrawMaterialReassignmentTab()
|
||||||
|
{
|
||||||
|
if (_editor.Files.Mdl.Count == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
using var tab = ImRaii.TabItem("Material Reassignment");
|
||||||
|
if (!tab)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ImGui.NewLine();
|
||||||
|
MaterialSuffix.Draw(_editor, ImGuiHelpers.ScaledVector2(175, 0));
|
||||||
|
|
||||||
|
ImGui.NewLine();
|
||||||
|
using var child = ImRaii.Child("##mdlFiles", -Vector2.One, true);
|
||||||
|
if (!child)
|
||||||
|
return;
|
||||||
|
|
||||||
|
using var table = ImRaii.Table("##files", 4, ImGuiTableFlags.RowBg | ImGuiTableFlags.SizingFixedFit, -Vector2.One);
|
||||||
|
if (!table)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var iconSize = ImGui.GetFrameHeight() * Vector2.One;
|
||||||
|
foreach (var (info, idx) in _editor.MdlMaterialEditor.ModelFiles.WithIndex())
|
||||||
|
{
|
||||||
|
using var id = ImRaii.PushId(idx);
|
||||||
|
ImGui.TableNextColumn();
|
||||||
|
if (ImGuiUtil.DrawDisabledButton(FontAwesomeIcon.Save.ToIconString(), iconSize,
|
||||||
|
"Save the changed mdl file.\nUse at own risk!", !info.Changed, true))
|
||||||
|
info.Save(_editor.Compactor);
|
||||||
|
|
||||||
|
ImGui.TableNextColumn();
|
||||||
|
if (ImGuiUtil.DrawDisabledButton(FontAwesomeIcon.Recycle.ToIconString(), iconSize,
|
||||||
|
"Restore current changes to default.", !info.Changed, true))
|
||||||
|
info.Restore();
|
||||||
|
|
||||||
|
ImGui.TableNextColumn();
|
||||||
|
ImGui.TextUnformatted(info.Path.FullName[(Mod!.ModPath.FullName.Length + 1)..]);
|
||||||
|
ImGui.TableNextColumn();
|
||||||
|
ImGui.SetNextItemWidth(400 * UiHelpers.Scale);
|
||||||
|
var tmp = info.CurrentMaterials[0];
|
||||||
|
if (ImGui.InputText("##0", ref tmp, 64))
|
||||||
|
info.SetMaterial(tmp, 0);
|
||||||
|
|
||||||
|
for (var i = 1; i < info.Count; ++i)
|
||||||
|
{
|
||||||
|
ImGui.TableNextColumn();
|
||||||
|
ImGui.TableNextColumn();
|
||||||
|
ImGui.TableNextColumn();
|
||||||
|
ImGui.TableNextColumn();
|
||||||
|
ImGui.SetNextItemWidth(400 * UiHelpers.Scale);
|
||||||
|
tmp = info.CurrentMaterials[i];
|
||||||
|
if (ImGui.InputText($"##{i}", ref tmp, 64))
|
||||||
|
info.SetMaterial(tmp, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -179,6 +179,7 @@ public partial class ModEditWindow : Window, IDisposable, IUiService
|
||||||
DrawSwapTab();
|
DrawSwapTab();
|
||||||
_modMergeTab.Draw();
|
_modMergeTab.Draw();
|
||||||
DrawDuplicatesTab();
|
DrawDuplicatesTab();
|
||||||
|
DrawMaterialReassignmentTab();
|
||||||
DrawQuickImportTab();
|
DrawQuickImportTab();
|
||||||
_modelTab.Draw();
|
_modelTab.Draw();
|
||||||
_materialTab.Draw();
|
_materialTab.Draw();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue