Skip to content

Commit 9415fc3

Browse files
committed
SetNextFrameWantCaptureKeyboard function added
1 parent f685ee8 commit 9415fc3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/gui.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3449,10 +3449,14 @@ pub fn isKeyPressed(key: Key, repeat: bool) bool {
34493449
pub fn isKeyReleased(key: Key) bool {
34503450
return zguiIsKeyReleased(key);
34513451
}
3452+
pub fn setNextFrameWantCaptureKeyboard(want_capture_keyboard: bool) void {
3453+
zguiSetNextFrameWantCaptureKeyboard(want_capture_keyboard);
3454+
}
34523455

34533456
extern fn zguiIsKeyDown(key: Key) bool;
34543457
extern fn zguiIsKeyPressed(key: Key, repeat: bool) bool;
34553458
extern fn zguiIsKeyReleased(key: Key) bool;
3459+
extern fn zguiSetNextFrameWantCaptureKeyboard(want_capture_keyboard: bool) void;
34563460
//--------------------------------------------------------------------------------------------------
34573461
//
34583462
// Helpers

src/zgui.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,6 +2001,10 @@ extern "C"
20012001
{
20022002
return ImGui::IsKeyReleased(key);
20032003
}
2004+
ZGUI_API void zguiSetNextFrameWantCaptureKeyboard(bool want_capture_keyboard)
2005+
{
2006+
ImGui::SetNextFrameWantCaptureKeyboard(want_capture_keyboard);
2007+
}
20042008
//--------------------------------------------------------------------------------------------------
20052009
//
20062010
// DrawList

0 commit comments

Comments
 (0)