Skip to content
This repository was archived by the owner on Dec 31, 2022. It is now read-only.

Commit 157b1d4

Browse files
authored
Merge pull request #159 from melaurent/master
feat: Push/PopAllowKeyboardFocus
2 parents 2c7a7b4 + 3e02997 commit 157b1d4

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

Window.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,16 @@ func PopTextWrapPos() {
330330
C.iggPopTextWrapPos()
331331
}
332332

333+
// PushAllowKeyboardFocus allow the next window to take focus of the keyboard.
334+
func PushAllowKeyboardFocus(allow bool) {
335+
C.iggPushAllowKeyboardFocus(castBool(allow))
336+
}
337+
338+
//PopAllowKeyboardFocus pops most recent allow keyboard focus setting.
339+
func PopAllowKeyboardFocus() {
340+
C.iggPopAllowKeyboardFocus()
341+
}
342+
333343
// PushButtonRepeat enables button to repeat press if held.
334344
func PushButtonRepeat(repeat bool) {
335345
C.iggPushButtonRepeat(castBool(repeat))

wrapper/Window.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,16 @@ void iggPopTextWrapPos(void)
166166
ImGui::PopTextWrapPos();
167167
}
168168

169+
void iggPushAllowKeyboardFocus(IggBool allow)
170+
{
171+
ImGui::PushAllowKeyboardFocus(allow);
172+
}
173+
174+
void iggPopAllowKeyboardFocus()
175+
{
176+
ImGui::PopAllowKeyboardFocus();
177+
}
178+
169179
void iggPushButtonRepeat(IggBool repeat)
170180
{
171181
ImGui::PushButtonRepeat(repeat);

wrapper/Window.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ extern void iggPopItemFlag(void);
4040
extern float iggCalcItemWidth(void);
4141
extern void iggPushTextWrapPos(float wrapPosX);
4242
extern void iggPopTextWrapPos(void);
43+
extern void iggPushAllowKeyboardFocus(IggBool allow);
44+
extern void iggPopAllowKeyboardFocus();
4345
extern void iggPushButtonRepeat(IggBool repeat);
4446
extern void iggPopButtonRepeat(void);
4547

0 commit comments

Comments
 (0)