packages feed

keid-ui-dearimgui 0.1.0.1 → 0.1.1.0

raw patch · 3 files changed

+24/−20 lines, 3 filesdep ~dear-imguiPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: dear-imgui

API changes (from Hackage documentation)

+ Render.ImGui: allocateWithFonts :: (HasSwapchain swapchain, HasRenderPass renderpass, Traversable t) => swapchain -> renderpass -> Word32 -> t FontSource -> ResourceT (StageRIO st) (ReleaseKey, t Font)

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for keid-dearimgui +## 0.1.1.0++- Added `allocateWithFonts` from dear-imgui-1.3.0.+ ## 0.1.0.1  - Removed unused deps.
keid-ui-dearimgui.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           keid-ui-dearimgui-version:        0.1.0.1+version:        0.1.1.0 synopsis:       DearImGui elements for Keid engine. category:       Game Engine author:         IC Rainbow@@ -93,7 +93,7 @@     , base >=4.7 && <5     , binary     , bytestring-    , dear-imgui+    , dear-imgui >=1.3.0     , keid-core     , resourcet     , rio >=0.1.12.0
src/Render/ImGui.hs view
@@ -1,6 +1,7 @@ module Render.ImGui   ( allocate-  -- , allocateWithFonts++  , allocateWithFonts   , allocateWith    , beforeLoop@@ -19,6 +20,7 @@ import DearImGui.Vulkan (InitInfo(..)) import DearImGui.Vulkan qualified as ImGui import DearImGui qualified as ImGui+import DearImGui.FontAtlas qualified as FontAtlas import DearImGui.GLFW (glfwNewFrame, glfwShutdown) import DearImGui.GLFW.Vulkan (glfwInitForVulkan) import RIO.App (appEnv)@@ -44,23 +46,21 @@     allocateWith swapchain renderpass subpassIx $       pure () --- allocateWithFonts---   :: ( HasSwapchain swapchain---      , HasRenderPass renderpass---      , Traversable t---      )---   => swapchain---   -> renderpass---   -> Word32---   -> t (FilePath, Float)---   -> ResourceT (StageRIO st) (ReleaseKey, t (Maybe ImGui.Font))--- allocateWithFonts swapchain renderpass subpassIx fonts =---   allocateWith swapchain renderpass subpassIx do---     loaded <- for fonts \(path, size) ->---       ImGui.addFontFromFileTTF path size---     ImGui.buildFontAtlas---     _atlasKey <- register ImGui.clearFontAtlas---     pure loaded+allocateWithFonts+  :: ( HasSwapchain swapchain+     , HasRenderPass renderpass+     , Traversable t+     )+  => swapchain+  -> renderpass+  -> Word32+  -> t FontAtlas.FontSource+  -> ResourceT (StageRIO st) (ReleaseKey, t ImGui.Font)+allocateWithFonts swapchain renderpass subpassIx fonts =+  allocateWith swapchain renderpass subpassIx do+    loaded <- FontAtlas.rebuild fonts+    _atlasKey <- register FontAtlas.clear+    pure loaded  allocateWith   :: ( HasSwapchain swapchain