From abb452f17e51c0b96c6d3593aa1011769e284a28 Mon Sep 17 00:00:00 2001 From: Eric Mellino Date: Tue, 21 Nov 2017 12:36:22 -0800 Subject: [PATCH] Fix definition of ImGui.NET Style structure. --- src/ImGui.NET/Align.cs | 12 ------------ src/ImGui.NET/NativeStyle.cs | 6 +++++- src/ImGui.NET/Style.cs | 2 +- 3 files changed, 6 insertions(+), 14 deletions(-) delete mode 100644 src/ImGui.NET/Align.cs diff --git a/src/ImGui.NET/Align.cs b/src/ImGui.NET/Align.cs deleted file mode 100644 index 2cb1756..0000000 --- a/src/ImGui.NET/Align.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace ImGuiNET -{ - public enum Align - { - Left = 1 << 0, - Center = 1 << 1, - Right = 1 << 2, - Top = 1 << 3, - VCenter = 1 << 4, - Default = Left | Top - } -} diff --git a/src/ImGui.NET/NativeStyle.cs b/src/ImGui.NET/NativeStyle.cs index 63a85c6..73edffe 100644 --- a/src/ImGui.NET/NativeStyle.cs +++ b/src/ImGui.NET/NativeStyle.cs @@ -25,7 +25,7 @@ namespace ImGuiNET /// /// Alignment for title bar text. /// - public Align WindowTitleAlign; + public Vector2 WindowTitleAlign; /// /// Radius of child window corners rounding. Set to 0.0f to have rectangular windows. /// @@ -75,6 +75,10 @@ namespace ImGuiNET /// public float GrabRounding; /// + /// Alignment of button text when button is larger than text. Defaults to (0.5f,0.5f) for horizontally+vertically centered. + /// + public Vector2 ButtonTextAlign; + /// /// Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows. /// public Vector2 DisplayWindowPadding; diff --git a/src/ImGui.NET/Style.cs b/src/ImGui.NET/Style.cs index 142f6a2..16d3249 100644 --- a/src/ImGui.NET/Style.cs +++ b/src/ImGui.NET/Style.cs @@ -50,7 +50,7 @@ namespace ImGuiNET /// /// Alignment for title bar text. /// - public Align WindowTitleAlign + public Vector2 WindowTitleAlign { get { return _stylePtr->WindowTitleAlign; } set { _stylePtr->WindowTitleAlign = value; }