@@ -519,13 +519,41 @@ public static ImDrawList getWindowDrawListNew() {
519
519
Jni::ImVec2Cpy(env, ImGui::GetWindowPos(), dstImVec2);
520
520
*/
521
521
522
+ /**
523
+ * Get current window position in screen space (useful if you want to do your own drawing via the DrawList API)
524
+ */
525
+ public static native float getWindowPosX (); /*
526
+ return ImGui::GetWindowPos().x;
527
+ */
528
+
529
+ /**
530
+ * Get current window position in screen space (useful if you want to do your own drawing via the DrawList API)
531
+ */
532
+ public static native float getWindowPosY (); /*
533
+ return ImGui::GetWindowPos().y;
534
+ */
535
+
522
536
/**
523
537
* Get current window size
524
538
*/
525
539
public static native void getWindowSize (ImVec2 dstImVec2 ); /*
526
540
Jni::ImVec2Cpy(env, ImGui::GetWindowSize(), dstImVec2);
527
541
*/
528
542
543
+ /**
544
+ * Get current window size
545
+ */
546
+ public static native float getWindowSizeX (); /*
547
+ return ImGui::GetWindowSize().x;
548
+ */
549
+
550
+ /**
551
+ * Get current window size
552
+ */
553
+ public static native float getWindowSizeY (); /*
554
+ return ImGui::GetWindowSize().y;
555
+ */
556
+
529
557
/**
530
558
* Get current window width (shortcut for GetWindowSize().x)
531
559
*/
@@ -747,13 +775,41 @@ public static ImDrawList getWindowDrawListNew() {
747
775
Jni::ImVec2Cpy(env, ImGui::GetContentRegionMax(), dstImVec2);
748
776
*/
749
777
778
+ /**
779
+ * Current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates
780
+ */
781
+ public static native float getContentRegionMaxX (); /*
782
+ return ImGui::GetContentRegionMax().x;
783
+ */
784
+
785
+ /**
786
+ * Current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates
787
+ */
788
+ public static native float getContentRegionMaxY (); /*
789
+ return ImGui::GetContentRegionMax().y;
790
+ */
791
+
750
792
/**
751
793
* == GetContentRegionMax() - GetCursorPos()
752
794
*/
753
795
public static native void getContentRegionAvail (ImVec2 dstImVec2 ); /*
754
796
Jni::ImVec2Cpy(env, ImGui::GetContentRegionAvail(), dstImVec2);
755
797
*/
756
798
799
+ /**
800
+ * == GetContentRegionMax() - GetCursorPos()
801
+ */
802
+ public static native float getContentRegionAvailX (); /*
803
+ return ImGui::GetContentRegionAvail().x;
804
+ */
805
+
806
+ /**
807
+ * == GetContentRegionMax() - GetCursorPos()
808
+ */
809
+ public static native float getContentRegionAvailY (); /*
810
+ return ImGui::GetContentRegionAvail().y;
811
+ */
812
+
757
813
/**
758
814
* Content boundaries min (roughly (0,0)-Scroll), in window coordinates
759
815
*/
@@ -768,10 +824,32 @@ public static ImDrawList getWindowDrawListNew() {
768
824
Jni::ImVec2Cpy(env, ImGui::GetWindowContentRegionMin(), dstImVec2);
769
825
*/
770
826
827
+ /**
828
+ * Content boundaries max (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates
829
+ */
830
+ public static native float getWindowContentRegionMinX (); /*
831
+ return ImGui::GetWindowContentRegionMin().x;
832
+ */
833
+
834
+ /**
835
+ * Content boundaries max (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates
836
+ */
837
+ public static native float getWindowContentRegionMinY (); /*
838
+ return ImGui::GetWindowContentRegionMin().y;
839
+ */
840
+
771
841
public static native void getWindowContentRegionMax (ImVec2 dstImVec2 ); /*
772
842
Jni::ImVec2Cpy(env, ImGui::GetWindowContentRegionMax(), dstImVec2);
773
843
*/
774
844
845
+ public static native float getWindowContentRegionMaxX (); /*
846
+ return ImGui::GetWindowContentRegionMax().x;
847
+ */
848
+
849
+ public static native float getWindowContentRegionMaxY (); /*
850
+ return ImGui::GetWindowContentRegionMax().y;
851
+ */
852
+
775
853
// Windows Scrolling
776
854
777
855
/**
@@ -962,6 +1040,20 @@ public static ImFont getFont() {
962
1040
Jni::ImVec2Cpy(env, ImGui::GetFontTexUvWhitePixel(), dstImVec2);
963
1041
*/
964
1042
1043
+ /**
1044
+ * Get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API
1045
+ */
1046
+ public static native float getFontTexUvWhitePixelX (); /*
1047
+ return ImGui::GetFontTexUvWhitePixel().x;
1048
+ */
1049
+
1050
+ /**
1051
+ * Get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API
1052
+ */
1053
+ public static native float getFontTexUvWhitePixelY (); /*
1054
+ return ImGui::GetFontTexUvWhitePixel().y;
1055
+ */
1056
+
965
1057
/**
966
1058
* Retrieve given style color with style alpha applied and optional extra alpha multiplier
967
1059
*/
@@ -1175,22 +1267,37 @@ public static ImFont getFont() {
1175
1267
Jni::ImVec2Cpy(env, ImGui::GetCursorPos(), dstImVec2);
1176
1268
*/
1177
1269
1270
+ /**
1271
+ * Cursor position in window coordinates (relative to window position)
1272
+ */
1178
1273
public static native float getCursorPosX (); /*
1179
1274
return ImGui::GetCursorPosX();
1180
1275
*/
1181
1276
1277
+ /**
1278
+ * Cursor position in window coordinates (relative to window position)
1279
+ */
1182
1280
public static native float getCursorPosY (); /*
1183
1281
return ImGui::GetCursorPosY();
1184
1282
*/
1185
1283
1284
+ /**
1285
+ * Cursor position in window coordinates (relative to window position)
1286
+ */
1186
1287
public static native void setCursorPos (float x , float y ); /*
1187
1288
ImGui::SetCursorPos(ImVec2(x, y));
1188
1289
*/
1189
1290
1291
+ /**
1292
+ * Cursor position in window coordinates (relative to window position)
1293
+ */
1190
1294
public static native void setCursorPosX (float x ); /*
1191
1295
ImGui::SetCursorPosX(x);
1192
1296
*/
1193
1297
1298
+ /**
1299
+ * Cursor position in window coordinates (relative to window position)
1300
+ */
1194
1301
public static native void setCursorPosY (float y ); /*
1195
1302
ImGui::SetCursorPosY(y);
1196
1303
*/
@@ -1202,13 +1309,41 @@ public static ImFont getFont() {
1202
1309
Jni::ImVec2Cpy(env, ImGui::GetCursorStartPos(), dstImVec2);
1203
1310
*/
1204
1311
1312
+ /**
1313
+ * Initial cursor position in window coordinates
1314
+ */
1315
+ public static native float getCursorStartPosX (); /*
1316
+ return ImGui::GetCursorStartPos().x;
1317
+ */
1318
+
1319
+ /**
1320
+ * Initial cursor position in window coordinates
1321
+ */
1322
+ public static native float getCursorStartPosY (); /*
1323
+ return ImGui::GetCursorStartPos().y;
1324
+ */
1325
+
1205
1326
/**
1206
1327
* Cursor position in absolute screen coordinates [0..io.DisplaySize] (useful to work with ImDrawList API)
1207
1328
*/
1208
1329
public static native void getCursorScreenPos (ImVec2 dstImVec2 ); /*
1209
1330
Jni::ImVec2Cpy(env, ImGui::GetCursorScreenPos(), dstImVec2);
1210
1331
*/
1211
1332
1333
+ /**
1334
+ * Cursor position in absolute screen coordinates [0..io.DisplaySize] (useful to work with ImDrawList API)
1335
+ */
1336
+ public static native float getCursorScreenPosX (); /*
1337
+ return ImGui::GetCursorScreenPos().x;
1338
+ */
1339
+
1340
+ /**
1341
+ * Cursor position in absolute screen coordinates [0..io.DisplaySize] (useful to work with ImDrawList API)
1342
+ */
1343
+ public static native float getCursorScreenPosY (); /*
1344
+ return ImGui::GetCursorScreenPos().y;
1345
+ */
1346
+
1212
1347
/**
1213
1348
* Cursor position in absolute screen coordinates [0..io.DisplaySize]
1214
1349
*/
@@ -4664,20 +4799,62 @@ public static Object getDragDropPayloadObject() {
4664
4799
Jni::ImVec2Cpy(env, ImGui::GetItemRectMin(), dstImVec2);
4665
4800
*/
4666
4801
4802
+ /**
4803
+ * Get upper-left bounding rectangle of the last item (screen space)
4804
+ */
4805
+ public static native float getItemRectMinX (); /*
4806
+ return ImGui::GetItemRectMin().x;
4807
+ */
4808
+
4809
+ /**
4810
+ * Get upper-left bounding rectangle of the last item (screen space)
4811
+ */
4812
+ public static native float getItemRectMinY (); /*
4813
+ return ImGui::GetItemRectMin().y;
4814
+ */
4815
+
4667
4816
/**
4668
4817
* Get lower-right bounding rectangle of the last item (screen space)
4669
4818
*/
4670
4819
public static native void getItemRectMax (ImVec2 dstImVec2 ); /*
4671
4820
Jni::ImVec2Cpy(env, ImGui::GetItemRectMax(), dstImVec2);
4672
4821
*/
4673
4822
4823
+ /**
4824
+ * Get lower-right bounding rectangle of the last item (screen space)
4825
+ */
4826
+ public static native float getItemRectMaxX (); /*
4827
+ return ImGui::GetItemRectMax().x;
4828
+ */
4829
+
4830
+ /**
4831
+ * Get lower-right bounding rectangle of the last item (screen space)
4832
+ */
4833
+ public static native float getItemRectMaxY (); /*
4834
+ return ImGui::GetItemRectMax().y;
4835
+ */
4836
+
4674
4837
/**
4675
4838
* Get size of last item
4676
4839
*/
4677
4840
public static native void getItemRectSize (ImVec2 dstImVec2 ); /*
4678
4841
Jni::ImVec2Cpy(env, ImGui::GetItemRectSize(), dstImVec2);
4679
4842
*/
4680
4843
4844
+ /**
4845
+ * Get size of last item
4846
+ */
4847
+ public static native float getItemRectSizeX (); /*
4848
+ return ImGui::GetItemRectSize().x;
4849
+ */
4850
+
4851
+ /**
4852
+ * Get size of last item
4853
+ */
4854
+ public static native float getItemRectSizeY (); /*
4855
+ return ImGui::GetItemRectSize().y;
4856
+ */
4857
+
4681
4858
/**
4682
4859
* Allow last item to be overlapped by a subsequent item. sometimes useful with invisible buttons, selectables, etc. to catch unused area.
4683
4860
*/
@@ -5034,13 +5211,41 @@ public static ImGuiStorage getStateStorageNew() {
5034
5211
Jni::ImVec2Cpy(env, ImGui::GetMousePos(), dstImVec2);
5035
5212
*/
5036
5213
5214
+ /**
5215
+ * Shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls
5216
+ */
5217
+ public static native float getMousePosX (); /*
5218
+ return ImGui::GetMousePos().x;
5219
+ */
5220
+
5221
+ /**
5222
+ * Shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls
5223
+ */
5224
+ public static native float getMousePosY (); /*
5225
+ return ImGui::GetMousePos().y;
5226
+ */
5227
+
5037
5228
/**
5038
5229
* Retrieve backup of mouse position at the time of opening popup we have BeginPopup() into
5039
5230
*/
5040
5231
public static native void getMousePosOnOpeningCurrentPopup (ImVec2 dstImVec2 ); /*
5041
5232
Jni::ImVec2Cpy(env, ImGui::GetMousePosOnOpeningCurrentPopup(), dstImVec2);
5042
5233
*/
5043
5234
5235
+ /**
5236
+ * Retrieve backup of mouse position at the time of opening popup we have BeginPopup() into
5237
+ */
5238
+ public static native float getMousePosOnOpeningCurrentPopupX (); /*
5239
+ return ImGui::GetMousePosOnOpeningCurrentPopup().x;
5240
+ */
5241
+
5242
+ /**
5243
+ * Retrieve backup of mouse position at the time of opening popup we have BeginPopup() into
5244
+ */
5245
+ public static native float getMousePosOnOpeningCurrentPopupY (); /*
5246
+ return ImGui::GetMousePosOnOpeningCurrentPopup().y;
5247
+ */
5248
+
5044
5249
/**
5045
5250
* Return the delta from the initial clicking position while the mouse button is pressed or was just released.
5046
5251
* This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lockThreshold {@code < -1.0f} uses io.MouseDraggingThreshold.
@@ -5049,6 +5254,22 @@ public static ImGuiStorage getStateStorageNew() {
5049
5254
Jni::ImVec2Cpy(env, ImGui::GetMouseDragDelta(), dstImVec2);
5050
5255
*/
5051
5256
5257
+ /**
5258
+ * Return the delta from the initial clicking position while the mouse button is pressed or was just released.
5259
+ * This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lockThreshold {@code < -1.0f} uses io.MouseDraggingThreshold.
5260
+ */
5261
+ public static native float getMouseDragDeltaX (); /*
5262
+ return ImGui::GetMouseDragDelta().x;
5263
+ */
5264
+
5265
+ /**
5266
+ * Return the delta from the initial clicking position while the mouse button is pressed or was just released.
5267
+ * This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lockThreshold {@code < -1.0f} uses io.MouseDraggingThreshold.
5268
+ */
5269
+ public static native float getMouseDragDeltaY (); /*
5270
+ return ImGui::GetMouseDragDelta().y;
5271
+ */
5272
+
5052
5273
/**
5053
5274
* Return the delta from the initial clicking position while the mouse button is pressed or was just released.
5054
5275
* This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lockThreshold {@code < -1.0f} uses io.MouseDraggingThreshold.
@@ -5057,6 +5278,22 @@ public static ImGuiStorage getStateStorageNew() {
5057
5278
Jni::ImVec2Cpy(env, ImGui::GetMouseDragDelta(button), dstImVec2);
5058
5279
*/
5059
5280
5281
+ /**
5282
+ * Return the delta from the initial clicking position while the mouse button is pressed or was just released.
5283
+ * This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lockThreshold {@code < -1.0f} uses io.MouseDraggingThreshold.
5284
+ */
5285
+ public static native float getMouseDragDeltaX (int button ); /*
5286
+ return ImGui::GetMouseDragDelta(button).x;
5287
+ */
5288
+
5289
+ /**
5290
+ * Return the delta from the initial clicking position while the mouse button is pressed or was just released.
5291
+ * This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lockThreshold {@code < -1.0f} uses io.MouseDraggingThreshold.
5292
+ */
5293
+ public static native float getMouseDragDeltaY (int button ); /*
5294
+ return ImGui::GetMouseDragDelta(button).y;
5295
+ */
5296
+
5060
5297
/**
5061
5298
* Return the delta from the initial clicking position while the mouse button is pressed or was just released.
5062
5299
* This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lockThreshold {@code < -1.0f} uses io.MouseDraggingThreshold.
@@ -5065,6 +5302,22 @@ public static ImGuiStorage getStateStorageNew() {
5065
5302
Jni::ImVec2Cpy(env, ImGui::GetMouseDragDelta(button, lockThreshold), dstImVec2);
5066
5303
*/
5067
5304
5305
+ /**
5306
+ * Return the delta from the initial clicking position while the mouse button is pressed or was just released.
5307
+ * This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lockThreshold {@code < -1.0f} uses io.MouseDraggingThreshold.
5308
+ */
5309
+ public static native float getMouseDragDeltaX (int button , float lockThreshold ); /*
5310
+ return ImGui::GetMouseDragDelta(button, lockThreshold).x;
5311
+ */
5312
+
5313
+ /**
5314
+ * Return the delta from the initial clicking position while the mouse button is pressed or was just released.
5315
+ * This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lockThreshold {@code < -1.0f} uses io.MouseDraggingThreshold.
5316
+ */
5317
+ public static native float getMouseDragDeltaY (int button , float lockThreshold ); /*
5318
+ return ImGui::GetMouseDragDelta(button, lockThreshold).y;
5319
+ */
5320
+
5068
5321
public static native void resetMouseDragDelta (); /*
5069
5322
ImGui::ResetMouseDragDelta();
5070
5323
*/
0 commit comments