[API] Add API to directly return ImVec2/ImVec4

This commit is contained in:
SpaiR committed 2021-02-27 16:16:03 +02:00
1 parent d285bbfb34
commit 36415d60f3
12 files changed
+553 -1

No files matched your search

@@ -47,6 +47,15 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
IMGUI_STYLE->Alpha = alpha;
*/
/**
* Padding within a window.
*/
public ImVec2 getWindowPadding() {
final ImVec2 value = new ImVec2();
getWindowPadding(value);
return value;
}
/**
* Padding within a window.
*/
@@ -106,6 +115,15 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
IMGUI_STYLE->WindowBorderSize = windowBorderSize;
*/
/**
* Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints().
*/
public ImVec2 getWindowMinSize() {
final ImVec2 value = new ImVec2();
getWindowMinSize(value);
return value;
}
/**
* Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints().
*/
@@ -135,6 +153,15 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
IMGUI_STYLE->WindowMinSize.y = y;
*/
/**
* Alignment for title bar text. Defaults to (0.0f,0.5f) for left-aligned,vertically centered.
*/
public ImVec2 getWindowTitleAlign() {
final ImVec2 value = new ImVec2();
getWindowTitleAlign(value);
return value;
}
/**
* Alignment for title bar text. Defaults to (0.0f,0.5f) for left-aligned,vertically centered.
*/
@@ -234,6 +261,15 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
IMGUI_STYLE->PopupBorderSize = popupBorderSize;
*/
/**
* Padding within a framed rectangle (used by most widgets).
*/
public ImVec2 getFramePadding() {
final ImVec2 value = new ImVec2();
getFramePadding(value);
return value;
}
/**
* Padding within a framed rectangle (used by most widgets).
*/
@@ -291,6 +327,15 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
IMGUI_STYLE->FrameBorderSize = frameBorderSize;
*/
/**
* Horizontal and vertical spacing between widgets/lines.
*/
public ImVec2 getItemSpacing() {
final ImVec2 value = new ImVec2();
getItemSpacing(value);
return value;
}
/**
* Horizontal and vertical spacing between widgets/lines.
*/
@@ -320,6 +365,15 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
IMGUI_STYLE->ItemSpacing.y = y;
*/
/**
* Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label).
*/
public ImVec2 getItemInnerSpacing() {
final ImVec2 value = new ImVec2();
getItemInnerSpacing(value);
return value;
}
/**
* Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label).
*/
@@ -349,6 +403,15 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
IMGUI_STYLE->ItemInnerSpacing.y = y;
*/
/**
* Padding within a table cell.
*/
public ImVec2 getCellPadding() {
final ImVec2 value = new ImVec2();
getCellPadding(value);
return value;
}
/**
* Padding within a table cell.
*/
@@ -378,6 +441,16 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
IMGUI_STYLE->CellPadding.y = y;
*/
/**
* Expand reactive bounding box for touch-based system where touch position is not accurate enough.
* Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much!
*/
public ImVec2 getTouchExtraPadding() {
final ImVec2 value = new ImVec2();
getTouchExtraPadding(value);
return value;
}
/**
* Expand reactive bounding box for touch-based system where touch position is not accurate enough.
* Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much!
@@ -567,6 +640,15 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
IMGUI_STYLE->ColorButtonPosition = colorButtonPosition;
*/
/**
* Alignment of button text when button is larger than text. Defaults to (0.5f, 0.5f) (centered).
*/
public ImVec2 getButtonTextAlign() {
final ImVec2 value = new ImVec2();
getButtonTextAlign(value);
return value;
}
/**
* Alignment of button text when button is larger than text. Defaults to (0.5f, 0.5f) (centered).
*/
@@ -596,6 +678,16 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
IMGUI_STYLE->ButtonTextAlign.y = y;
*/
/**
* Alignment of selectable text. Defaults to (0.0f, 0.0f) (top-left aligned).
* It's generally important to keep this left-aligned if you want to lay multiple items on a same line.
*/
public ImVec2 getSelectableTextAlign() {
final ImVec2 value = new ImVec2();
getSelectableTextAlign(value);
return value;
}
/**
* Alignment of selectable text. Defaults to (0.0f, 0.0f) (top-left aligned).
* It's generally important to keep this left-aligned if you want to lay multiple items on a same line.
@@ -629,6 +721,15 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
IMGUI_STYLE->SelectableTextAlign.y = y;
*/
/**
* Window position are clamped to be visible within the display area by at least this amount. Only applies to regular windows.
*/
public ImVec2 getDisplayWindowPadding() {
final ImVec2 value = new ImVec2();
getDisplayWindowPadding(value);
return value;
}
/**
* Window position are clamped to be visible within the display area by at least this amount. Only applies to regular windows.
*/
@@ -658,6 +759,16 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
IMGUI_STYLE->DisplayWindowPadding.y = y;
*/
/**
* If you cannot see the edges of your screen (e.g. on a TV) increase the safe area padding.
* Apply to popups/tooltips as well regular windows. NB: Prefer configuring your TV sets correctly!
*/
public ImVec2 getDisplaySafeAreaPadding() {
final ImVec2 value = new ImVec2();
getDisplaySafeAreaPadding(value);
return value;
}
/**
* If you cannot see the edges of your screen (e.g. on a TV) increase the safe area padding.
* Apply to popups/tooltips as well regular windows. NB: Prefer configuring your TV sets correctly!
@@ -821,6 +932,12 @@ public final class ImGuiStyle extends ImGuiStructDestroyable {
}
*/
public ImVec4 getColor(final int imGuiCol) {
final ImVec4 value = new ImVec4();
getColor(imGuiCol, value);
return value;
}
public native void getColor(int imGuiCol, ImVec4 dstImVec4); /*
Jni::ImVec4Cpy(env, IMGUI_STYLE->Colors[imGuiCol], dstImVec4);
*/