diff --git a/ChangeLog.md b/ChangeLog.md index 6efd5f7..61198a5 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,10 @@ # Changelog for dear-imgui +## [2.0.0] + +- `String` arguments replaced with `Text`. + * Upgrading to `text-2` recommended to reap the UTF-8 benefits. + ## [1.5.0] - Added table wrappers. @@ -76,6 +81,7 @@ Initial Hackage release based on [1.83]. [1.3.1]: https://github.com/haskell-game/dear-imgui.hs/tree/v1.3.1 [1.4.0]: https://github.com/haskell-game/dear-imgui.hs/tree/v1.4.0 [1.5.0]: https://github.com/haskell-game/dear-imgui.hs/tree/v1.5.0 +[2.0.0]: https://github.com/haskell-game/dear-imgui.hs/tree/v2.0.0 [1.87]: https://github.com/ocornut/imgui/releases/tag/v1.87 [1.86]: https://github.com/ocornut/imgui/releases/tag/v1.86 diff --git a/src/DearImGui/FontAtlas.hs b/src/DearImGui/FontAtlas.hs index 5f51f2e..029924c 100644 --- a/src/DearImGui/FontAtlas.hs +++ b/src/DearImGui/FontAtlas.hs @@ -119,6 +119,8 @@ import DearImGui.Raw.Font.Config (FontConfig(..)) import qualified DearImGui.Raw.Font.Config as FontConfig import DearImGui.Raw.Font.GlyphRanges (GlyphRanges(..), GlyphRangesBuilder(..)) import qualified DearImGui.Raw.Font.GlyphRanges as GlyphRanges +import DearImGui.Internal.Text (Text) +import qualified DearImGui.Internal.Text as Text import DearImGui.Structs (ImVec2(..), ImWchar) @@ -332,10 +334,10 @@ addChar char = GlyphRanges.addChar builder char -- | UTF-8 string -addText :: String -> RangesBuilderSetup +addText :: Text -> RangesBuilderSetup addText str = RangesBuilderSetup \builder -> - withCString str (GlyphRanges.addText builder) + Text.withCString str (GlyphRanges.addText builder) -- | Existing ranges (as is) addRangesRaw :: GlyphRanges -> RangesBuilderSetup