ktsu.ImGuiStyler 1.0.10

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package ktsu.ImGuiStyler --version 1.0.10                
NuGet\Install-Package ktsu.ImGuiStyler -Version 1.0.10                
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="ktsu.ImGuiStyler" Version="1.0.10" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ktsu.ImGuiStyler --version 1.0.10                
#r "nuget: ktsu.ImGuiStyler, 1.0.10"                
#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.
// Install ktsu.ImGuiStyler as a Cake Addin
#addin nuget:?package=ktsu.ImGuiStyler&version=1.0.10

// Install ktsu.ImGuiStyler as a Cake Tool
#tool nuget:?package=ktsu.ImGuiStyler&version=1.0.10                

ImGuiStyler

ImGuiStyler is a utility library designed to simplify and enhance styling in ImGui. It provides scoped, reusable, and extensible components for aligning content, managing colors, styling text, and applying themes.

Features

  • Alignment: Center and align content effortlessly within containers.
  • Scoped Styling: Utilize scoped style variables for precise UI customizations.
  • Color Management: Convert and manipulate colors, ensuring optimal contrast.
  • Button Styling: Create and align buttons with ease.
  • Text Handling: Define and apply text colors and styles.
  • Theme Support: Apply cohesive themes to standardize the look and feel of your application.

Installation

Add the package references in your .csproj file:

<PackageReference Include="ktsu.ImGuiStyler" Version="1.0.36" />

Usage

Scoped Alignment

using ktsu.ImGuiStyler;
using System.Numerics;

// Center content within a region
string text = "Centered Text";
Vector2 textSize = ImGui.CalcTextSize(text);
using (new Alignment.Center(textSize))
{
    ImGui.Text(text);
}

Scoped Styling

using ktsu.ImGuiStyler;

using (new ScopedStyleVar(ImGuiStyleVar.FrameRounding, 5.0f))
{
    ImGui.Button("Styled Button");
}

Scoped Color

using ktsu.ImGuiStyler;

using (new ScopedColor(ImGuiCol.Text, Color.AmethystPurple))
{
    ImGui.Text("Colored Text");
}

Scoped Themes

using ktsu.ImGuiStyler;

using (new ScopedThemeColor(Color.AmethystPurple))
{
    ImGui.Text("Themed Text");
    ImGui.Button("Themed Button");
}

Contributing

Contributions are welcome! If you find a bug or have an idea for a feature, please submit an issue or a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions or support, please open an issue or contact the maintainer through GitHub.

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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on ktsu.ImGuiStyler:

Package Downloads
ktsu.ImGuiWidgets

A library of custom widgets using ImGui.NET and utilities to enhance ImGui-based applications.

ktsu.ImGuiPopups

A library for custom popups using ImGui.NET.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.15 166 1/2/2025
1.0.15-pre.15 0 1/9/2025
1.0.15-pre.14 0 1/9/2025
1.0.15-pre.13 35 1/5/2025
1.0.15-pre.12 57 1/3/2025
1.0.15-pre.11 43 1/3/2025
1.0.15-pre.10 41 1/3/2025
1.0.15-pre.9 47 1/3/2025
1.0.15-pre.8 50 1/2/2025
1.0.15-pre.7 69 12/31/2024
1.0.15-pre.6 43 12/30/2024
1.0.15-pre.5 45 12/29/2024
1.0.15-pre.4 40 12/28/2024
1.0.15-pre.3 40 12/27/2024
1.0.15-pre.2 42 12/27/2024
1.0.15-pre.1 41 12/27/2024
1.0.14-pre.1 43 12/27/2024
1.0.13 185 12/26/2024
1.0.12 250 12/26/2024
1.0.11 76 12/26/2024
1.0.10 118 12/25/2024
1.0.10-pre.1 46 12/27/2024
1.0.9 242 12/23/2024
1.0.8 96 12/23/2024
1.0.7 70 12/23/2024
1.0.6 168 12/22/2024
1.0.5 150 12/19/2024
1.0.4 114 12/19/2024
1.0.3 130 12/18/2024
1.0.2 226 12/16/2024
1.0.1 152 12/13/2024
1.0.0 190 12/11/2024
1.0.0-alpha.69 72 12/10/2024
1.0.0-alpha.68 92 12/9/2024
1.0.0-alpha.67 51 12/9/2024
1.0.0-alpha.66 109 12/6/2024
1.0.0-alpha.65 110 12/5/2024
1.0.0-alpha.64 200 12/2/2024
1.0.0-alpha.63 46 12/2/2024
1.0.0-alpha.62 62 12/2/2024
1.0.0-alpha.61 45 12/2/2024
1.0.0-alpha.60 61 12/1/2024
1.0.0-alpha.59 91 12/1/2024
1.0.0-alpha.58 68 11/30/2024
1.0.0-alpha.57 77 11/29/2024
1.0.0-alpha.56 140 11/27/2024
1.0.0-alpha.55 100 11/26/2024
1.0.0-alpha.54 146 11/22/2024
1.0.0-alpha.53 116 11/21/2024
1.0.0-alpha.52 96 11/20/2024
1.0.0-alpha.51 130 11/18/2024
1.0.0-alpha.50 72 11/15/2024
1.0.0-alpha.49 121 11/14/2024
1.0.0-alpha.48 91 11/13/2024
1.0.0-alpha.47 180 11/8/2024
1.0.0-alpha.46 98 11/7/2024
1.0.0-alpha.45 86 11/6/2024
1.0.0-alpha.44 118 11/4/2024
1.0.0-alpha.43 238 11/1/2024
1.0.0-alpha.42 283 10/25/2024
1.0.0-alpha.41 120 10/21/2024
1.0.0-alpha.40 117 10/17/2024
1.0.0-alpha.39 207 10/10/2024
1.0.0-alpha.38 153 10/10/2024
1.0.0-alpha.37 120 10/7/2024
1.0.0-alpha.36 108 10/4/2024
1.0.0-alpha.35 192 9/30/2024
1.0.0-alpha.34 110 9/26/2024
1.0.0-alpha.33 84 9/25/2024
1.0.0-alpha.32 108 9/23/2024
1.0.0-alpha.31 106 9/20/2024
1.0.0-alpha.30 90 9/19/2024
1.0.0-alpha.29 89 9/19/2024
1.0.0-alpha.28 44 9/19/2024
1.0.0-alpha.27 43 9/19/2024
1.0.0-alpha.26 37 9/19/2024
1.0.0-alpha.25 65 9/19/2024
1.0.0-alpha.24 83 9/18/2024
1.0.0-alpha.23 53 9/18/2024
1.0.0-alpha.22 99 9/18/2024
1.0.0-alpha.21 50 9/18/2024
1.0.0-alpha.20 102 9/18/2024
1.0.0-alpha.19 215 9/14/2024
1.0.0-alpha.18 59 9/14/2024