Skip to content

Commit cf87988

Browse files
authored
Prepare 2.0.0 (#148)
1 parent 3c1d381 commit cf87988

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

ChangeLog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog for dear-imgui
22

3+
## [2.0.0]
4+
5+
- `String` arguments replaced with `Text`.
6+
* Upgrading to `text-2` recommended to reap the UTF-8 benefits.
7+
38
## [1.5.0]
49

510
- Added table wrappers.
@@ -76,6 +81,7 @@ Initial Hackage release based on [1.83].
7681
[1.3.1]: https://github.com/haskell-game/dear-imgui.hs/tree/v1.3.1
7782
[1.4.0]: https://github.com/haskell-game/dear-imgui.hs/tree/v1.4.0
7883
[1.5.0]: https://github.com/haskell-game/dear-imgui.hs/tree/v1.5.0
84+
[2.0.0]: https://github.com/haskell-game/dear-imgui.hs/tree/v2.0.0
7985

8086
[1.87]: https://github.com/ocornut/imgui/releases/tag/v1.87
8187
[1.86]: https://github.com/ocornut/imgui/releases/tag/v1.86

src/DearImGui/FontAtlas.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ import DearImGui.Raw.Font.Config (FontConfig(..))
119119
import qualified DearImGui.Raw.Font.Config as FontConfig
120120
import DearImGui.Raw.Font.GlyphRanges (GlyphRanges(..), GlyphRangesBuilder(..))
121121
import qualified DearImGui.Raw.Font.GlyphRanges as GlyphRanges
122+
import DearImGui.Internal.Text (Text)
123+
import qualified DearImGui.Internal.Text as Text
122124

123125
import DearImGui.Structs (ImVec2(..), ImWchar)
124126

@@ -332,10 +334,10 @@ addChar char =
332334
GlyphRanges.addChar builder char
333335

334336
-- | UTF-8 string
335-
addText :: String -> RangesBuilderSetup
337+
addText :: Text -> RangesBuilderSetup
336338
addText str =
337339
RangesBuilderSetup \builder ->
338-
withCString str (GlyphRanges.addText builder)
340+
Text.withCString str (GlyphRanges.addText builder)
339341

340342
-- | Existing ranges (as is)
341343
addRangesRaw :: GlyphRanges -> RangesBuilderSetup

0 commit comments

Comments
 (0)