mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-28 16:34:49 +00:00
Add RPC text when opening/closing a pck
This commit is contained in:
@@ -118,6 +118,9 @@ namespace PckStudio.Classes.FileTypes
|
||||
return LocKeys[locKey];
|
||||
}
|
||||
|
||||
public bool HasLocEntry(string locKey)
|
||||
=> LocKeys.ContainsKey(locKey);
|
||||
|
||||
public string GetLocEntry(string locKey, string language)
|
||||
{
|
||||
if (!LocKeys.ContainsKey(locKey))
|
||||
|
||||
@@ -142,6 +142,8 @@ namespace PckStudio
|
||||
convertToBedrockToolStripMenuItem.Enabled = true;
|
||||
BuildMainTreeView();
|
||||
tabControl.SelectTab(1);
|
||||
if (TryGetLocFile(out LOCFile locfile) && locfile.HasLocEntry("IDS_DISPLAY_NAME"))
|
||||
RPC.SetPresence($"Editing a Pack: {locfile.GetLocEntry("IDS_DISPLAY_NAME", "en-EN")}", "Program by PhoenixARC");
|
||||
}
|
||||
|
||||
private void CloseEditorTab()
|
||||
@@ -161,6 +163,7 @@ namespace PckStudio
|
||||
closeToolStripMenuItem.Visible = false;
|
||||
fileEntryCountLabel.Text = "Files:0";
|
||||
tabControl.SelectTab(0);
|
||||
RPC.SetPresence("An Open Source .PCK File Editor", "Program by PhoenixARC");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user