mirror of
https://github.com/Drezil/dear-imgui.hs.git
synced 2024-11-22 00:47:00 +00:00
Add formatPtr to Raw.dragFloat* and Raw.sliderFloat* (#165)
This commit is contained in:
parent
d933248a2c
commit
52142bbf7e
@ -646,7 +646,7 @@ dragFloat desc ref speed minValue maxValue = liftIO do
|
||||
currentValue <- get ref
|
||||
with (realToFrac currentValue) \floatPtr -> do
|
||||
changed <- Text.withCString desc \descPtr ->
|
||||
Raw.dragFloat descPtr floatPtr (CFloat speed) (CFloat minValue) (CFloat maxValue)
|
||||
Raw.dragFloat descPtr floatPtr (CFloat speed) (CFloat minValue) (CFloat maxValue) nullPtr
|
||||
|
||||
when changed do
|
||||
newValue <- peek floatPtr
|
||||
@ -661,7 +661,7 @@ dragFloat2 desc ref speed minValue maxValue = liftIO do
|
||||
(x, y) <- get ref
|
||||
withArray [ realToFrac x, realToFrac y ] \floatPtr -> do
|
||||
changed <- Text.withCString desc \descPtr ->
|
||||
Raw.dragFloat2 descPtr floatPtr (CFloat speed) (CFloat minValue) (CFloat maxValue)
|
||||
Raw.dragFloat2 descPtr floatPtr (CFloat speed) (CFloat minValue) (CFloat maxValue) nullPtr
|
||||
|
||||
when changed do
|
||||
[x', y'] <- peekArray 2 floatPtr
|
||||
@ -675,7 +675,7 @@ dragFloat3 desc ref speed minValue maxValue = liftIO do
|
||||
(x, y, z) <- get ref
|
||||
withArray [ realToFrac x, realToFrac y, realToFrac z ] \floatPtr -> do
|
||||
changed <- Text.withCString desc \descPtr ->
|
||||
Raw.dragFloat3 descPtr floatPtr (CFloat speed) (CFloat minValue) (CFloat maxValue)
|
||||
Raw.dragFloat3 descPtr floatPtr (CFloat speed) (CFloat minValue) (CFloat maxValue) nullPtr
|
||||
|
||||
when changed do
|
||||
[x', y', z'] <- peekArray 3 floatPtr
|
||||
@ -690,7 +690,7 @@ dragFloat4 desc ref speed 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.dragFloat4 descPtr floatPtr (CFloat speed) (CFloat minValue) (CFloat maxValue)
|
||||
Raw.dragFloat4 descPtr floatPtr (CFloat speed) (CFloat minValue) (CFloat maxValue) nullPtr
|
||||
|
||||
when changed do
|
||||
[x', y', z', u'] <- peekArray 4 floatPtr
|
||||
@ -969,7 +969,7 @@ sliderFloat desc ref minValue maxValue = liftIO do
|
||||
currentValue <- get ref
|
||||
with (realToFrac currentValue) \floatPtr -> do
|
||||
changed <- Text.withCString desc \descPtr ->
|
||||
Raw.sliderFloat descPtr floatPtr (CFloat minValue) (CFloat maxValue)
|
||||
Raw.sliderFloat descPtr floatPtr (CFloat minValue) (CFloat maxValue) nullPtr
|
||||
|
||||
when changed do
|
||||
newValue <- peek floatPtr
|
||||
@ -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.sliderFloat2 descPtr floatPtr (CFloat minValue) (CFloat maxValue)
|
||||
Raw.sliderFloat2 descPtr floatPtr (CFloat minValue) (CFloat maxValue) nullPtr
|
||||
|
||||
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.sliderFloat3 descPtr floatPtr (CFloat minValue) (CFloat maxValue)
|
||||
Raw.sliderFloat3 descPtr floatPtr (CFloat minValue) (CFloat maxValue) nullPtr
|
||||
|
||||
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.sliderFloat4 descPtr floatPtr (CFloat minValue) (CFloat maxValue)
|
||||
Raw.sliderFloat4 descPtr floatPtr (CFloat minValue) (CFloat maxValue) nullPtr
|
||||
|
||||
when changed do
|
||||
[x', y', z', u'] <- peekArray 4 floatPtr
|
||||
|
@ -693,27 +693,27 @@ combo labelPtr iPtr itemsPtr itemsLen = liftIO do
|
||||
|
||||
|
||||
-- | Wraps @ImGui::DragFloat()@
|
||||
dragFloat :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> CFloat -> m Bool
|
||||
dragFloat descPtr floatPtr speed minValue maxValue = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { DragFloat( $(char* descPtr), $(float* floatPtr), $(float speed), $(float minValue), $(float maxValue)) } |]
|
||||
dragFloat :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> CFloat -> CString -> m Bool
|
||||
dragFloat descPtr floatPtr speed minValue maxValue formatPtr = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { DragFloat( $(char* descPtr), $(float* floatPtr), $(float speed), $(float minValue), $(float maxValue), $(char* formatPtr)) } |]
|
||||
|
||||
|
||||
-- | Wraps @ImGui::DragFloat2()@
|
||||
dragFloat2 :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> CFloat -> m Bool
|
||||
dragFloat2 descPtr floatPtr speed minValue maxValue = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { DragFloat2( $(char* descPtr), $(float* floatPtr), $(float speed), $(float minValue), $(float maxValue)) } |]
|
||||
dragFloat2 :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> CFloat -> CString -> m Bool
|
||||
dragFloat2 descPtr floatPtr speed minValue maxValue formatPtr = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { DragFloat2( $(char* descPtr), $(float* floatPtr), $(float speed), $(float minValue), $(float maxValue), $(char* formatPtr)) } |]
|
||||
|
||||
|
||||
-- | Wraps @ImGui::DragFloat3()@
|
||||
dragFloat3 :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> CFloat -> m Bool
|
||||
dragFloat3 descPtr floatPtr speed minValue maxValue = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { DragFloat3( $(char* descPtr), $(float* floatPtr), $(float speed), $(float minValue), $(float maxValue)) } |]
|
||||
dragFloat3 :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> CFloat -> CString -> m Bool
|
||||
dragFloat3 descPtr floatPtr speed minValue maxValue formatPtr = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { DragFloat3( $(char* descPtr), $(float* floatPtr), $(float speed), $(float minValue), $(float maxValue), $(char* formatPtr)) } |]
|
||||
|
||||
|
||||
-- | Wraps @ImGui::DragFloat4()@
|
||||
dragFloat4 :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> CFloat -> m Bool
|
||||
dragFloat4 descPtr floatPtr speed minValue maxValue = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { DragFloat4( $(char* descPtr), $(float* floatPtr), $(float speed), $(float minValue), $(float maxValue)) } |]
|
||||
dragFloat4 :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> CFloat -> CString -> m Bool
|
||||
dragFloat4 descPtr floatPtr speed minValue maxValue formatPtr = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { DragFloat4( $(char* descPtr), $(float* floatPtr), $(float speed), $(float minValue), $(float maxValue), $(char* formatPtr)) } |]
|
||||
|
||||
|
||||
-- | Wraps @ImGui::DragFloatRange2()@
|
||||
@ -853,27 +853,27 @@ dragScalarN labelPtr dataType dataPtr components vSpeed minPtr maxPtr formatPtr
|
||||
maxPtr_ = castPtr maxPtr
|
||||
|
||||
-- | Wraps @ImGui::SliderFloat()@
|
||||
sliderFloat :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> m Bool
|
||||
sliderFloat descPtr floatPtr minValue maxValue = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { SliderFloat( $(char* descPtr), $(float* floatPtr), $(float minValue), $(float maxValue)) } |]
|
||||
sliderFloat :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> CString -> m Bool
|
||||
sliderFloat descPtr floatPtr minValue maxValue formatPtr = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { SliderFloat( $(char* descPtr), $(float* floatPtr), $(float minValue), $(float maxValue), $(char* formatPtr)) } |]
|
||||
|
||||
|
||||
-- | Wraps @ImGui::SliderFloat2()@
|
||||
sliderFloat2 :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> m Bool
|
||||
sliderFloat2 descPtr floatPtr minValue maxValue = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { SliderFloat2( $(char* descPtr), $(float* floatPtr), $(float minValue), $(float maxValue)) } |]
|
||||
sliderFloat2 :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> CString -> m Bool
|
||||
sliderFloat2 descPtr floatPtr minValue maxValue formatPtr = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { SliderFloat2( $(char* descPtr), $(float* floatPtr), $(float minValue), $(float maxValue), $(char* formatPtr)) } |]
|
||||
|
||||
|
||||
-- | Wraps @ImGui::SliderFloat3()@
|
||||
sliderFloat3 :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> m Bool
|
||||
sliderFloat3 descPtr floatPtr minValue maxValue = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { SliderFloat3( $(char* descPtr), $(float* floatPtr), $(float minValue), $(float maxValue)) } |]
|
||||
sliderFloat3 :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> CString -> m Bool
|
||||
sliderFloat3 descPtr floatPtr minValue maxValue formatPtr = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { SliderFloat3( $(char* descPtr), $(float* floatPtr), $(float minValue), $(float maxValue), $(char* formatPtr)) } |]
|
||||
|
||||
|
||||
-- | Wraps @ImGui::SliderFloat4()@
|
||||
sliderFloat4 :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> m Bool
|
||||
sliderFloat4 descPtr floatPtr minValue maxValue = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { SliderFloat4( $(char* descPtr), $(float* floatPtr), $(float minValue), $(float maxValue)) } |]
|
||||
sliderFloat4 :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> CString -> m Bool
|
||||
sliderFloat4 descPtr floatPtr minValue maxValue formatPtr = liftIO do
|
||||
(0 /=) <$> [C.exp| bool { SliderFloat4( $(char* descPtr), $(float* floatPtr), $(float minValue), $(float maxValue), $(char* formatPtr)) } |]
|
||||
|
||||
-- | Wraps @ImGui::SliderAngle()@
|
||||
sliderAngle :: (MonadIO m) => CString -> Ptr CFloat -> CFloat -> CFloat -> CString -> ImGuiSliderFlags -> m Bool
|
||||
|
Loading…
Reference in New Issue
Block a user