Skip to content

Commit 20b4423

Browse files
committed
add read button
1 parent b7657fa commit 20b4423

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

SomethingNeedDoing/Gui/Tabs/MacroSettingsSection.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@ public void Draw(ConfigMacro? selectedMacro)
7979
Svc.Log.Error($"Failed to write metadata to macro {selectedMacro.Name}");
8080
}
8181
ImGuiEx.Tooltip("Writes the current metadata (author, version, description, dependencies, triggers) to the macro content. If metadata already exists, it will be updated.");
82+
83+
ImGui.SameLine();
84+
85+
if (ImGui.Button("Read Metadata from Content"))
86+
{
87+
selectedMacro.Metadata = metadataParser.ParseMetadata(selectedMacro.Content);
88+
C.Save();
89+
}
90+
ImGuiEx.Tooltip("Reads metadata (author, version, description, dependencies, triggers) from the macro content and updates the settings.");
8291
}
8392

8493
ImGui.Spacing();

0 commit comments

Comments
 (0)