Example tweaks
This commit is contained in:
1 parent
51fcd63b57
commit
f6e9712b38
5 files changed
+76
-22
No files matched your search
@@ -1568,6 +1568,14 @@ public class ImGui {
|
||||
return Native.IsMouseHoveringRect(minX, minY, maxX, maxY, clip);
|
||||
}
|
||||
|
||||
public static ImGuiMouseCursor GetMouseCursor() {
|
||||
return ImGuiMouseCursor.valueOf(Native.GetMouseCursor());
|
||||
}
|
||||
|
||||
public static void SetMouseCursor(ImGuiMouseCursor type) {
|
||||
Native.SetMouseCursor(type.getValue());
|
||||
}
|
||||
|
||||
// Internal methods
|
||||
|
||||
public static void PushMultiItemsWidths(int components, float w_full) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package imgui;
|
||||
|
||||
import imgui.enums.ImGuiMouseCursor;
|
||||
|
||||
import java.nio.Buffer;
|
||||
|
||||
/**
|
||||
@@ -2148,5 +2150,13 @@ class Native {
|
||||
return ImGui::IsMouseHoveringRect(ImVec2(minX, minY), ImVec2(maxX, maxY), clip);
|
||||
*/
|
||||
|
||||
static native int GetMouseCursor(); /*
|
||||
return (int)ImGui::GetMouseCursor();
|
||||
*/
|
||||
|
||||
static native void SetMouseCursor(int type); /*
|
||||
ImGui::SetMouseCursor(type);
|
||||
*/
|
||||
|
||||
// @formatter:on
|
||||
}
|
||||
@@ -25,4 +25,13 @@ public enum ImGuiMouseCursor {
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static ImGuiMouseCursor valueOf(int value) {
|
||||
for (ImGuiMouseCursor cursor : values()) {
|
||||
if (cursor.value == value) {
|
||||
return cursor;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Invalid cursor value: " + value);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user