chore(api): tweak ImGuiListClipper API
This commit is contained in:
2 files changed
+12
-12
No files matched your search
@@ -214,11 +214,9 @@ public final class ImGuiListClipper extends ImGuiStructDestroyable {
|
|||||||
* @param itemsCount Use -1 to ignore (you can call Begin later).
|
* @param itemsCount Use -1 to ignore (you can call Begin later).
|
||||||
* Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
|
* Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
|
||||||
* @param callback action to do in iterations
|
* @param callback action to do in iterations
|
||||||
* @deprecated Use approach from the native example or {@link #forEach(Consumer)} method.
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static void forEach(final int itemsCount, final ImListClipperCallback callback) {
|
public static void forEach(final int itemsCount, final ImListClipperCallback callback) {
|
||||||
forEach(itemsCount, -1, callback);
|
nForEach(itemsCount, -1, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -227,10 +225,12 @@ public final class ImGuiListClipper extends ImGuiStructDestroyable {
|
|||||||
* @param itemsHeight Use -1.0f to be calculated automatically on first step.
|
* @param itemsHeight Use -1.0f to be calculated automatically on first step.
|
||||||
* Otherwise, pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
|
* Otherwise, pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
|
||||||
* @param callback action to do in iterations
|
* @param callback action to do in iterations
|
||||||
* @deprecated Use approach from the native example or {@link #forEach(Consumer)} method.
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
public static void forEach(final int itemsCount, final int itemsHeight, final ImListClipperCallback callback) {
|
||||||
public static native void forEach(int itemsCount, int itemsHeight, ImListClipperCallback callback); /*
|
nForEach(itemsCount, itemsHeight, callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nForEach(int itemsCount, int itemsHeight, ImListClipperCallback callback); /*
|
||||||
ImGuiListClipper clipper;
|
ImGuiListClipper clipper;
|
||||||
clipper.Begin(itemsCount, itemsHeight);
|
clipper.Begin(itemsCount, itemsHeight);
|
||||||
while (clipper.Step()) {
|
while (clipper.Step()) {
|
||||||
|
|||||||
@@ -127,11 +127,9 @@ public final class ImGuiListClipper extends ImGuiStructDestroyable {
|
|||||||
* @param itemsCount Use -1 to ignore (you can call Begin later).
|
* @param itemsCount Use -1 to ignore (you can call Begin later).
|
||||||
* Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
|
* Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step).
|
||||||
* @param callback action to do in iterations
|
* @param callback action to do in iterations
|
||||||
* @deprecated Use approach from the native example or {@link #forEach(Consumer)} method.
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public static void forEach(final int itemsCount, final ImListClipperCallback callback) {
|
public static void forEach(final int itemsCount, final ImListClipperCallback callback) {
|
||||||
forEach(itemsCount, -1, callback);
|
nForEach(itemsCount, -1, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -140,10 +138,12 @@ public final class ImGuiListClipper extends ImGuiStructDestroyable {
|
|||||||
* @param itemsHeight Use -1.0f to be calculated automatically on first step.
|
* @param itemsHeight Use -1.0f to be calculated automatically on first step.
|
||||||
* Otherwise, pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
|
* Otherwise, pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
|
||||||
* @param callback action to do in iterations
|
* @param callback action to do in iterations
|
||||||
* @deprecated Use approach from the native example or {@link #forEach(Consumer)} method.
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
public static void forEach(final int itemsCount, final int itemsHeight, final ImListClipperCallback callback) {
|
||||||
public static native void forEach(int itemsCount, int itemsHeight, ImListClipperCallback callback); /*
|
nForEach(itemsCount, itemsHeight, callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nForEach(int itemsCount, int itemsHeight, ImListClipperCallback callback); /*
|
||||||
ImGuiListClipper clipper;
|
ImGuiListClipper clipper;
|
||||||
clipper.Begin(itemsCount, itemsHeight);
|
clipper.Begin(itemsCount, itemsHeight);
|
||||||
while (clipper.Step()) {
|
while (clipper.Step()) {
|
||||||
|
|||||||
Reference in new issue
Block a user