Skip to content

UITools 1.4.0

Choose a tag to compare

@DanielWillett DanielWillett released this 12 Feb 06:51
· 12 commits to master since this release
  • Experimental fluent UI for UI elements:
    • Features more user-friendly moving and resizing based on a provided anchor point.
    • See SleekElementBuilderExtensions.cs for a full list of builder methods.
    • Example:
SleekFullscreenBox container = /* container */;

ISleekButton existingButton = /* existing element */;

ISleekButton githubButton = Glazier.Get().ConfigureButton()
    .WithOrigin(existingButton) // copy transform from element
    .AddRawPositionPixels(0f, -60f) // add a raw offset to it
    .WithText("UITools GitHub") // set text
    .WithFontSize(ESleekFontSize.Medium) // set font size
    .WhenAnyClicked(_ => // add event handler
    {
        Process.Start(new ProcessStartInfo
        {
            FileName = "https://github.com/DanielWillett/UnturnedUITools",
            UseShellExecute = true
        });
    })
    .BuildAndParent(container); // add as a child to container and return the button.
  • Added support for ISleekElement.ChildAutoLayoutPadding (v3.24.1.0)

Files

  • UnturnedUITools.* - .NET Standard 2.1 target for UITools v1.4.0
  • DanielWillett.UnturnedUITools_DependentModule - Example module and UITools as separate modules.
    • This method is recommended to reduce clutter with multiple referencing modules.
  • ExampleModule_StandaloneModule - Example module by itself loading UITools as a library.