From cf1006e6b038c389d914930d743f24ad9596b48f Mon Sep 17 00:00:00 2001 From: dpethes Date: Fri, 20 Jan 2017 15:01:17 +0100 Subject: [PATCH] - revert igTextUnformatted signature - remove parameterless SameLine --- src/ImGui.NET/ImGui.cs | 12 +++++------- src/ImGui.NET/ImGuiNative.cs | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/ImGui.NET/ImGui.cs b/src/ImGui.NET/ImGui.cs index b8784e6..37230d6 100644 --- a/src/ImGui.NET/ImGui.cs +++ b/src/ImGui.NET/ImGui.cs @@ -93,9 +93,12 @@ namespace ImGuiNET ImGuiNative.igTextWrapped(text); } - public static void TextUnformatted(string message) + public static unsafe void TextUnformatted(string message) { - ImGuiNative.igTextUnformatted(message, null); + fixed (byte* bytes = System.Text.Encoding.UTF8.GetBytes(message)) + { + ImGuiNative.igTextUnformatted(bytes, null); + } } public static void LabelText(string label, string text) @@ -935,11 +938,6 @@ namespace ImGuiNET ImGuiNative.igOpenPopup(id); } - public static void SameLine() - { - ImGuiNative.igSameLine(0, 0); - } - public static void SameLine(float localPositionX = 0, float spacingW = -1.0f) { ImGuiNative.igSameLine(localPositionX, spacingW); diff --git a/src/ImGui.NET/ImGuiNative.cs b/src/ImGui.NET/ImGuiNative.cs index da22ad8..8f33416 100644 --- a/src/ImGui.NET/ImGuiNative.cs +++ b/src/ImGui.NET/ImGuiNative.cs @@ -272,7 +272,7 @@ namespace ImGuiNET public static extern void igTextWrapped(string fmt); [DllImport(cimguiLib)] - public static extern void igTextUnformatted(string text, string text_end); + public static extern void igTextUnformatted(byte* text, byte* text_end); [DllImport(cimguiLib)] public static extern void igLabelText(string label, string fmt);