Skip to content

Commit

Permalink
Prepare 2.0.0 (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpwiz authored May 15, 2022
1 parent 3c1d381 commit cf87988
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions src/DearImGui/FontAtlas.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cf87988

Please sign in to comment.