Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Knossos.NET/ViewModels/DeveloperModsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -365,5 +365,23 @@ public void InstallLatestStable()
}
}
}

internal async void OpenAddToolGuide()
{
try
{
var text = "If you want to add or update your tool to Knossos.NET tool section, you will need to make a PR in the tool repo: https://github.com/KnossosNET/Knet-Tool-Repo." +
"\nEditing the 'knet_tools.json' to add or modify your tool. The download must be in a direct-download storage (like a Github release), no google drive support." +
"\nIf you dont know how to do this, please create an 'issue' instead in that same repo, providing the tool data and download link." +
"\nIf you press continue you will be taken to the repo.";
var resp = await MessageBox.Show(MainWindow.instance, text, "Adding tools to Knossos.NET", MessageBox.MessageBoxButtons.ContinueCancel);
if (resp == MessageBox.MessageBoxResult.Continue)
KnUtils.OpenBrowserURL("https://github.com/KnossosNET/Knet-Tool-Repo");
}
catch(Exception ex)
{
Log.Add(Log.LogSeverity.Error, "DeveloperModsViewModel.OpenAddToolGuide", ex);
}
}
}
}
5 changes: 4 additions & 1 deletion Knossos.NET/Views/DeveloperModsView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
</TabItem>

<TabItem Header="Modding Tools">
<v:DevToolManagerView Content="{Binding DevToolManager}"/>
<Grid>
<Button ToolTip.Tip="You want to add your tool to Knossos.NET tool section?" Command="{Binding OpenAddToolGuide}" Margin="0,-50,5,0" VerticalAlignment="Top" HorizontalAlignment="Right" ZIndex="1">How to add or update my tool?</Button>
<v:DevToolManagerView Content="{Binding DevToolManager}"/>
</Grid>
</TabItem>

<TabItem Header="Nebula">
Expand Down