OTK.UI 1.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package OTK.UI --version 1.1.1
                    
NuGet\Install-Package OTK.UI -Version 1.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OTK.UI" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OTK.UI" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="OTK.UI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OTK.UI --version 1.1.1
                    
#r "nuget: OTK.UI, 1.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OTK.UI@1.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OTK.UI&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=OTK.UI&version=1.1.1
                    
Install as a Cake Tool

OTK.UI

A cross platform UI library for OpenTK with embedded resource support.

Features

  • Buttons, Sliders, Labels, Panels and more.
  • UI layouts defined in XML.
  • Asset agnostic. Works with both embedded and disk files.
  • Compatible with OpenTK 4+.

Getting Started

  1. Clone or download the repository.
  2. Add OTK.UI as a project reference in your OpenTK project.
  3. Make sure your project has the necessary textures, fonts and XML layouts you wish to use in your user interface. OTK.UI does not come pre-packaged with those resources.

Dependencies

OTK.UI depends on a number of third party libraries.

Make sure these dependencies are installed via NuGet in your project before using OTK.UI

Contributing

Contributions to OTK.UI are welcome. You can help by fixing bugs, adding features, improving documentation or providing example layouts

How to Contribute

  1. Fork the repository and clone it locally.
# Replace your_username with your GitHub username.
git clone https://github.com/your_username/otk.ui.git
cd OTK.UI
  1. Create a new branch for your changes
git checkout -b feature/my_change
  1. Make your changes
  • Follow the existing code style
  • Test embedded resources, layouts and UI components
  • Update documentation as necessary
  1. Commit and Push your branch
git add .
git commit -m "Add a brief description of your changes here."
git push origin feature/my_change
  1. Open a Pull request against the main repository. Include a description of your changes and any relevant examples.

Reporting issues

  • Report bugs or issues under the Issues tab with clear steps to reproduce.
  • Feature requests and suggestions are welcome as well.

Example

Inside your custom GamePanel OnLoad method:

UIBase.Window = this;
TextureManager.LoadTexture("ButtonTexture.png");
FontManager.LoadFont("DefaultFont.ttf");
LayoutLoader loader = new LayoutLoader("LoadedLayout.xml");
var button = loader.Get<Button>("LoadedButton");
if (button is not null)
{
    button.Released += (MouseButton) =>
    {
        UIBase.Window?.Close();
    };
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.2 33 12/30/2025
1.1.1 43 12/30/2025
1.1.0 37 12/30/2025
1.0.3 111 12/26/2025
1.0.2 129 12/20/2025
1.0.1 169 12/19/2025
1.0.0 110 12/13/2025