Prepare 2.0.0 (#148)

This commit is contained in:
Alexander Bondarenko 2022-05-15 23:37:43 +03:00 committed by GitHub
parent 3c1d381c14
commit cf87988336
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -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