-
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Knobs classes to generation flow
- Loading branch information
Showing
3 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
imgui-binding/src/generated/java/imgui/extension/imguiknobs/ImGuiKnobs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package imgui.extension.imguiknobs; | ||
|
||
import imgui.type.ImFloat; | ||
import imgui.type.ImInt; | ||
|
||
/** | ||
* ImGuiKnobs extension for ImGui | ||
* Repo: https://github.com/altschuler/imgui-knobs | ||
*/ | ||
public final class ImGuiKnobs { | ||
|
||
private ImGuiKnobs() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
/*JNI | ||
#include "_imguiknobs.h" | ||
*/ | ||
|
||
/** | ||
* Create a knob with float values | ||
* | ||
* @param label knob Label | ||
* @param pValue knob value | ||
* @param minValue minimum value | ||
* @param maxValue maximum value | ||
* @param speed speed of the knob | ||
* @param format string format | ||
* @param variant ImGuiKnobVariant | ||
* @param size size of the knob | ||
* @param flags ImGuiKnobFlags | ||
* @param steps determines the number of steps draw, it is only used for the ImGuiKnobVariant_Stepped variant. | ||
*/ | ||
|
||
public static boolean knobFloat(final String label, final ImFloat pValue, final float minValue, final float maxValue, final float speed, final String format, final int variant, final float size, final int flags, final int steps) { | ||
return nKnob(label, pValue.getData(), minValue, maxValue, speed, format, variant, size, flags, steps); | ||
} | ||
|
||
private static native boolean nKnob(String label, float[] pValue, float minValue, float maxValue, float speed, String format, int variant, float size, int flags, int steps); /* | ||
return ImGuiKnobs::Knob(label, pValue, minValue, maxValue, speed, format, (ImGuiKnobVariant)variant, size, (ImGuiKnobFlags)flags, steps); | ||
*/ | ||
|
||
/** | ||
* Create a knob with int values | ||
* | ||
* @param label knob Label | ||
* @param pValue knob value | ||
* @param minValue minimum value | ||
* @param maxValue maximum value | ||
* @param speed speed of the knob | ||
* @param format string format | ||
* @param variant ImGuiKnobVariant | ||
* @param size Size for the knob | ||
* @param flags ImGuiKnobFlags | ||
* @param steps determines the number of steps draw, it is only used for the ImGuiKnobVariant_Stepped variant. | ||
*/ | ||
|
||
public static boolean knobInt(final String label, final ImInt pValue, final int minValue, final int maxValue, final float speed, final String format, final int variant, final float size, final int flags, final int steps) { | ||
return nKnobInt(label, pValue.getData(), minValue, maxValue, speed, format, variant, size, flags, steps); | ||
} | ||
|
||
private static native boolean nKnobInt(String label, int[] pValue, int minValue, int maxValue, float speed, String format, int variant, float size, int flags, int steps); /* | ||
return ImGuiKnobs::KnobInt(label, pValue, minValue, maxValue, speed, format, (ImGuiKnobVariant)variant, size, (ImGuiKnobFlags)flags, steps); | ||
*/ | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
imgui-binding/src/generated/java/imgui/extension/imguiknobs/flag/ImGuiKnobFlags.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package imgui.extension.imguiknobs.flag; | ||
|
||
public final class ImGuiKnobFlags { | ||
|
||
private ImGuiKnobFlags() { | ||
} | ||
|
||
public static final int NONE = 0; | ||
public static final int NO_TITLE = 1; | ||
public static final int NO_INPUT = 1 << 1; | ||
public static final int VALUE_TOOLTIP = 1 << 2; | ||
public static final int DRAG_HORIZONTAL = 1 << 3; | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
imgui-binding/src/generated/java/imgui/extension/imguiknobs/flag/ImGuiKnobVariant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package imgui.extension.imguiknobs.flag; | ||
|
||
public final class ImGuiKnobVariant { | ||
private ImGuiKnobVariant() { | ||
} | ||
public static final int TICK = 1; | ||
public static final int DOT = 1 << 1; | ||
public static final int WIPER = 1 << 2; | ||
public static final int WIPER_ONLY = 1 << 3; | ||
public static final int WIPER_DOT = 1 << 4; | ||
public static final int STEPPED = 1 << 5; | ||
public static final int SPACE = 1 << 6; | ||
|
||
} |