From d933248a2ce1f6d1e8e40e10c79cafe923b7774b Mon Sep 17 00:00:00 2001 From: Tristan de Cacqueray Date: Fri, 2 Dec 2022 15:50:04 +0000 Subject: [PATCH] This change fixes the high level API to use the right Raw call (#164) --- src/DearImGui.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DearImGui.hs b/src/DearImGui.hs index 3f3e8d3..d54e069 100644 --- a/src/DearImGui.hs +++ b/src/DearImGui.hs @@ -983,7 +983,7 @@ sliderFloat2 desc ref minValue maxValue = liftIO do (x, y) <- get ref withArray [ realToFrac x, realToFrac y ] \floatPtr -> do changed <- Text.withCString desc \descPtr -> - Raw.sliderFloat descPtr floatPtr (CFloat minValue) (CFloat maxValue) + Raw.sliderFloat2 descPtr floatPtr (CFloat minValue) (CFloat maxValue) when changed do [x', y'] <- peekArray 2 floatPtr @@ -997,7 +997,7 @@ sliderFloat3 desc ref minValue maxValue = liftIO do (x, y, z) <- get ref withArray [ realToFrac x, realToFrac y, realToFrac z ] \floatPtr -> do changed <- Text.withCString desc \descPtr -> - Raw.sliderFloat descPtr floatPtr (CFloat minValue) (CFloat maxValue) + Raw.sliderFloat3 descPtr floatPtr (CFloat minValue) (CFloat maxValue) when changed do [x', y', z'] <- peekArray 3 floatPtr @@ -1011,7 +1011,7 @@ sliderFloat4 desc ref minValue maxValue = liftIO do (x, y, z, u) <- get ref withArray [ realToFrac x, realToFrac y, realToFrac z, realToFrac u ] \floatPtr -> do changed <- Text.withCString desc \descPtr -> - Raw.sliderFloat descPtr floatPtr (CFloat minValue) (CFloat maxValue) + Raw.sliderFloat4 descPtr floatPtr (CFloat minValue) (CFloat maxValue) when changed do [x', y', z', u'] <- peekArray 4 floatPtr