Skip to content

Commit 44f4c28

Browse files
committed
Fix examples for imageButton API update
1 parent 72b496f commit 44f4c28

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/sdl/Image.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ mainLoop window textures flag = unlessQuit do
152152
Foreign.with (ImVec2 1 1) \uv1Ptr ->
153153
Foreign.with (ImVec4 1 1 1 1) \tintColPtr ->
154154
Foreign.with (ImVec4 1 1 1 1) \bgColPtr ->
155-
Raw.imageButton openGLtextureID sizePtr uv0Ptr uv1Ptr (-1) bgColPtr tintColPtr
155+
Raw.imageButton nullPtr openGLtextureID sizePtr uv0Ptr uv1Ptr bgColPtr tintColPtr
156156
else
157157
pure False
158158

examples/vulkan/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ import qualified DearImGui.Vulkan as ImGui.Vulkan
8181
import qualified DearImGui.SDL as ImGui.SDL
8282
import qualified DearImGui.SDL.Vulkan as ImGui.SDL.Vulkan
8383
import Util (vmaVulkanFunctions)
84-
import Foreign (Ptr, castPtr, copyBytes, with, withForeignPtr, wordPtrToPtr)
84+
import Foreign (Ptr, castPtr, copyBytes, with, withForeignPtr, wordPtrToPtr, nullPtr)
8585
import qualified DearImGui.Raw as ImGui.Raw
8686
import UnliftIO (MonadUnliftIO)
8787
import qualified Vulkan.CStruct.Extends as Vulkan
@@ -111,11 +111,11 @@ gui texture = do
111111
with (ImGui.Raw.ImVec4 1 1 1 1) \tintColPtr ->
112112
with (ImGui.Raw.ImVec4 1 1 1 1) \bgColPtr ->
113113
ImGui.Raw.imageButton
114+
nullPtr
114115
(snd texture)
115116
sizePtr
116117
uv0Ptr
117118
uv1Ptr
118-
(-1)
119119
bgColPtr
120120
tintColPtr
121121

0 commit comments

Comments
 (0)