diff --git a/buildSrc/src/main/kotlin/tool/generator/api/jni_content.kt b/buildSrc/src/main/kotlin/tool/generator/api/jni_content.kt index 975838cd..4c84538d 100644 --- a/buildSrc/src/main/kotlin/tool/generator/api/jni_content.kt +++ b/buildSrc/src/main/kotlin/tool/generator/api/jni_content.kt @@ -113,6 +113,7 @@ private fun convertParams2jni(f: Factory, params: List>, defaults } else if (p.type.isClass) { when (p.type.simpleName) { "ImBoolean" -> f.createTypeParam("boolean[]") + "ImShort" -> f.createTypeParam("short[]") "ImInt" -> f.createTypeParam("int[]") "ImFloat" -> f.createTypeParam("float[]") "ImLong" -> f.createTypeParam("long[]") @@ -139,7 +140,7 @@ private fun joinInBodyParams(params: List>, defaults: IntArray): "&${p.simpleName}[0]" } else if (p.type.isClass) { when (p.type.simpleName) { - "ImBoolean", "ImInt", "ImFloat", "ImLong", "ImDouble" -> { + "ImBoolean", "ImShort", "ImInt", "ImFloat", "ImLong", "ImDouble" -> { "(${p.simpleName} != NULL ? &${p.simpleName}[0] : NULL)" } diff --git a/buildSrc/src/main/kotlin/tool/generator/api/jvm_content.kt b/buildSrc/src/main/kotlin/tool/generator/api/jvm_content.kt index 4546a06f..5b037fdf 100644 --- a/buildSrc/src/main/kotlin/tool/generator/api/jvm_content.kt +++ b/buildSrc/src/main/kotlin/tool/generator/api/jvm_content.kt @@ -163,13 +163,13 @@ private fun createMethod(origM: CtMethod<*>, params: List>, defau return newM } -private fun methodVecUnwrappedContent(method: CtMethod<*>): String { +private fun methodVecUnwrappedContent(method: CtMethod<*>, fromIndex: Int): String { val newMethod = method.clone() val newParams = mutableListOf>() val vecParamNames = mutableSetOf() - for (p in newMethod.parameters) { - if (p.isType("ImVec2") || p.isType("ImVec4")) { + for ((idx, p) in newMethod.parameters.withIndex()) { + if ((p.isType("ImVec2") || p.isType("ImVec4")) && idx >= fromIndex) { vecParamNames += p.simpleName val paramX = p.factory.createParameter() @@ -194,9 +194,9 @@ private fun methodVecUnwrappedContent(method: CtMethod<*>): String { } getJDoc(newMethod)?.let { jDoc -> - val idx = jDoc.tags.indexOfFirst { it.param == p.simpleName } - if (idx != -1) { - jDoc.removeTag(idx) + val tagIdx = jDoc.tags.indexOfFirst { it.param == p.simpleName } + if (tagIdx != -1) { + jDoc.removeTag(tagIdx) } } } else { @@ -223,13 +223,13 @@ private fun methodVecUnwrappedContent(method: CtMethod<*>): String { return "" } -private fun methodRectUnwrappedContent(method: CtMethod<*>): String { +private fun methodRectUnwrappedContent(method: CtMethod<*>, fromIndex: Int): String { val newMethod = method.clone() val newParams = mutableListOf>() val paramNames = mutableSetOf() - for (p in newMethod.parameters) { - if (p.isType("ImRect")) { + for ((idx, p) in newMethod.parameters.withIndex()) { + if (p.isType("ImRect") && idx >= fromIndex) { paramNames += p.simpleName val paramMinX = p.factory.createParameter() @@ -276,13 +276,13 @@ private fun methodRectUnwrappedContent(method: CtMethod<*>): String { return "" } -private fun methodPlotPointUnwrappedContent(method: CtMethod<*>): String { +private fun methodPlotPointUnwrappedContent(method: CtMethod<*>, fromIndex: Int): String { val newMethod = method.clone() val newParams = mutableListOf>() val paramNames = mutableSetOf() - for (p in newMethod.parameters) { - if (p.isType("ImPlotPoint")) { + for ((idx, p) in newMethod.parameters.withIndex()) { + if (p.isType("ImPlotPoint") && idx >= fromIndex) { paramNames += p.simpleName val paramX = p.factory.createParameter() @@ -318,13 +318,13 @@ private fun methodPlotPointUnwrappedContent(method: CtMethod<*>): String { return "" } -private fun methodPlotRangeUnwrappedContent(method: CtMethod<*>): String { +private fun methodPlotRangeUnwrappedContent(method: CtMethod<*>, fromIndex: Int): String { val newMethod = method.clone() val newParams = mutableListOf>() val paramNames = mutableSetOf() - for (p in newMethod.parameters) { - if (p.isType("ImPlotRange")) { + for ((idx, p) in newMethod.parameters.withIndex()) { + if (p.isType("ImPlotRange") && idx >= fromIndex) { paramNames += p.simpleName val paramX = p.factory.createParameter() @@ -360,13 +360,13 @@ private fun methodPlotRangeUnwrappedContent(method: CtMethod<*>): String { return "" } -private fun methodPlotLimitsUnwrappedContent(method: CtMethod<*>): String { +private fun methodPlotLimitsUnwrappedContent(method: CtMethod<*>, fromIndex: Int): String { val newMethod = method.clone() val newParams = mutableListOf>() val paramNames = mutableSetOf() - for (p in newMethod.parameters) { - if (p.isType("ImPlotRect")) { + for ((idx, p) in newMethod.parameters.withIndex()) { + if (p.isType("ImPlotRect") && idx >= fromIndex) { paramNames += p.simpleName val paramMinX = p.factory.createParameter() @@ -413,13 +413,13 @@ private fun methodPlotLimitsUnwrappedContent(method: CtMethod<*>): String { return "" } -private fun methodCoordinatesUnwrappedContent(method: CtMethod<*>): String { +private fun methodCoordinatesUnwrappedContent(method: CtMethod<*>, fromIndex: Int): String { val newMethod = method.clone() val newParams = mutableListOf>() val paramNames = mutableSetOf() - for (p in newMethod.parameters) { - if (p.isType("TextEditorCoordinates")) { + for ((idx, p) in newMethod.parameters.withIndex()) { + if (p.isType("TextEditorCoordinates") && idx >= fromIndex) { paramNames += p.simpleName val paramX = p.factory.createParameter() @@ -506,34 +506,34 @@ private fun transformMethodToContent( params: List> = emptyList(), defaults: IntArray = intArrayOf() ): List { + fun methodUnwrapped(method: CtMethod<*>, fromIndex: Int = 0): Set { + val result = mutableSetOf() + if (params.find { it.isType("ImVec2") || it.isType("ImVec4") } != null) { + methodVecUnwrappedContent(method, fromIndex).takeIf(String::isNotEmpty)?.run(result::add) + } + if (params.find { it.isType("ImRect") } != null) { + methodRectUnwrappedContent(method, fromIndex).takeIf(String::isNotEmpty)?.run(result::add) + } + if (params.find { it.isType("ImPlotPoint") } != null) { + methodPlotPointUnwrappedContent(method, fromIndex).takeIf(String::isNotEmpty)?.run(result::add) + } + if (params.find { it.isType("ImPlotRange") } != null) { + methodPlotRangeUnwrappedContent(method, fromIndex).takeIf(String::isNotEmpty)?.run(result::add) + } + if (params.find { it.isType("ImPlotRect") } != null) { + methodPlotLimitsUnwrappedContent(method, fromIndex).takeIf(String::isNotEmpty)?.run(result::add) + } + if (params.find { it.isType("TextEditorCoordinates") } != null) { + methodCoordinatesUnwrappedContent(method, fromIndex).takeIf(String::isNotEmpty)?.run(result::add) + } + return result + } + val methods = mutableListOf() val mNew = createMethod(mOrig, params, defaults) methods += mNew.prettyprint() - - if (params.find { it.isType("ImVec2") || it.isType("ImVec4") } != null) { - methodVecUnwrappedContent(mNew).takeIf(String::isNotEmpty)?.run(methods::add) - } - - if (params.find { it.isType("ImRect") } != null) { - methodRectUnwrappedContent(mNew).takeIf(String::isNotEmpty)?.run(methods::add) - } - - if (params.find { it.isType("ImPlotPoint") } != null) { - methodPlotPointUnwrappedContent(mNew).takeIf(String::isNotEmpty)?.run(methods::add) - } - - if (params.find { it.isType("ImPlotRange") } != null) { - methodPlotRangeUnwrappedContent(mNew).takeIf(String::isNotEmpty)?.run(methods::add) - } - - if (params.find { it.isType("ImPlotRect") } != null) { - methodPlotLimitsUnwrappedContent(mNew).takeIf(String::isNotEmpty)?.run(methods::add) - } - - if (params.find { it.isType("TextEditorCoordinates") } != null) { - methodCoordinatesUnwrappedContent(mNew).takeIf(String::isNotEmpty)?.run(methods::add) - } + methods += methodUnwrapped(mNew) if (mOrig.isType("ImVec2") || mOrig.isType("ImVec4")) { methods += createMethodVecValueReturn("x", mNew, params, defaults).prettyprint() @@ -545,7 +545,9 @@ private fun transformMethodToContent( } if (DST_RETURN_TYPE_SET.contains(mOrig.type.simpleName)) { - methods += createMethodDstReturn(mNew, params, defaults).prettyprint() + val dstMethod = createMethodDstReturn(mNew, params, defaults) + methods += dstMethod.prettyprint() + methods += methodUnwrapped(dstMethod, 1) } return methods diff --git a/imgui-binding/src/generated/java/imgui/ImGui.java b/imgui-binding/src/generated/java/imgui/ImGui.java index e1681077..13adffc0 100644 --- a/imgui-binding/src/generated/java/imgui/ImGui.java +++ b/imgui-binding/src/generated/java/imgui/ImGui.java @@ -9,6 +9,8 @@ import imgui.type.ImDouble; import imgui.type.ImFloat; import imgui.type.ImInt; +import imgui.type.ImLong; +import imgui.type.ImShort; import imgui.type.ImString; import java.io.IOException; @@ -3073,150 +3075,157 @@ public static void image(final int userTextureId, final float sizeX, final float /** * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ - public static void imageButton(final int userTextureId, final ImVec2 size) { - nImageButton(userTextureId, size.x, size.y); + public static boolean imageButton(final int userTextureId, final ImVec2 size) { + return nImageButton(userTextureId, size.x, size.y); } /** * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ - public static void imageButton(final int userTextureId, final float sizeX, final float sizeY) { - nImageButton(userTextureId, sizeX, sizeY); + public static boolean imageButton(final int userTextureId, final float sizeX, final float sizeY) { + return nImageButton(userTextureId, sizeX, sizeY); } /** * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ - public static void imageButton(final int userTextureId, final ImVec2 size, final ImVec2 uv0) { - nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y); + public static boolean imageButton(final int userTextureId, final ImVec2 size, final ImVec2 uv0) { + return nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y); } /** * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ - public static void imageButton(final int userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y) { - nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y); + public static boolean imageButton(final int userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y) { + return nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y); } /** * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ - public static void imageButton(final int userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1) { - nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y); + public static boolean imageButton(final int userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1) { + return nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y); } /** * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ - public static void imageButton(final int userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y) { - nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y); + public static boolean imageButton(final int userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y) { + return nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y); } /** * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ - public static void imageButton(final int userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final int framePadding) { - nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, framePadding); + public static boolean imageButton(final int userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final int framePadding) { + return nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, framePadding); } /** * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ - public static void imageButton(final int userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final int framePadding) { - nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, framePadding); + public static boolean imageButton(final int userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final int framePadding) { + return nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, framePadding); } /** * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ - public static void imageButton(final int userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final int framePadding, final ImVec4 bgCol) { - nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, framePadding, bgCol.x, bgCol.y, bgCol.z, bgCol.w); + public static boolean imageButton(final int userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final int framePadding, final ImVec4 bgCol) { + return nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, framePadding, bgCol.x, bgCol.y, bgCol.z, bgCol.w); } /** * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ - public static void imageButton(final int userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final int framePadding, final float bgColX, final float bgColY, final float bgColZ, final float bgColW) { - nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, framePadding, bgColX, bgColY, bgColZ, bgColW); + public static boolean imageButton(final int userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final int framePadding, final float bgColX, final float bgColY, final float bgColZ, final float bgColW) { + return nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, framePadding, bgColX, bgColY, bgColZ, bgColW); } /** * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ - public static void imageButton(final int userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final int framePadding, final ImVec4 bgCol, final ImVec4 tintCol) { - nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, framePadding, bgCol.x, bgCol.y, bgCol.z, bgCol.w, tintCol.x, tintCol.y, tintCol.z, tintCol.w); + public static boolean imageButton(final int userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final int framePadding, final ImVec4 bgCol, final ImVec4 tintCol) { + return nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, framePadding, bgCol.x, bgCol.y, bgCol.z, bgCol.w, tintCol.x, tintCol.y, tintCol.z, tintCol.w); } /** * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ - public static void imageButton(final int userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final int framePadding, final float bgColX, final float bgColY, final float bgColZ, final float bgColW, final float tintColX, final float tintColY, final float tintColZ, final float tintColW) { - nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, framePadding, bgColX, bgColY, bgColZ, bgColW, tintColX, tintColY, tintColZ, tintColW); + public static boolean imageButton(final int userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final int framePadding, final float bgColX, final float bgColY, final float bgColZ, final float bgColW, final float tintColX, final float tintColY, final float tintColZ, final float tintColW) { + return nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, framePadding, bgColX, bgColY, bgColZ, bgColW, tintColX, tintColY, tintColZ, tintColW); } /** * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ - public static void imageButton(final int userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final ImVec4 bgCol, final ImVec4 tintCol) { - nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, bgCol.x, bgCol.y, bgCol.z, bgCol.w, tintCol.x, tintCol.y, tintCol.z, tintCol.w); + public static boolean imageButton(final int userTextureId, final ImVec2 size, final ImVec2 uv0, final ImVec2 uv1, final ImVec4 bgCol, final ImVec4 tintCol) { + return nImageButton(userTextureId, size.x, size.y, uv0.x, uv0.y, uv1.x, uv1.y, bgCol.x, bgCol.y, bgCol.z, bgCol.w, tintCol.x, tintCol.y, tintCol.z, tintCol.w); } /** * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ - public static void imageButton(final int userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final float bgColX, final float bgColY, final float bgColZ, final float bgColW, final float tintColX, final float tintColY, final float tintColZ, final float tintColW) { - nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, bgColX, bgColY, bgColZ, bgColW, tintColX, tintColY, tintColZ, tintColW); + public static boolean imageButton(final int userTextureId, final float sizeX, final float sizeY, final float uv0X, final float uv0Y, final float uv1X, final float uv1Y, final float bgColX, final float bgColY, final float bgColZ, final float bgColW, final float tintColX, final float tintColY, final float tintColZ, final float tintColW) { + return nImageButton(userTextureId, sizeX, sizeY, uv0X, uv0Y, uv1X, uv1Y, bgColX, bgColY, bgColZ, bgColW, tintColX, tintColY, tintColZ, tintColW); } - private static native void nImageButton(int userTextureId, float sizeX, float sizeY); /*MANUAL + private static native boolean nImageButton(int userTextureId, float sizeX, float sizeY); /*MANUAL ImVec2 size = ImVec2(sizeX, sizeY); - ImGui::ImageButton((ImTextureID)(intptr_t)userTextureId, size); + auto _result = ImGui::ImageButton((ImTextureID)(intptr_t)userTextureId, size); + return _result; */ - private static native void nImageButton(int userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y); /*MANUAL + private static native boolean nImageButton(int userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y); /*MANUAL ImVec2 size = ImVec2(sizeX, sizeY); ImVec2 uv0 = ImVec2(uv0X, uv0Y); - ImGui::ImageButton((ImTextureID)(intptr_t)userTextureId, size, uv0); + auto _result = ImGui::ImageButton((ImTextureID)(intptr_t)userTextureId, size, uv0); + return _result; */ - private static native void nImageButton(int userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y); /*MANUAL + private static native boolean nImageButton(int userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y); /*MANUAL ImVec2 size = ImVec2(sizeX, sizeY); ImVec2 uv0 = ImVec2(uv0X, uv0Y); ImVec2 uv1 = ImVec2(uv1X, uv1Y); - ImGui::ImageButton((ImTextureID)(intptr_t)userTextureId, size, uv0, uv1); + auto _result = ImGui::ImageButton((ImTextureID)(intptr_t)userTextureId, size, uv0, uv1); + return _result; */ - private static native void nImageButton(int userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, int framePadding); /*MANUAL + private static native boolean nImageButton(int userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, int framePadding); /*MANUAL ImVec2 size = ImVec2(sizeX, sizeY); ImVec2 uv0 = ImVec2(uv0X, uv0Y); ImVec2 uv1 = ImVec2(uv1X, uv1Y); - ImGui::ImageButton((ImTextureID)(intptr_t)userTextureId, size, uv0, uv1, framePadding); + auto _result = ImGui::ImageButton((ImTextureID)(intptr_t)userTextureId, size, uv0, uv1, framePadding); + return _result; */ - private static native void nImageButton(int userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, int framePadding, float bgColX, float bgColY, float bgColZ, float bgColW); /*MANUAL + private static native boolean nImageButton(int userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, int framePadding, float bgColX, float bgColY, float bgColZ, float bgColW); /*MANUAL ImVec2 size = ImVec2(sizeX, sizeY); ImVec2 uv0 = ImVec2(uv0X, uv0Y); ImVec2 uv1 = ImVec2(uv1X, uv1Y); ImVec4 bgCol = ImVec4(bgColX, bgColY, bgColZ, bgColW); - ImGui::ImageButton((ImTextureID)(intptr_t)userTextureId, size, uv0, uv1, framePadding, bgCol); + auto _result = ImGui::ImageButton((ImTextureID)(intptr_t)userTextureId, size, uv0, uv1, framePadding, bgCol); + return _result; */ - private static native void nImageButton(int userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, int framePadding, float bgColX, float bgColY, float bgColZ, float bgColW, float tintColX, float tintColY, float tintColZ, float tintColW); /*MANUAL + private static native boolean nImageButton(int userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, int framePadding, float bgColX, float bgColY, float bgColZ, float bgColW, float tintColX, float tintColY, float tintColZ, float tintColW); /*MANUAL ImVec2 size = ImVec2(sizeX, sizeY); ImVec2 uv0 = ImVec2(uv0X, uv0Y); ImVec2 uv1 = ImVec2(uv1X, uv1Y); ImVec4 bgCol = ImVec4(bgColX, bgColY, bgColZ, bgColW); ImVec4 tintCol = ImVec4(tintColX, tintColY, tintColZ, tintColW); - ImGui::ImageButton((ImTextureID)(intptr_t)userTextureId, size, uv0, uv1, framePadding, bgCol, tintCol); + auto _result = ImGui::ImageButton((ImTextureID)(intptr_t)userTextureId, size, uv0, uv1, framePadding, bgCol, tintCol); + return _result; */ - private static native void nImageButton(int userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, float bgColX, float bgColY, float bgColZ, float bgColW, float tintColX, float tintColY, float tintColZ, float tintColW); /*MANUAL + private static native boolean nImageButton(int userTextureId, float sizeX, float sizeY, float uv0X, float uv0Y, float uv1X, float uv1Y, float bgColX, float bgColY, float bgColZ, float bgColW, float tintColX, float tintColY, float tintColZ, float tintColW); /*MANUAL ImVec2 size = ImVec2(sizeX, sizeY); ImVec2 uv0 = ImVec2(uv0X, uv0Y); ImVec2 uv1 = ImVec2(uv1X, uv1Y); ImVec4 bgCol = ImVec4(bgColX, bgColY, bgColZ, bgColW); ImVec4 tintCol = ImVec4(tintColX, tintColY, tintColZ, tintColW); - ImGui::ImageButton((ImTextureID)(intptr_t)userTextureId, size, uv0, uv1, -1, bgCol, tintCol); + auto _result = ImGui::ImageButton((ImTextureID)(intptr_t)userTextureId, size, uv0, uv1, -1, bgCol, tintCol); + return _result; */ public static boolean checkbox(String label, boolean active) { @@ -7390,30 +7399,30 @@ public static boolean inputDouble(final String label, final ImDouble v, final do return _result; */ - public static boolean inputScalar(final String label, final short[] pData) { - return nInputScalar(label, pData); + public static boolean inputScalar(final String label, final ImShort pData) { + return nInputScalar(label, pData != null ? pData.getData() : null); } - public static boolean inputScalar(final String label, final short[] pData, final short pStep) { - return nInputScalar(label, pData, pStep); + public static boolean inputScalar(final String label, final ImShort pData, final short pStep) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep); } - public static boolean inputScalar(final String label, final short[] pData, final short pStep, final short pStepFast) { - return nInputScalar(label, pData, pStep, pStepFast); + public static boolean inputScalar(final String label, final ImShort pData, final short pStep, final short pStepFast) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast); } - public static boolean inputScalar(final String label, final short[] pData, final short pStep, final short pStepFast, final String format) { - return nInputScalar(label, pData, pStep, pStepFast, format); + public static boolean inputScalar(final String label, final ImShort pData, final short pStep, final short pStepFast, final String format) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast, format); } - public static boolean inputScalar(final String label, final short[] pData, final short pStep, final short pStepFast, final String format, final int imGuiSliderFlags) { - return nInputScalar(label, pData, pStep, pStepFast, format, imGuiSliderFlags); + public static boolean inputScalar(final String label, final ImShort pData, final short pStep, final short pStepFast, final String format, final int imGuiSliderFlags) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast, format, imGuiSliderFlags); } private static native boolean nInputScalar(String obj_label, short[] obj_pData); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (short*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S16, &pData[0]); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S16, (pData != NULL ? &pData[0] : NULL)); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7422,7 +7431,7 @@ public static boolean inputScalar(final String label, final short[] pData, final private static native boolean nInputScalar(String obj_label, short[] obj_pData, short pStep); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (short*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S16, &pData[0], &pStep); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S16, (pData != NULL ? &pData[0] : NULL), &pStep); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7431,7 +7440,7 @@ public static boolean inputScalar(final String label, final short[] pData, final private static native boolean nInputScalar(String obj_label, short[] obj_pData, short pStep, short pStepFast); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (short*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S16, &pData[0], &pStep, &pStepFast); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S16, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7441,7 +7450,7 @@ public static boolean inputScalar(final String label, final short[] pData, final auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (short*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S16, &pData[0], &pStep, &pStepFast, format); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S16, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast, format); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); if (format != NULL) env->ReleaseStringUTFChars(obj_format, format); @@ -7452,37 +7461,37 @@ public static boolean inputScalar(final String label, final short[] pData, final auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (short*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S16, &pData[0], &pStep, &pStepFast, format, imGuiSliderFlags); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S16, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast, format, imGuiSliderFlags); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); if (format != NULL) env->ReleaseStringUTFChars(obj_format, format); return _result; */ - public static boolean inputScalar(final String label, final int[] pData) { - return nInputScalar(label, pData); + public static boolean inputScalar(final String label, final ImInt pData) { + return nInputScalar(label, pData != null ? pData.getData() : null); } - public static boolean inputScalar(final String label, final int[] pData, final int pStep) { - return nInputScalar(label, pData, pStep); + public static boolean inputScalar(final String label, final ImInt pData, final int pStep) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep); } - public static boolean inputScalar(final String label, final int[] pData, final int pStep, final int pStepFast) { - return nInputScalar(label, pData, pStep, pStepFast); + public static boolean inputScalar(final String label, final ImInt pData, final int pStep, final int pStepFast) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast); } - public static boolean inputScalar(final String label, final int[] pData, final int pStep, final int pStepFast, final String format) { - return nInputScalar(label, pData, pStep, pStepFast, format); + public static boolean inputScalar(final String label, final ImInt pData, final int pStep, final int pStepFast, final String format) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast, format); } - public static boolean inputScalar(final String label, final int[] pData, final int pStep, final int pStepFast, final String format, final int imGuiSliderFlags) { - return nInputScalar(label, pData, pStep, pStepFast, format, imGuiSliderFlags); + public static boolean inputScalar(final String label, final ImInt pData, final int pStep, final int pStepFast, final String format, final int imGuiSliderFlags) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast, format, imGuiSliderFlags); } private static native boolean nInputScalar(String obj_label, int[] obj_pData); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S32, &pData[0]); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S32, (pData != NULL ? &pData[0] : NULL)); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7491,7 +7500,7 @@ public static boolean inputScalar(final String label, final int[] pData, final i private static native boolean nInputScalar(String obj_label, int[] obj_pData, int pStep); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S32, &pData[0], &pStep); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S32, (pData != NULL ? &pData[0] : NULL), &pStep); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7500,7 +7509,7 @@ public static boolean inputScalar(final String label, final int[] pData, final i private static native boolean nInputScalar(String obj_label, int[] obj_pData, int pStep, int pStepFast); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S32, &pData[0], &pStep, &pStepFast); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S32, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7510,7 +7519,7 @@ public static boolean inputScalar(final String label, final int[] pData, final i auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S32, &pData[0], &pStep, &pStepFast, format); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S32, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast, format); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); if (format != NULL) env->ReleaseStringUTFChars(obj_format, format); @@ -7521,37 +7530,37 @@ public static boolean inputScalar(final String label, final int[] pData, final i auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (int*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S32, &pData[0], &pStep, &pStepFast, format, imGuiSliderFlags); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S32, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast, format, imGuiSliderFlags); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); if (format != NULL) env->ReleaseStringUTFChars(obj_format, format); return _result; */ - public static boolean inputScalar(final String label, final long[] pData) { - return nInputScalar(label, pData); + public static boolean inputScalar(final String label, final ImLong pData) { + return nInputScalar(label, pData != null ? pData.getData() : null); } - public static boolean inputScalar(final String label, final long[] pData, final long pStep) { - return nInputScalar(label, pData, pStep); + public static boolean inputScalar(final String label, final ImLong pData, final long pStep) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep); } - public static boolean inputScalar(final String label, final long[] pData, final long pStep, final long pStepFast) { - return nInputScalar(label, pData, pStep, pStepFast); + public static boolean inputScalar(final String label, final ImLong pData, final long pStep, final long pStepFast) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast); } - public static boolean inputScalar(final String label, final long[] pData, final long pStep, final long pStepFast, final String format) { - return nInputScalar(label, pData, pStep, pStepFast, format); + public static boolean inputScalar(final String label, final ImLong pData, final long pStep, final long pStepFast, final String format) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast, format); } - public static boolean inputScalar(final String label, final long[] pData, final long pStep, final long pStepFast, final String format, final int imGuiSliderFlags) { - return nInputScalar(label, pData, pStep, pStepFast, format, imGuiSliderFlags); + public static boolean inputScalar(final String label, final ImLong pData, final long pStep, final long pStepFast, final String format, final int imGuiSliderFlags) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast, format, imGuiSliderFlags); } private static native boolean nInputScalar(String obj_label, long[] obj_pData); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (long*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S64, &pData[0]); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S64, (pData != NULL ? &pData[0] : NULL)); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7560,7 +7569,7 @@ public static boolean inputScalar(final String label, final long[] pData, final private static native boolean nInputScalar(String obj_label, long[] obj_pData, long pStep); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (long*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S64, &pData[0], &pStep); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S64, (pData != NULL ? &pData[0] : NULL), &pStep); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7569,7 +7578,7 @@ public static boolean inputScalar(final String label, final long[] pData, final private static native boolean nInputScalar(String obj_label, long[] obj_pData, long pStep, long pStepFast); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (long*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S64, &pData[0], &pStep, &pStepFast); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S64, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7579,7 +7588,7 @@ public static boolean inputScalar(final String label, final long[] pData, final auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (long*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S64, &pData[0], &pStep, &pStepFast, format); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S64, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast, format); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); if (format != NULL) env->ReleaseStringUTFChars(obj_format, format); @@ -7590,37 +7599,37 @@ public static boolean inputScalar(final String label, final long[] pData, final auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (long*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_S64, &pData[0], &pStep, &pStepFast, format, imGuiSliderFlags); + auto _result = ImGui::InputScalar(label, ImGuiDataType_S64, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast, format, imGuiSliderFlags); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); if (format != NULL) env->ReleaseStringUTFChars(obj_format, format); return _result; */ - public static boolean inputScalar(final String label, final float[] pData) { - return nInputScalar(label, pData); + public static boolean inputScalar(final String label, final ImFloat pData) { + return nInputScalar(label, pData != null ? pData.getData() : null); } - public static boolean inputScalar(final String label, final float[] pData, final float pStep) { - return nInputScalar(label, pData, pStep); + public static boolean inputScalar(final String label, final ImFloat pData, final float pStep) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep); } - public static boolean inputScalar(final String label, final float[] pData, final float pStep, final float pStepFast) { - return nInputScalar(label, pData, pStep, pStepFast); + public static boolean inputScalar(final String label, final ImFloat pData, final float pStep, final float pStepFast) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast); } - public static boolean inputScalar(final String label, final float[] pData, final float pStep, final float pStepFast, final String format) { - return nInputScalar(label, pData, pStep, pStepFast, format); + public static boolean inputScalar(final String label, final ImFloat pData, final float pStep, final float pStepFast, final String format) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast, format); } - public static boolean inputScalar(final String label, final float[] pData, final float pStep, final float pStepFast, final String format, final int imGuiSliderFlags) { - return nInputScalar(label, pData, pStep, pStepFast, format, imGuiSliderFlags); + public static boolean inputScalar(final String label, final ImFloat pData, final float pStep, final float pStepFast, final String format, final int imGuiSliderFlags) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast, format, imGuiSliderFlags); } private static native boolean nInputScalar(String obj_label, float[] obj_pData); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_Float, &pData[0]); + auto _result = ImGui::InputScalar(label, ImGuiDataType_Float, (pData != NULL ? &pData[0] : NULL)); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7629,7 +7638,7 @@ public static boolean inputScalar(final String label, final float[] pData, final private static native boolean nInputScalar(String obj_label, float[] obj_pData, float pStep); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_Float, &pData[0], &pStep); + auto _result = ImGui::InputScalar(label, ImGuiDataType_Float, (pData != NULL ? &pData[0] : NULL), &pStep); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7638,7 +7647,7 @@ public static boolean inputScalar(final String label, final float[] pData, final private static native boolean nInputScalar(String obj_label, float[] obj_pData, float pStep, float pStepFast); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_Float, &pData[0], &pStep, &pStepFast); + auto _result = ImGui::InputScalar(label, ImGuiDataType_Float, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7648,7 +7657,7 @@ public static boolean inputScalar(final String label, final float[] pData, final auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_Float, &pData[0], &pStep, &pStepFast, format); + auto _result = ImGui::InputScalar(label, ImGuiDataType_Float, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast, format); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); if (format != NULL) env->ReleaseStringUTFChars(obj_format, format); @@ -7659,37 +7668,37 @@ public static boolean inputScalar(final String label, final float[] pData, final auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_Float, &pData[0], &pStep, &pStepFast, format, imGuiSliderFlags); + auto _result = ImGui::InputScalar(label, ImGuiDataType_Float, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast, format, imGuiSliderFlags); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); if (format != NULL) env->ReleaseStringUTFChars(obj_format, format); return _result; */ - public static boolean inputScalar(final String label, final double[] pData) { - return nInputScalar(label, pData); + public static boolean inputScalar(final String label, final ImDouble pData) { + return nInputScalar(label, pData != null ? pData.getData() : null); } - public static boolean inputScalar(final String label, final double[] pData, final double pStep) { - return nInputScalar(label, pData, pStep); + public static boolean inputScalar(final String label, final ImDouble pData, final double pStep) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep); } - public static boolean inputScalar(final String label, final double[] pData, final double pStep, final double pStepFast) { - return nInputScalar(label, pData, pStep, pStepFast); + public static boolean inputScalar(final String label, final ImDouble pData, final double pStep, final double pStepFast) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast); } - public static boolean inputScalar(final String label, final double[] pData, final double pStep, final double pStepFast, final String format) { - return nInputScalar(label, pData, pStep, pStepFast, format); + public static boolean inputScalar(final String label, final ImDouble pData, final double pStep, final double pStepFast, final String format) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast, format); } - public static boolean inputScalar(final String label, final double[] pData, final double pStep, final double pStepFast, final String format, final int imGuiSliderFlags) { - return nInputScalar(label, pData, pStep, pStepFast, format, imGuiSliderFlags); + public static boolean inputScalar(final String label, final ImDouble pData, final double pStep, final double pStepFast, final String format, final int imGuiSliderFlags) { + return nInputScalar(label, pData != null ? pData.getData() : null, pStep, pStepFast, format, imGuiSliderFlags); } private static native boolean nInputScalar(String obj_label, double[] obj_pData); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (double*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_Double, &pData[0]); + auto _result = ImGui::InputScalar(label, ImGuiDataType_Double, (pData != NULL ? &pData[0] : NULL)); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7698,7 +7707,7 @@ public static boolean inputScalar(final String label, final double[] pData, fina private static native boolean nInputScalar(String obj_label, double[] obj_pData, double pStep); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (double*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_Double, &pData[0], &pStep); + auto _result = ImGui::InputScalar(label, ImGuiDataType_Double, (pData != NULL ? &pData[0] : NULL), &pStep); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7707,7 +7716,7 @@ public static boolean inputScalar(final String label, final double[] pData, fina private static native boolean nInputScalar(String obj_label, double[] obj_pData, double pStep, double pStepFast); /*MANUAL auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (double*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_Double, &pData[0], &pStep, &pStepFast); + auto _result = ImGui::InputScalar(label, ImGuiDataType_Double, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); return _result; @@ -7717,7 +7726,7 @@ public static boolean inputScalar(final String label, final double[] pData, fina auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (double*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_Double, &pData[0], &pStep, &pStepFast, format); + auto _result = ImGui::InputScalar(label, ImGuiDataType_Double, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast, format); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); if (format != NULL) env->ReleaseStringUTFChars(obj_format, format); @@ -7728,7 +7737,7 @@ public static boolean inputScalar(final String label, final double[] pData, fina auto label = obj_label == NULL ? NULL : (char*)env->GetStringUTFChars(obj_label, JNI_FALSE); auto pData = obj_pData == NULL ? NULL : (double*)env->GetPrimitiveArrayCritical(obj_pData, JNI_FALSE); auto format = obj_format == NULL ? NULL : (char*)env->GetStringUTFChars(obj_format, JNI_FALSE); - auto _result = ImGui::InputScalar(label, ImGuiDataType_Double, &pData[0], &pStep, &pStepFast, format, imGuiSliderFlags); + auto _result = ImGui::InputScalar(label, ImGuiDataType_Double, (pData != NULL ? &pData[0] : NULL), &pStep, &pStepFast, format, imGuiSliderFlags); if (label != NULL) env->ReleaseStringUTFChars(obj_label, label); if (pData != NULL) env->ReleasePrimitiveArrayCritical(obj_pData, pData, JNI_FALSE); if (format != NULL) env->ReleaseStringUTFChars(obj_format, format); @@ -8308,6 +8317,104 @@ public static boolean colorButton(final String descId, final float colX, final f return _result; */ + /** + * Display a colored square/button, hover for details, return true when pressed. + * + * @deprecated use {@link #colorButton(String, ImVec4)} or {@link #colorButton(String, float, float, float, float)} instead + */ + @Deprecated + public static boolean colorButton(final String descId, final float[] col) { + return nColorButton(descId, col); + } + + /** + * Display a colored square/button, hover for details, return true when pressed. + * + * @deprecated use {@link #colorButton(String, ImVec4)} or {@link #colorButton(String, float, float, float, float)} instead + */ + @Deprecated + public static boolean colorButton(final String descId, final float[] col, final int imGuiColorEditFlags) { + return nColorButton(descId, col, imGuiColorEditFlags); + } + + /** + * Display a colored square/button, hover for details, return true when pressed. + * + * @deprecated use {@link #colorButton(String, ImVec4)} or {@link #colorButton(String, float, float, float, float)} instead + */ + @Deprecated + public static boolean colorButton(final String descId, final float[] col, final int imGuiColorEditFlags, final ImVec2 size) { + return nColorButton(descId, col, imGuiColorEditFlags, size.x, size.y); + } + + /** + * Display a colored square/button, hover for details, return true when pressed. + * + * @deprecated use {@link #colorButton(String, ImVec4)} or {@link #colorButton(String, float, float, float, float)} instead + */ + @Deprecated + public static boolean colorButton(final String descId, final float[] col, final int imGuiColorEditFlags, final float sizeX, final float sizeY) { + return nColorButton(descId, col, imGuiColorEditFlags, sizeX, sizeY); + } + + /** + * Display a colored square/button, hover for details, return true when pressed. + * + * @deprecated use {@link #colorButton(String, ImVec4)} or {@link #colorButton(String, float, float, float, float)} instead + */ + @Deprecated + public static boolean colorButton(final String descId, final float[] col, final ImVec2 size) { + return nColorButton(descId, col, size.x, size.y); + } + + /** + * Display a colored square/button, hover for details, return true when pressed. + * + * @deprecated use {@link #colorButton(String, ImVec4)} or {@link #colorButton(String, float, float, float, float)} instead + */ + @Deprecated + public static boolean colorButton(final String descId, final float[] col, final float sizeX, final float sizeY) { + return nColorButton(descId, col, sizeX, sizeY); + } + + private static native boolean nColorButton(String obj_descId, float[] obj_col); /*MANUAL + auto descId = obj_descId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_descId, JNI_FALSE); + auto col = obj_col == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_col, JNI_FALSE); + auto _result = ImGui::ColorButton(descId, ImVec4(col[0], col[1], col[2], col[3])); + if (descId != NULL) env->ReleaseStringUTFChars(obj_descId, descId); + if (col != NULL) env->ReleasePrimitiveArrayCritical(obj_col, col, JNI_FALSE); + return _result; + */ + + private static native boolean nColorButton(String obj_descId, float[] obj_col, int imGuiColorEditFlags); /*MANUAL + auto descId = obj_descId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_descId, JNI_FALSE); + auto col = obj_col == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_col, JNI_FALSE); + auto _result = ImGui::ColorButton(descId, ImVec4(col[0], col[1], col[2], col[3]), imGuiColorEditFlags); + if (descId != NULL) env->ReleaseStringUTFChars(obj_descId, descId); + if (col != NULL) env->ReleasePrimitiveArrayCritical(obj_col, col, JNI_FALSE); + return _result; + */ + + private static native boolean nColorButton(String obj_descId, float[] obj_col, int imGuiColorEditFlags, float sizeX, float sizeY); /*MANUAL + auto descId = obj_descId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_descId, JNI_FALSE); + auto col = obj_col == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_col, JNI_FALSE); + ImVec2 size = ImVec2(sizeX, sizeY); + auto _result = ImGui::ColorButton(descId, ImVec4(col[0], col[1], col[2], col[3]), imGuiColorEditFlags, size); + if (descId != NULL) env->ReleaseStringUTFChars(obj_descId, descId); + if (col != NULL) env->ReleasePrimitiveArrayCritical(obj_col, col, JNI_FALSE); + return _result; + */ + + private static native boolean nColorButton(String obj_descId, float[] obj_col, float sizeX, float sizeY); /*MANUAL + auto descId = obj_descId == NULL ? NULL : (char*)env->GetStringUTFChars(obj_descId, JNI_FALSE); + auto col = obj_col == NULL ? NULL : (float*)env->GetPrimitiveArrayCritical(obj_col, JNI_FALSE); + ImVec2 size = ImVec2(sizeX, sizeY); + auto _result = ImGui::ColorButton(descId, ImVec4(col[0], col[1], col[2], col[3]), 0, size); + if (descId != NULL) env->ReleaseStringUTFChars(obj_descId, descId); + if (col != NULL) env->ReleasePrimitiveArrayCritical(obj_col, col, JNI_FALSE); + return _result; + */ + /** * Initialize current options (generally on application startup) if you want to select a default format, * picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your calls. @@ -8475,7 +8582,7 @@ public static boolean collapsingHeader(final String label, final int imGuiTreeNo * When 'p_visible != NULL': if '*p_visible==true' display an additional small close button on upper right of the header which will set the bool * to false when clicked, if '*p_visible==false' don't display the header. */ - static boolean collapsingHeader(final String label, final ImBoolean pVisible) { + public static boolean collapsingHeader(final String label, final ImBoolean pVisible) { return nCollapsingHeader(label, pVisible != null ? pVisible.getData() : null); } @@ -8483,7 +8590,7 @@ static boolean collapsingHeader(final String label, final ImBoolean pVisible) { * When 'p_visible != NULL': if '*p_visible==true' display an additional small close button on upper right of the header which will set the bool * to false when clicked, if '*p_visible==false' don't display the header. */ - static boolean collapsingHeader(final String label, final ImBoolean pVisible, final int imGuiTreeNodeFlags) { + public static boolean collapsingHeader(final String label, final ImBoolean pVisible, final int imGuiTreeNodeFlags) { return nCollapsingHeader(label, pVisible != null ? pVisible.getData() : null, imGuiTreeNodeFlags); } diff --git a/imgui-binding/src/generated/java/imgui/extension/implot/ImPlot.java b/imgui-binding/src/generated/java/imgui/extension/implot/ImPlot.java index 54970fa6..8b70e23e 100644 --- a/imgui-binding/src/generated/java/imgui/extension/implot/ImPlot.java +++ b/imgui-binding/src/generated/java/imgui/extension/implot/ImPlot.java @@ -10746,6 +10746,14 @@ public static void pixelsToPlot(final ImPlotPoint dst, final ImVec2 pix) { nPixelsToPlot(dst, pix.x, pix.y); } + /** + * Converts pixels to a position in the current plot's coordinate system. + * Passing IMPLOT_AUTO uses the current axes. + */ + public static void pixelsToPlot(final ImPlotPoint dst, final float pixX, final float pixY) { + nPixelsToPlot(dst, pixX, pixY); + } + /** * Converts pixels to a position in the current plot's coordinate system. * Passing IMPLOT_AUTO uses the current axes. @@ -10774,6 +10782,14 @@ public static void pixelsToPlot(final ImPlotPoint dst, final ImVec2 pix, final i nPixelsToPlot(dst, pix.x, pix.y, xAxis); } + /** + * Converts pixels to a position in the current plot's coordinate system. + * Passing IMPLOT_AUTO uses the current axes. + */ + public static void pixelsToPlot(final ImPlotPoint dst, final float pixX, final float pixY, final int xAxis) { + nPixelsToPlot(dst, pixX, pixY, xAxis); + } + /** * Converts pixels to a position in the current plot's coordinate system. * Passing IMPLOT_AUTO uses the current axes. @@ -10802,6 +10818,14 @@ public static void pixelsToPlot(final ImPlotPoint dst, final ImVec2 pix, final i nPixelsToPlot(dst, pix.x, pix.y, xAxis, yAxis); } + /** + * Converts pixels to a position in the current plot's coordinate system. + * Passing IMPLOT_AUTO uses the current axes. + */ + public static void pixelsToPlot(final ImPlotPoint dst, final float pixX, final float pixY, final int xAxis, final int yAxis) { + nPixelsToPlot(dst, pixX, pixY, xAxis, yAxis); + } + private static native void nPixelsToPlot(ImPlotPoint dst, float pixX, float pixY); /*MANUAL ImVec2 pix = ImVec2(pixX, pixY); Jni::ImPlotPointCpy(env, ImPlot::PixelsToPlot(pix), dst); @@ -10861,6 +10885,14 @@ public static void plotToPixels(final ImVec2 dst, final ImPlotPoint plt) { nPlotToPixels(dst, plt.x, plt.y); } + /** + * Converts a position in the current plot's coordinate system to pixels. + * Passing IMPLOT_AUTO uses the current axes. + */ + public static void plotToPixels(final ImVec2 dst, final double pltX, final double pltY) { + nPlotToPixels(dst, pltX, pltY); + } + /** * Converts a position in the current plot's coordinate system to pixels. * Passing IMPLOT_AUTO uses the current axes. @@ -10905,6 +10937,14 @@ public static void plotToPixels(final ImVec2 dst, final ImPlotPoint plt, final i nPlotToPixels(dst, plt.x, plt.y, xAxis); } + /** + * Converts a position in the current plot's coordinate system to pixels. + * Passing IMPLOT_AUTO uses the current axes. + */ + public static void plotToPixels(final ImVec2 dst, final double pltX, final double pltY, final int xAxis) { + nPlotToPixels(dst, pltX, pltY, xAxis); + } + /** * Converts a position in the current plot's coordinate system to pixels. * Passing IMPLOT_AUTO uses the current axes. @@ -10949,6 +10989,14 @@ public static void plotToPixels(final ImVec2 dst, final ImPlotPoint plt, final i nPlotToPixels(dst, plt.x, plt.y, xAxis, yAxis); } + /** + * Converts a position in the current plot's coordinate system to pixels. + * Passing IMPLOT_AUTO uses the current axes. + */ + public static void plotToPixels(final ImVec2 dst, final double pltX, final double pltY, final int xAxis, final int yAxis) { + nPlotToPixels(dst, pltX, pltY, xAxis, yAxis); + } + private static native void nPlotToPixels(ImVec2 dst, double pltX, double pltY); /* Jni::ImVec2Cpy(env, ImPlot::PlotToPixels(ImPlotPoint(pltX, pltY)), dst); */ diff --git a/imgui-binding/src/generated/java/imgui/extension/nodeditor/NodeEditor.java b/imgui-binding/src/generated/java/imgui/extension/nodeditor/NodeEditor.java index fa227034..d8f2186a 100644 --- a/imgui-binding/src/generated/java/imgui/extension/nodeditor/NodeEditor.java +++ b/imgui-binding/src/generated/java/imgui/extension/nodeditor/NodeEditor.java @@ -1449,6 +1449,10 @@ public static void screenToCanvas(final ImVec2 dst, final ImVec2 pos) { nScreenToCanvas(dst, pos.x, pos.y); } + public static void screenToCanvas(final ImVec2 dst, final float posX, final float posY) { + nScreenToCanvas(dst, posX, posY); + } + private static native void nScreenToCanvas(ImVec2 dst, float posX, float posY); /*MANUAL ImVec2 pos = ImVec2(posX, posY); Jni::ImVec2Cpy(env, ax::NodeEditor::ScreenToCanvas(pos), dst); @@ -1490,6 +1494,10 @@ public static void canvasToScreen(final ImVec2 dst, final ImVec2 pos) { nCanvasToScreen(dst, pos.x, pos.y); } + public static void canvasToScreen(final ImVec2 dst, final float posX, final float posY) { + nCanvasToScreen(dst, posX, posY); + } + private static native void nCanvasToScreen(ImVec2 dst, float posX, float posY); /*MANUAL ImVec2 pos = ImVec2(posX, posY); Jni::ImVec2Cpy(env, ax::NodeEditor::CanvasToScreen(pos), dst); diff --git a/imgui-binding/src/generated/java/imgui/internal/ImGui.java b/imgui-binding/src/generated/java/imgui/internal/ImGui.java index a734ff89..ea2a1ae8 100644 --- a/imgui-binding/src/generated/java/imgui/internal/ImGui.java +++ b/imgui-binding/src/generated/java/imgui/internal/ImGui.java @@ -47,6 +47,10 @@ public static void calcItemSize(final ImVec2 dst, final ImVec2 size, final float nCalcItemSize(dst, size.x, size.y, defaultW, defaultH); } + public static void calcItemSize(final ImVec2 dst, final float sizeX, final float sizeY, final float defaultW, final float defaultH) { + nCalcItemSize(dst, sizeX, sizeY, defaultW, defaultH); + } + private static native void nCalcItemSize(ImVec2 dst, float sizeX, float sizeY, float defaultW, float defaultH); /*MANUAL ImVec2 size = ImVec2(sizeX, sizeY); Jni::ImVec2Cpy(env, ImGui::CalcItemSize(size, defaultW, defaultH), dst); diff --git a/imgui-binding/src/main/java/imgui/ImGui.java b/imgui-binding/src/main/java/imgui/ImGui.java index 30cf6e51..d4f32d1d 100644 --- a/imgui-binding/src/main/java/imgui/ImGui.java +++ b/imgui-binding/src/main/java/imgui/ImGui.java @@ -14,6 +14,8 @@ import imgui.type.ImDouble; import imgui.type.ImFloat; import imgui.type.ImInt; +import imgui.type.ImLong; +import imgui.type.ImShort; import imgui.type.ImString; import java.io.IOException; @@ -1043,7 +1045,7 @@ public static void init() { * {@code <0} framePadding uses default frame padding settings. 0 for no padding */ @BindingMethod - public static native void ImageButton(@ArgValue(callPrefix = "(ImTextureID)(intptr_t)") int userTextureId, ImVec2 size, @OptArg ImVec2 uv0, @OptArg ImVec2 uv1, @OptArg(callValue = "-1") int framePadding, @OptArg ImVec4 bgCol, @OptArg ImVec4 tintCol); + public static native boolean ImageButton(@ArgValue(callPrefix = "(ImTextureID)(intptr_t)") int userTextureId, ImVec2 size, @OptArg ImVec2 uv0, @OptArg ImVec2 uv1, @OptArg(callValue = "-1") int framePadding, @OptArg ImVec4 bgCol, @OptArg ImVec4 tintCol); public static boolean checkbox(String label, boolean active) { return nCheckbox(label, active); @@ -1491,19 +1493,19 @@ private static boolean preInputText(final boolean multiline, final String label, public static native boolean InputDouble(String label, ImDouble v, @OptArg double step, @OptArg double stepFast, @OptArg(callValue = "\"%.6f\"") String format, @OptArg int imGuiInputTextFlags); @BindingMethod - public static native boolean InputScalar(String label, Void ImGuiDataType_S16, short[] pData, @OptArg @ArgValue(callPrefix = "&") short pStep, @OptArg @ArgValue(callPrefix = "&") short pStepFast, @OptArg String format, @OptArg int imGuiSliderFlags); + public static native boolean InputScalar(String label, Void ImGuiDataType_S16, ImShort pData, @OptArg @ArgValue(callPrefix = "&") short pStep, @OptArg @ArgValue(callPrefix = "&") short pStepFast, @OptArg String format, @OptArg int imGuiSliderFlags); @BindingMethod - public static native boolean InputScalar(String label, Void ImGuiDataType_S32, int[] pData, @OptArg @ArgValue(callPrefix = "&") int pStep, @OptArg @ArgValue(callPrefix = "&") int pStepFast, @OptArg String format, @OptArg int imGuiSliderFlags); + public static native boolean InputScalar(String label, Void ImGuiDataType_S32, ImInt pData, @OptArg @ArgValue(callPrefix = "&") int pStep, @OptArg @ArgValue(callPrefix = "&") int pStepFast, @OptArg String format, @OptArg int imGuiSliderFlags); @BindingMethod - public static native boolean InputScalar(String label, Void ImGuiDataType_S64, long[] pData, @OptArg @ArgValue(callPrefix = "&") long pStep, @OptArg @ArgValue(callPrefix = "&") long pStepFast, @OptArg String format, @OptArg int imGuiSliderFlags); + public static native boolean InputScalar(String label, Void ImGuiDataType_S64, ImLong pData, @OptArg @ArgValue(callPrefix = "&") long pStep, @OptArg @ArgValue(callPrefix = "&") long pStepFast, @OptArg String format, @OptArg int imGuiSliderFlags); @BindingMethod - public static native boolean InputScalar(String label, Void ImGuiDataType_Float, float[] pData, @OptArg @ArgValue(callPrefix = "&") float pStep, @OptArg @ArgValue(callPrefix = "&") float pStepFast, @OptArg String format, @OptArg int imGuiSliderFlags); + public static native boolean InputScalar(String label, Void ImGuiDataType_Float, ImFloat pData, @OptArg @ArgValue(callPrefix = "&") float pStep, @OptArg @ArgValue(callPrefix = "&") float pStepFast, @OptArg String format, @OptArg int imGuiSliderFlags); @BindingMethod - public static native boolean InputScalar(String label, Void ImGuiDataType_Double, double[] pData, @OptArg @ArgValue(callPrefix = "&") double pStep, @OptArg @ArgValue(callPrefix = "&") double pStepFast, @OptArg String format, @OptArg int imGuiSliderFlags); + public static native boolean InputScalar(String label, Void ImGuiDataType_Double, ImDouble pData, @OptArg @ArgValue(callPrefix = "&") double pStep, @OptArg @ArgValue(callPrefix = "&") double pStepFast, @OptArg String format, @OptArg int imGuiSliderFlags); @BindingMethod public static native boolean InputScalarN(String label, Void ImGuiDataType_S16, short[] pData, int components, @OptArg @ArgValue(callPrefix = "&") short pStep, @OptArg @ArgValue(callPrefix = "&") short pStepFast, @OptArg String format, @OptArg int imGuiSliderFlags); @@ -1542,6 +1544,15 @@ private static boolean preInputText(final boolean multiline, final String label, @BindingMethod public static native boolean ColorButton(String descId, ImVec4 col, @OptArg(callValue = "0") int imGuiColorEditFlags, @OptArg ImVec2 size); + /** + * Display a colored square/button, hover for details, return true when pressed. + * + * @deprecated use {@link #colorButton(String, ImVec4)} or {@link #colorButton(String, float, float, float, float)} instead + */ + @Deprecated + @BindingMethod + public static native boolean ColorButton(String descId, @ArgValue(callValue = "ImVec4(col[0], col[1], col[2], col[3])") float[] col, @OptArg(callValue = "0") int imGuiColorEditFlags, @OptArg ImVec2 size); + /** * Initialize current options (generally on application startup) if you want to select a default format, * picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your calls. @@ -1606,7 +1617,7 @@ private static boolean preInputText(final boolean multiline, final String label, * to false when clicked, if '*p_visible==false' don't display the header. */ @BindingMethod - private static native boolean CollapsingHeader(String label, ImBoolean pVisible, @OptArg int imGuiTreeNodeFlags); + public static native boolean CollapsingHeader(String label, ImBoolean pVisible, @OptArg int imGuiTreeNodeFlags); /** * Set next TreeNode/CollapsingHeader open state.