File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 11# Changelog for dear-imgui
22
3+ ## UNRELEASED
4+
5+ - Added ` inputPassword ` wrapper for text input, which sets the flag.
6+
37## [ 2.4.1]
48
59- Fixed builds on GHC-9.10+.
Original file line number Diff line number Diff line change @@ -221,6 +221,7 @@ module DearImGui
221221 , inputText
222222 , inputTextMultiline
223223 , inputTextWithHint
224+ , inputPassword
224225 , inputFloat
225226 , inputFloat2
226227 , inputFloat3
@@ -1463,6 +1464,16 @@ inputTextWithHint label hint ref bufSize =
14631464 ImGuiInputTextFlags_None
14641465
14651466
1467+ -- | Wraps @ImGui::InputText()@ and sets a `ImGuiInputTextFlags_Password` flag.
1468+ inputPassword :: (MonadIO m , HasSetter ref Text , HasGetter ref Text ) => Text -> ref -> Int -> m Bool
1469+ inputPassword label ref bufSize =
1470+ withInputString ref bufSize \ bufPtrLen ->
1471+ Text. withCString label \ labelPtr ->
1472+ Raw. inputText
1473+ labelPtr
1474+ bufPtrLen
1475+ ImGuiInputTextFlags_Password
1476+
14661477-- | Internal helper to prepare appropriately sized and encoded input buffer.
14671478withInputString
14681479 :: (MonadIO m , HasSetter ref Text , HasGetter ref Text )
You can’t perform that action at this time.
0 commit comments