![]() |
VOOZH | about |
dotnet add package DanielWillett.UnturnedUITools --version 1.4.7
NuGet\Install-Package DanielWillett.UnturnedUITools -Version 1.4.7
<PackageReference Include="DanielWillett.UnturnedUITools" Version="1.4.7" />
<PackageVersion Include="DanielWillett.UnturnedUITools" Version="1.4.7" />Directory.Packages.props
<PackageReference Include="DanielWillett.UnturnedUITools" />Project file
paket add DanielWillett.UnturnedUITools --version 1.4.7
#r "nuget: DanielWillett.UnturnedUITools, 1.4.7"
#:package DanielWillett.UnturnedUITools@1.4.7
#addin nuget:?package=DanielWillett.UnturnedUITools&version=1.4.7Install as a Cake Addin
#tool nuget:?package=DanielWillett.UnturnedUITools&version=1.4.7Install as a Cake Tool
Powerful Unturned Module/Library for manipulating Glazier/Sleek UI.
Requires HarmonyLib 2.3.3+.
NuGet package: DanielWillett.UnturnedUITools
This package references my Reflection Tools library which has a lot of good tools for efficient access to non-public members.
This package includes complete XML documentation for SDG.Glazier.Runtime.dll, which houses all of the Glazier code.
Note: this is done by including a reference assembly in the package, so don't copy it from the output directory to your libraries.
The UIAccessor class has many tools for working with UIs:
EditorUIReady and PlayerUIReady events.TypeInfo with basic information about each UI type (used by UI extensions).OnInitializingUIInfo to add your own information to TypeInfo.LoadUIToILGenerator and EnumerateUIInstructions to load instance singleton UIs to ILGenerators or transpilers.ISleekElement: CopyTransformFrom to copy all transform values from one element to another.Add a class as an extension to existing vanilla or modded UI classes.
You can extend the following types. It is also possible to add your own types.
Useable UIs (Guns, Housing Planners, etc).SleekWrapper.Easy access to members of the class you're expanding (static or instance) is possible with Existing Members.
// Property getter will be patched to return messageLabel.
[ExistingMember("messageLabel")]
private ISleekLabel MessageLabel { get; }
// Property will be set before the constructor runs. Change this behavior with the 'InitializeMode' attribute property.
// If you choose to use the 'PatchGetter' option with a setter,
// you cannot use the setter to set the existing member's value back.
[ExistingMember("messageLabel")]
private ISleekLabel MessageLabel { get; set; }
// Field will be set before the constructor runs.
[ExistingMember("messageLabel")]
private readonly ISleekLabel _messageLabel;
Due to the way UI extensions are created, setting existing members to null!
to suppress nullability warnings actually overrides the value set before the constructor runs.
Take care to avoid doing this.
// Setting this to null here to fix nullable references will run after the fields
// are initialized but before the constructor so _container will have a null value.
//
// Instead use #nullable disable and #nullable restore to do this,
// or simply mark the field nullable.
// ================== BAD ==============================
[ExistingMember("container")]
private readonly SleekFullscreenBox _container = null!;
// ================== GOOD =============================
#nullable disable
// ...
[ExistingMember("container")]
private readonly SleekFullscreenBox _container;
// ...
#nullable restore
// ================== GOOD =============================
[ExistingMember("container")]
private readonly SleekFullscreenBox? _container;
// =====================================================
The system is designed to be able to be accessed from a static context (like a patch, for example).
// Getting static or singleton UI extensions:
MenuDashboardUIExtension? extension = UnturnedUIToolsNexus.UIExtensionManager.GetInstance<MenuDashboardUIExtension>();
// Getting non-singleton UI extensions:
static void Postfix(object __instance)
{
SleekItemExtension? extension = UnturnedUIToolsNexus.UIExtensionManager.GetInstance<SleekItemExtension>(__instance);
}
More examples available in: ExampleModule/Examples.
This example adds a button to the bottom left of the main menu.
[UIExtension(typeof(MenuDashboardUI))]
internal class MenuDashboardUIExtension : UIExtension, IDisposable
{
private const string Url = "https://github.com/DanielWillett/UnturnedUITools";
private readonly ISleekButton _githubButton;
[ExistingMember("exitButton")]
private readonly SleekButtonIcon _exitButton;
[ExistingMember("container")]
private readonly SleekFullscreenBox _container;
public MenuDashboardUIExtension()
{
_githubButton = Glazier.Get().CreateButton();
_githubButton.CopyTransformFrom(_exitButton);
_githubButton.PositionOffset_Y -= 60;
_githubButton.Text = "UITools GitHub";
_githubButton.FontSize = ESleekFontSize.Medium;
_githubButton.OnClicked += OnClickedGithubButton;
_githubButton.BackgroundColor = ESleekTint.BACKGROUND;
_container.AddChild(_githubButton);
}
private static void OnClickedGithubButton(ISleekElement button)
{
Process.Start(new ProcessStartInfo
{
FileName = Url,
UseShellExecute = true
});
}
public void Dispose()
{
_githubButton.OnClicked -= OnClickedGithubButton;
_container.RemoveChild(_githubButton);
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 netstandard2.1 is compatible. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 4 NuGet packages that depend on DanielWillett.UnturnedUITools:
| Package | Downloads |
|---|---|
|
DevkitServer.Client
Module for Unturned that enables multi-user map editing. |
|
|
DevkitServer.Server
Module for Unturned that enables multi-user map editing. |
|
|
Breakdown.Tools
Package containing several tools for plugin and module development. |
|
|
DanielWillett.LevelObjectIcons
LevelObject icon renderer for the Unturned Map Editor. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 1.4.7 | 126 | 4/4/2026 | |
| 1.4.6 | 148 | 3/12/2026 | |
| 1.4.5 | 284 | 12/31/2024 | |
| 1.4.4 | 219 | 12/31/2024 | |
| 1.4.3 | 406 | 8/18/2024 | |
| 1.4.2 | 321 | 6/8/2024 | |
| 1.4.1 | 255 | 5/7/2024 | |
| 1.4.0 | 277 | 2/12/2024 | |
| 1.3.1 | 413 | 11/22/2023 | |
| 1.3.0 | 615 | 11/18/2023 | |
| 1.2.2 | 224 | 11/13/2023 | |
| 1.2.1 | 257 | 10/30/2023 | |
| 1.2.0 | 244 | 10/28/2023 | |
| 1.1.1 | 289 | 10/23/2023 | 1.1.1 is deprecated because it has critical bugs. |
| 1.1.0 | 274 | 10/23/2023 | 1.1.0 is deprecated because it has critical bugs. |
| 1.0.0 | 293 | 10/22/2023 | 1.0.0 is deprecated because it has critical bugs. |
Update for 3.26.2.0.