Skip to content

Commit 34cba60

Browse files
committed
Add ImGui#checkbox which can take simple boolean
1 parent 194e4e8 commit 34cba60

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

imgui-binding/src/main/java/imgui/ImGui.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,11 @@ public static ImFont getFont() {
14341434
return ImGui::ImageButton((ImTextureID)(intptr_t)textureID, ImVec2(sizeX, sizeY), ImVec2(uv0X, uv0Y), ImVec2(uv1X, uv1Y), framePadding, ImVec4(bgColorR, bgColorG, bgColorB, bgColorA), ImVec4(tintR, tintG, tintB, tintA));
14351435
*/
14361436

1437+
public static native boolean checkbox(String label, boolean active); /*
1438+
bool flag = (bool)active;
1439+
return ImGui::Checkbox(label, &flag);
1440+
*/
1441+
14371442
public static boolean checkbox(String label, ImBool active) {
14381443
return nCheckbox(label, active.data);
14391444
}

0 commit comments

Comments
 (0)