Add "Restart Now" button
All checks were successful
Build / Compute Version (push) Successful in 5s
Build / Build Nuget package (CringeBootstrap.Abstractions) (push) Successful in 1m31s
Build / Build Nuget package (NuGet) (push) Successful in 2m2s
Build / Build Nuget package (CringePlugins) (push) Successful in 2m35s
Build / Build Nuget package (SharedCringe) (push) Successful in 2m18s
Build / Build Launcher (push) Successful in 3m25s
All checks were successful
Build / Compute Version (push) Successful in 5s
Build / Build Nuget package (CringeBootstrap.Abstractions) (push) Successful in 1m31s
Build / Build Nuget package (NuGet) (push) Successful in 2m2s
Build / Build Nuget package (CringePlugins) (push) Successful in 2m35s
Build / Build Nuget package (SharedCringe) (push) Successful in 2m18s
Build / Build Launcher (push) Successful in 3m25s
Fix search textbox Replace checkbox (it clips through the row, i couldn't get it to look nice) Add other tabs that will be implemented in future
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using CringePlugins.Abstractions;
|
using CringePlugins.Abstractions;
|
||||||
using CringePlugins.Config;
|
using CringePlugins.Config;
|
||||||
@@ -64,7 +65,15 @@ internal class PluginListComponent : IRenderComponent
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_changed)
|
if (_changed)
|
||||||
|
{
|
||||||
TextDisabled("Changes would be applied on the next restart");
|
TextDisabled("Changes would be applied on the next restart");
|
||||||
|
SameLine();
|
||||||
|
if (Button("Restart Now"))
|
||||||
|
{
|
||||||
|
Process.Start("explorer.exe", "steam://rungameid/244850");
|
||||||
|
Process.GetCurrentProcess().Kill();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (BeginTabBar("Main"))
|
if (BeginTabBar("Main"))
|
||||||
{
|
{
|
||||||
@@ -73,6 +82,7 @@ internal class PluginListComponent : IRenderComponent
|
|||||||
{
|
{
|
||||||
if (BeginTable("InstalledTable", 2, ImGuiTableFlags.ScrollY))
|
if (BeginTable("InstalledTable", 2, ImGuiTableFlags.ScrollY))
|
||||||
{
|
{
|
||||||
|
//todo: include plugin source (local, zznty nuget, etc) in menu?
|
||||||
TableSetupColumn("Id");
|
TableSetupColumn("Id");
|
||||||
TableSetupColumn("Version");
|
TableSetupColumn("Version");
|
||||||
TableHeadersRow();
|
TableHeadersRow();
|
||||||
@@ -85,6 +95,8 @@ internal class PluginListComponent : IRenderComponent
|
|||||||
Text(plugin.Metadata.Name);
|
Text(plugin.Metadata.Name);
|
||||||
TableNextColumn();
|
TableNextColumn();
|
||||||
Text(plugin.Metadata.Version.ToString());
|
Text(plugin.Metadata.Version.ToString());
|
||||||
|
|
||||||
|
//todo: use plugin.HasConfig and plugin.OpenConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
EndTable();
|
EndTable();
|
||||||
@@ -93,13 +105,27 @@ internal class PluginListComponent : IRenderComponent
|
|||||||
EndTabItem();
|
EndTabItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BeginTabItem("Available Plugins"))
|
if (BeginTabItem("Browse Plugins"))
|
||||||
{
|
{
|
||||||
AvailablePluginsTab();
|
AvailablePluginsTab();
|
||||||
|
|
||||||
EndTabItem();
|
EndTabItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (BeginTabItem("Configure Sources"))
|
||||||
|
{
|
||||||
|
//todo
|
||||||
|
Text("Todo");
|
||||||
|
EndTabItem();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BeginTabItem("Settings"))
|
||||||
|
{
|
||||||
|
//todo
|
||||||
|
Text("Todo");
|
||||||
|
EndTabItem();
|
||||||
|
}
|
||||||
|
|
||||||
EndTabBar();
|
EndTabBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,7 +162,7 @@ internal class PluginListComponent : IRenderComponent
|
|||||||
|
|
||||||
var searchResults = _searchResults ?? ImmutableDictionary<NuGetClient, SearchResult>.Empty;
|
var searchResults = _searchResults ?? ImmutableDictionary<NuGetClient, SearchResult>.Empty;
|
||||||
|
|
||||||
InputText("", ref _searchQuery, 256);
|
InputText("##searchbox", ref _searchQuery, 256);
|
||||||
|
|
||||||
SameLine();
|
SameLine();
|
||||||
|
|
||||||
@@ -187,16 +213,8 @@ internal class PluginListComponent : IRenderComponent
|
|||||||
TableNextColumn();
|
TableNextColumn();
|
||||||
|
|
||||||
var installed = _packages.ContainsKey(package.Id);
|
var installed = _packages.ContainsKey(package.Id);
|
||||||
BeginDisabled();
|
TextColored(installed ? new(0f, 1f, 0f, 1f) : new(1f, 0f, 0f, 1f),
|
||||||
if (Checkbox("", ref installed))
|
installed ? "Installed" : "Not Installed");
|
||||||
{
|
|
||||||
_packages = installed
|
|
||||||
? _packages.Add(package.Id, new(package.Version))
|
|
||||||
: _packages.Remove(package.Id);
|
|
||||||
|
|
||||||
Save();
|
|
||||||
}
|
|
||||||
EndDisabled();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user