[API] Add API to directly return ImVec2/ImVec4
This commit is contained in:
1 parent
d285bbfb34
commit
36415d60f3
12 files changed
+553
-1
No files matched your search
@@ -16,6 +16,12 @@ public final class ImGui extends imgui.ImGui {
|
||||
|
||||
// Basic Helpers for widget code
|
||||
|
||||
public static ImVec2 calcItemSize(float sizeX, float sizeY, float defaultW, float defaultH) {
|
||||
final ImVec2 value = new ImVec2();
|
||||
calcItemSize(sizeX, sizeY, defaultW, defaultH, value);
|
||||
return value;
|
||||
}
|
||||
|
||||
public static native void calcItemSize(float sizeX, float sizeY, float defaultW, float defaultH, ImVec2 dstImVec2); /*
|
||||
Jni::ImVec2Cpy(env, ImGui::CalcItemSize(ImVec2(sizeX, sizeY), defaultW, defaultH), dstImVec2);
|
||||
*/
|
||||
|
||||
@@ -186,6 +186,15 @@ public final class ImGuiDockNode extends ImGuiStruct {
|
||||
IMGUI_DOCK_NODE->WindowClass = *((ImGuiWindowClass*)imGuiWindowClassPtr);
|
||||
*/
|
||||
|
||||
/**
|
||||
* Current position
|
||||
*/
|
||||
public ImVec2 getPos() {
|
||||
final ImVec2 value = new ImVec2();
|
||||
getPos(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Current position
|
||||
*/
|
||||
@@ -215,6 +224,15 @@ public final class ImGuiDockNode extends ImGuiStruct {
|
||||
IMGUI_DOCK_NODE->Pos.y = y;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Current size
|
||||
*/
|
||||
public ImVec2 getSize() {
|
||||
final ImVec2 value = new ImVec2();
|
||||
getSize(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Current size
|
||||
*/
|
||||
@@ -244,6 +262,15 @@ public final class ImGuiDockNode extends ImGuiStruct {
|
||||
IMGUI_DOCK_NODE->Size.y = y;
|
||||
*/
|
||||
|
||||
/**
|
||||
* [Split node only] Last explicitly written-to size (overridden when using a splitter affecting the node), used to calculate Size.
|
||||
*/
|
||||
public ImVec2 getSizeRef() {
|
||||
final ImVec2 value = new ImVec2();
|
||||
getSizeRef(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* [Split node only] Last explicitly written-to size (overridden when using a splitter affecting the node), used to calculate Size.
|
||||
*/
|
||||
|
||||
@@ -45,7 +45,7 @@ public final class ImRect implements Cloneable {
|
||||
max.x = value.max.x;
|
||||
max.y = value.max.y;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ImRect{"
|
||||
|
||||
Reference in new issue
Block a user