We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b25b5d5 commit ed3acd1Copy full SHA for ed3acd1
imgui-binding/src/main/java/imgui/ImGuiOnceUponAFrame.java
@@ -0,0 +1,23 @@
1
+package imgui;
2
+
3
+/**
4
+ * Helper: Execute a block of code at maximum once a frame.
5
+ * Convenient if you want to quickly create an UI within deep-nested code that runs multiple times every frame.
6
+ * Usage: static ImGuiOnceUponAFrame oaf; if (oaf) ImGui::Text("This will be called only once per frame");
7
+ * <p>
8
+ * BINDING NOTICE:
9
+ * Java example: if (ImGuiOnceUponAFrame.get()) ImGui.text("This will be called only once per frame");
10
+ */
11
+public final class ImGuiOnceUponAFrame {
12
+ private ImGuiOnceUponAFrame() {
13
+ }
14
15
+ /*JNI
16
+ #include <imgui.h>
17
18
19
+ public static native boolean get(); /*
20
+ ImGuiOnceUponAFrame oaf;
21
+ return (bool)oaf;
22
23
+}
0 commit comments