ktsu.ImGuiStyler
1.0.15
Prefix Reserved
dotnet add package ktsu.ImGuiStyler --version 1.0.15
NuGet\Install-Package ktsu.ImGuiStyler -Version 1.0.15
<PackageReference Include="ktsu.ImGuiStyler" Version="1.0.15" />
paket add ktsu.ImGuiStyler --version 1.0.15
#r "nuget: ktsu.ImGuiStyler, 1.0.15"
// Install ktsu.ImGuiStyler as a Cake Addin #addin nuget:?package=ktsu.ImGuiStyler&version=1.0.15 // Install ktsu.ImGuiStyler as a Cake Tool #tool nuget:?package=ktsu.ImGuiStyler&version=1.0.15
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 | Versions 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. |
-
net8.0
- ImGui.NET (>= 1.91.0.1)
- ktsu.Extensions (>= 1.3.1)
- ktsu.ScopedAction (>= 1.0.14)
-
net9.0
- ImGui.NET (>= 1.91.0.1)
- ktsu.Extensions (>= 1.3.1)
- ktsu.ScopedAction (>= 1.0.14)
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 | 123 | 1/2/2025 |
1.0.15-pre.13 | 35 | 1/5/2025 |
1.0.15-pre.12 | 57 | 1/3/2025 |
1.0.15-pre.11 | 39 | 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 | 230 | 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 | 43 | 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 | 118 | 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 | 104 | 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 |
## v1.0.15 (unknown)
Changes since v1.0.15-pre.8:
- Add scripts for automated metadata management and versioning ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
## v1.0.14-pre.1 (patch)
Changes since v1.0.13:
- Renamed metadata files ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
## v1.0.11 (patch)
Changes since v1.0.10:
- Replace LICENSE file with LICENSE.md and update copyright information ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
## v1.0.0 (major)
Changes since 0.0.0.0:
- Add ability to center text withing a certain width ([@Matt Edmondson](https://github.com/Matt Edmondson))
- Add an accent color and use it for progress bars, plots, and histograms ([@Matt Edmondson](https://github.com/Matt Edmondson))
- Add an overload for Alignment.Center that takes 2 dimensions for vertical centering ([@Matt Edmondson](https://github.com/Matt Edmondson))
- Add generic centering method than can be used for any other content ([@Matt Edmondson](https://github.com/Matt Edmondson))
- Add github package support ([@matt-edmondson](https://github.com/matt-edmondson))
- Add more workarounds to support SameLine ([@Damon Lewis](https://github.com/Damon Lewis))
- Add printing text relative to the current theme ([@matt-edmondson](https://github.com/matt-edmondson))
- Add ScopedStyleVar class for scoped ImGui style management ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
- Add test project and try to fix colors not being correct ([@matt-edmondson](https://github.com/matt-edmondson))
- Add text centering ([@Matt Edmondson](https://github.com/Matt Edmondson))
- Add Text class with nested Color and ScopedTextColor ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
- Add XML docs to Button class; remove pragma warnings ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
- Add XML documentation to Indent class and its members ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
- Convert CenterWithin/Center to use the ScopedAction API ([@Damon Lewis](https://github.com/Damon Lewis))
- Desaturate scrollbars ([@matt-edmondson](https://github.com/matt-edmondson))
- Enhance Alignment and Color classes with new features ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
- Enhance Theme class with new methods and documentation ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
- Fix contrast ratio calculations ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
- Fix for accent colors not being used with scoped themes ([@Matt Edmondson](https://github.com/Matt Edmondson))
- Fix for CenterWithin not working as expected ([@Damon Lewis](https://github.com/Damon Lewis))
- Fix header color being the same as the frame color making selected selectables indistinguishable ([@matt-edmondson](https://github.com/matt-edmondson))
- Fix some alignment math ([@Matt Edmondson](https://github.com/Matt Edmondson))
- Initial commit ([@matt-edmondson](https://github.com/matt-edmondson))
- Migrate ktsu.io to ktsu namespace ([@Matt Edmondson](https://github.com/Matt Edmondson))
- Potential fix for list box highlights not working ([@matt-edmondson](https://github.com/matt-edmondson))
- Promote local variables to static members so the state persists. ie. Checkbox toggling won't reset per tick etc. ([@Damon Lewis](https://github.com/Damon Lewis))
- Refactor Scoped Constructors in UI Classes ([@matt-edmondson](https://github.com/matt-edmondson))
- Release version 1.0.0 ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
- Remove GlobalSuppressions.cs file ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
- Reverted recent changes to why the Dummy widget is rendered ([@Damon Lewis](https://github.com/Damon Lewis))
- Tweaked implementation ([@Damon Lewis](https://github.com/Damon Lewis))
- Update build config ([@matt-edmondson](https://github.com/matt-edmondson))
- Update Directory.Build.props ([@matt-edmondson](https://github.com/matt-edmondson))
- Update Directory.Build.targets ([@matt-edmondson](https://github.com/matt-edmondson))
- Update dotnet.yml ([@matt-edmondson](https://github.com/matt-edmondson))
- Update ImGui.NET ([@Matt Edmondson](https://github.com/Matt Edmondson))
- Update ktsu.Extensions package reference to version 1.0.31 ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
- Update ktsu.ImGuiApp package reference to version 1.0.0-alpha.71 ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
- Update LICENSE ([@matt-edmondson](https://github.com/matt-edmondson))
- Update nuget.config ([@matt-edmondson](https://github.com/matt-edmondson))
- Update package references for ImGuiStyler and ImGuiStylerDemo projects ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
- Update README.md with detailed library overview ([@Matthew Edmondson](https://github.com/Matthew Edmondson))
- Update VERSION ([@Matt Edmondson](https://github.com/Matt Edmondson))
- Use the highest needed contrast ratio for text ([@Matthew Edmondson](https://github.com/Matthew Edmondson))