imgui-bindings 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d85ab51913e9f7e8f1a53d6ec0da01c5d6622242beebd9bada8d09bc0fe7023
4
- data.tar.gz: e5e0393ed8d1f481c6ed735f2ef09caefdf8f0049ddf66c4cd8ba461a8e6e5c6
3
+ metadata.gz: 75d3fa201633832f66d5c9c43c8ee5d7bcf5e09c297dcb3f2c7a59a1db591d4c
4
+ data.tar.gz: 1beba6e9a6eec45dbad4fb44117f56b4b6f7ec50a5aea7d8ee8da05c5a5bcb47
5
5
  SHA512:
6
- metadata.gz: 701c4754521d32d9a951492a55ce1f6a18b83d1a420053ce8aaeae1bdfc7b053807c719a3b79c07668a6b613dc18793e71e12741ae1346a2e484344a8d15db83
7
- data.tar.gz: 1ec45b3575411a865285bd6aea1af87925321d592154edd4759bc4ba91da993c503058d4115fae02cf1dd4a4fceb7a72bfcb16e10321e7039018b5f94180413c
6
+ metadata.gz: fc3d24741acae0e5132433fd121a3172ad2f41cad961d02a8e08c0e840b0484394cfe5239cfff9b1cff99287921107d3393858f0ceaa4c9ae2b4f845b8bae894
7
+ data.tar.gz: 7dc72767c7b35a38e50100adc077a9f9c7c2ab98d52291ffeb532b38ee6cf1f141b1dcbaad9eab6d96946731e388fc262b5dd3f1c259c96fb45e85fa2fbaaea2
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ 2022-12-25 vaiorabbit <http://twitter.com/vaiorabbit>
2
+
3
+ * ImGui v1.89.1
4
+
1
5
  2022-08-14 vaiorabbit <http://twitter.com/vaiorabbit>
2
6
 
3
7
  * Added ImNodes ( https://github.com/rokups/ImNodes ) support
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  # Yet another ImGui wrapper for Ruby #
4
4
 
5
5
  * Created : 2019-01-05
6
- * Last modified : 2022-08-14
6
+ * Last modified : 2022-12-25
7
7
 
8
8
  <img src="https://raw.githubusercontent.com/vaiorabbit/ruby-imgui/master/doc/jpfont_test.png" width="250">
9
9
 
@@ -24,7 +24,7 @@
24
24
  * gem install ffi
25
25
  * Compiler
26
26
  * Tested on:
27
- * [Windows] gcc (Rev1, Built by MSYS2 project) 8.2.1 20181214
27
+ * [Windows] gcc (Rev10, Built by MSYS2 project) 11.2.0
28
28
  * [macOS] clang (Apple clang version 13.1.6 (clang-1316.0.21.2.5), Target: arm64-apple-darwin21.5.0)
29
29
  * CMake https://cmake.org/download/
30
30
 
data/lib/imgui.dll CHANGED
Binary file
data/lib/imgui.dylib CHANGED
Binary file
data/lib/imgui.rb CHANGED
@@ -9,6 +9,7 @@ require 'ffi'
9
9
  FFI.typedef :int, :ImDrawFlags
10
10
  FFI.typedef :ushort, :ImDrawIdx
11
11
  FFI.typedef :int, :ImDrawListFlags
12
+ FFI.typedef :pointer, :ImDrawListSharedData
12
13
  FFI.typedef :int, :ImFontAtlasFlags
13
14
  FFI.typedef :int, :ImGuiBackendFlags
14
15
  FFI.typedef :int, :ImGuiButtonFlags
@@ -24,13 +25,11 @@ FFI.typedef :int, :ImGuiFocusedFlags
24
25
  FFI.typedef :int, :ImGuiHoveredFlags
25
26
  FFI.typedef :uint, :ImGuiID
26
27
  FFI.typedef :int, :ImGuiInputTextFlags
27
- FFI.typedef :int, :ImGuiKey
28
+ FFI.typedef :int, :ImGuiKeyChord
28
29
  FFI.typedef :pointer, :ImGuiMemAllocFunc
29
30
  FFI.typedef :pointer, :ImGuiMemFreeFunc
30
- FFI.typedef :int, :ImGuiModFlags
31
31
  FFI.typedef :int, :ImGuiMouseButton
32
32
  FFI.typedef :int, :ImGuiMouseCursor
33
- FFI.typedef :int, :ImGuiNavInput
34
33
  FFI.typedef :int, :ImGuiPopupFlags
35
34
  FFI.typedef :int, :ImGuiSelectableFlags
36
35
  FFI.typedef :int, :ImGuiSliderFlags
@@ -57,6 +56,7 @@ FFI.typedef :uchar, :ImU8
57
56
  FFI.typedef :ushort, :ImWchar
58
57
  FFI.typedef :ushort, :ImWchar16
59
58
  FFI.typedef :uint, :ImWchar32
59
+ FFI.typedef :int, :ImGuiKey
60
60
 
61
61
  # ImDrawFlags_
62
62
  ImDrawFlags_None = 0 # 0
@@ -273,6 +273,9 @@ ImGuiHoveredFlags_AllowWhenDisabled = 512 # 1 << 9
273
273
  ImGuiHoveredFlags_NoNavOverride = 1024 # 1 << 10
274
274
  ImGuiHoveredFlags_RectOnly = 416 # ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped
275
275
  ImGuiHoveredFlags_RootAndChildWindows = 3 # ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
276
+ ImGuiHoveredFlags_DelayNormal = 2048 # 1 << 11
277
+ ImGuiHoveredFlags_DelayShort = 4096 # 1 << 12
278
+ ImGuiHoveredFlags_NoSharedDelay = 8192 # 1 << 13
276
279
 
277
280
  # ImGuiInputTextFlags_
278
281
  ImGuiInputTextFlags_None = 0 # 0
@@ -296,8 +299,9 @@ ImGuiInputTextFlags_NoUndoRedo = 65536 # 1 << 16
296
299
  ImGuiInputTextFlags_CharsScientific = 131072 # 1 << 17
297
300
  ImGuiInputTextFlags_CallbackResize = 262144 # 1 << 18
298
301
  ImGuiInputTextFlags_CallbackEdit = 524288 # 1 << 19
302
+ ImGuiInputTextFlags_EscapeClearsAll = 1048576 # 1 << 20
299
303
 
300
- # ImGuiKey_
304
+ # ImGuiKey
301
305
  ImGuiKey_None = 0 # 0
302
306
  ImGuiKey_Tab = 512 # 512
303
307
  ImGuiKey_LeftArrow = 513 # 513
@@ -406,46 +410,53 @@ ImGuiKey_KeypadEnter = 615 # 615
406
410
  ImGuiKey_KeypadEqual = 616 # 616
407
411
  ImGuiKey_GamepadStart = 617 # 617
408
412
  ImGuiKey_GamepadBack = 618 # 618
409
- ImGuiKey_GamepadFaceUp = 619 # 619
410
- ImGuiKey_GamepadFaceDown = 620 # 620
411
- ImGuiKey_GamepadFaceLeft = 621 # 621
412
- ImGuiKey_GamepadFaceRight = 622 # 622
413
- ImGuiKey_GamepadDpadUp = 623 # 623
414
- ImGuiKey_GamepadDpadDown = 624 # 624
415
- ImGuiKey_GamepadDpadLeft = 625 # 625
416
- ImGuiKey_GamepadDpadRight = 626 # 626
413
+ ImGuiKey_GamepadFaceLeft = 619 # 619
414
+ ImGuiKey_GamepadFaceRight = 620 # 620
415
+ ImGuiKey_GamepadFaceUp = 621 # 621
416
+ ImGuiKey_GamepadFaceDown = 622 # 622
417
+ ImGuiKey_GamepadDpadLeft = 623 # 623
418
+ ImGuiKey_GamepadDpadRight = 624 # 624
419
+ ImGuiKey_GamepadDpadUp = 625 # 625
420
+ ImGuiKey_GamepadDpadDown = 626 # 626
417
421
  ImGuiKey_GamepadL1 = 627 # 627
418
422
  ImGuiKey_GamepadR1 = 628 # 628
419
423
  ImGuiKey_GamepadL2 = 629 # 629
420
424
  ImGuiKey_GamepadR2 = 630 # 630
421
425
  ImGuiKey_GamepadL3 = 631 # 631
422
426
  ImGuiKey_GamepadR3 = 632 # 632
423
- ImGuiKey_GamepadLStickUp = 633 # 633
424
- ImGuiKey_GamepadLStickDown = 634 # 634
425
- ImGuiKey_GamepadLStickLeft = 635 # 635
426
- ImGuiKey_GamepadLStickRight = 636 # 636
427
- ImGuiKey_GamepadRStickUp = 637 # 637
428
- ImGuiKey_GamepadRStickDown = 638 # 638
429
- ImGuiKey_GamepadRStickLeft = 639 # 639
430
- ImGuiKey_GamepadRStickRight = 640 # 640
431
- ImGuiKey_ModCtrl = 641 # 641
432
- ImGuiKey_ModShift = 642 # 642
433
- ImGuiKey_ModAlt = 643 # 643
434
- ImGuiKey_ModSuper = 644 # 644
435
- ImGuiKey_COUNT = 645 # 645
427
+ ImGuiKey_GamepadLStickLeft = 633 # 633
428
+ ImGuiKey_GamepadLStickRight = 634 # 634
429
+ ImGuiKey_GamepadLStickUp = 635 # 635
430
+ ImGuiKey_GamepadLStickDown = 636 # 636
431
+ ImGuiKey_GamepadRStickLeft = 637 # 637
432
+ ImGuiKey_GamepadRStickRight = 638 # 638
433
+ ImGuiKey_GamepadRStickUp = 639 # 639
434
+ ImGuiKey_GamepadRStickDown = 640 # 640
435
+ ImGuiKey_MouseLeft = 641 # 641
436
+ ImGuiKey_MouseRight = 642 # 642
437
+ ImGuiKey_MouseMiddle = 643 # 643
438
+ ImGuiKey_MouseX1 = 644 # 644
439
+ ImGuiKey_MouseX2 = 645 # 645
440
+ ImGuiKey_MouseWheelX = 646 # 646
441
+ ImGuiKey_MouseWheelY = 647 # 647
442
+ ImGuiKey_ReservedForModCtrl = 648 # 648
443
+ ImGuiKey_ReservedForModShift = 649 # 649
444
+ ImGuiKey_ReservedForModAlt = 650 # 650
445
+ ImGuiKey_ReservedForModSuper = 651 # 651
446
+ ImGuiKey_COUNT = 652 # 652
447
+ ImGuiMod_None = 0 # 0
448
+ ImGuiMod_Ctrl = 4096 # 1 << 12
449
+ ImGuiMod_Shift = 8192 # 1 << 13
450
+ ImGuiMod_Alt = 16384 # 1 << 14
451
+ ImGuiMod_Super = 32768 # 1 << 15
452
+ ImGuiMod_Mask_ = 61440 # 0xF000
453
+ ImGuiMod_Shortcut = 32768 # ImGuiMod_Super
436
454
  ImGuiKey_NamedKey_BEGIN = 512 # 512
437
- ImGuiKey_NamedKey_END = 645 # ImGuiKey_COUNT
438
- ImGuiKey_NamedKey_COUNT = 133 # ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN
439
- ImGuiKey_KeysData_SIZE = 645 # ImGuiKey_COUNT
455
+ ImGuiKey_NamedKey_END = 652 # ImGuiKey_COUNT
456
+ ImGuiKey_NamedKey_COUNT = 140 # ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN
457
+ ImGuiKey_KeysData_SIZE = 652 # ImGuiKey_COUNT
440
458
  ImGuiKey_KeysData_OFFSET = 0 # 0
441
459
 
442
- # ImGuiModFlags_
443
- ImGuiModFlags_None = 0 # 0
444
- ImGuiModFlags_Ctrl = 1 # 1 << 0
445
- ImGuiModFlags_Shift = 2 # 1 << 1
446
- ImGuiModFlags_Alt = 4 # 1 << 2
447
- ImGuiModFlags_Super = 8 # 1 << 3
448
-
449
460
  # ImGuiMouseButton_
450
461
  ImGuiMouseButton_Left = 0 # 0
451
462
  ImGuiMouseButton_Right = 1 # 1
@@ -465,7 +476,7 @@ ImGuiMouseCursor_Hand = 7 # 7
465
476
  ImGuiMouseCursor_NotAllowed = 8 # 8
466
477
  ImGuiMouseCursor_COUNT = 9 # 9
467
478
 
468
- # ImGuiNavInput_
479
+ # ImGuiNavInput
469
480
  ImGuiNavInput_Activate = 0 # 0
470
481
  ImGuiNavInput_Cancel = 1 # 1
471
482
  ImGuiNavInput_Input = 2 # 2
@@ -482,11 +493,7 @@ ImGuiNavInput_FocusPrev = 12 # 12
482
493
  ImGuiNavInput_FocusNext = 13 # 13
483
494
  ImGuiNavInput_TweakSlow = 14 # 14
484
495
  ImGuiNavInput_TweakFast = 15 # 15
485
- ImGuiNavInput_KeyLeft_ = 16 # 16
486
- ImGuiNavInput_KeyRight_ = 17 # 17
487
- ImGuiNavInput_KeyUp_ = 18 # 18
488
- ImGuiNavInput_KeyDown_ = 19 # 19
489
- ImGuiNavInput_COUNT = 20 # 20
496
+ ImGuiNavInput_COUNT = 16 # 16
490
497
 
491
498
  # ImGuiPopupFlags_
492
499
  ImGuiPopupFlags_None = 0 # 0
@@ -1150,6 +1157,10 @@ class ImFontAtlas < FFI::Struct
1150
1157
  ImGui::ImFontAtlas_GetGlyphRangesDefault(self)
1151
1158
  end
1152
1159
 
1160
+ def GetGlyphRangesGreek()
1161
+ ImGui::ImFontAtlas_GetGlyphRangesGreek(self)
1162
+ end
1163
+
1153
1164
  def GetGlyphRangesJapanese()
1154
1165
  ImGui::ImFontAtlas_GetGlyphRangesJapanese(self)
1155
1166
  end
@@ -1350,6 +1361,8 @@ class ImGuiIO < FFI::Struct
1350
1361
  :MouseDragThreshold, :float,
1351
1362
  :KeyRepeatDelay, :float,
1352
1363
  :KeyRepeatRate, :float,
1364
+ :HoverDelayNormal, :float,
1365
+ :HoverDelayShort, :float,
1353
1366
  :UserData, :pointer,
1354
1367
  :Fonts, ImFontAtlas.ptr,
1355
1368
  :FontGlobalScale, :float,
@@ -1360,6 +1373,7 @@ class ImGuiIO < FFI::Struct
1360
1373
  :ConfigMacOSXBehaviors, :bool,
1361
1374
  :ConfigInputTrickleEventQueue, :bool,
1362
1375
  :ConfigInputTextCursorBlink, :bool,
1376
+ :ConfigInputTextEnterKeepActive, :bool,
1363
1377
  :ConfigDragClickToInputText, :bool,
1364
1378
  :ConfigWindowsResizeFromEdges, :bool,
1365
1379
  :ConfigWindowsMoveFromTitleBarOnly, :bool,
@@ -1388,8 +1402,9 @@ class ImGuiIO < FFI::Struct
1388
1402
  :MetricsActiveWindows, :int,
1389
1403
  :MetricsActiveAllocations, :int,
1390
1404
  :MouseDelta, ImVec2.by_value,
1391
- :KeyMap, [:int, 645],
1392
- :KeysDown, [:bool, 645],
1405
+ :KeyMap, [:int, 652],
1406
+ :KeysDown, [:bool, 652],
1407
+ :NavInputs, [:float, 16],
1393
1408
  :MousePos, ImVec2.by_value,
1394
1409
  :MouseDown, [:bool, 5],
1395
1410
  :MouseWheel, :float,
@@ -1398,9 +1413,8 @@ class ImGuiIO < FFI::Struct
1398
1413
  :KeyShift, :bool,
1399
1414
  :KeyAlt, :bool,
1400
1415
  :KeySuper, :bool,
1401
- :NavInputs, [:float, 20],
1402
1416
  :KeyMods, :int,
1403
- :KeysData, [ImGuiKeyData.by_value, 645],
1417
+ :KeysData, [ImGuiKeyData.by_value, 652],
1404
1418
  :WantCaptureMouseUnlessPopupClose, :bool,
1405
1419
  :MousePosPrev, ImVec2.by_value,
1406
1420
  :MouseClickedPos, [ImVec2.by_value, 5],
@@ -1415,8 +1429,6 @@ class ImGuiIO < FFI::Struct
1415
1429
  :MouseDownDuration, [:float, 5],
1416
1430
  :MouseDownDurationPrev, [:float, 5],
1417
1431
  :MouseDragMaxDistanceSqr, [:float, 5],
1418
- :NavInputsDownDuration, [:float, 20],
1419
- :NavInputsDownDurationPrev, [:float, 20],
1420
1432
  :PenPressure, :float,
1421
1433
  :AppFocusLost, :bool,
1422
1434
  :AppAcceptingEvents, :bool,
@@ -1785,6 +1797,7 @@ module ImGui
1785
1797
  :ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon,
1786
1798
  :ImFontAtlas_GetGlyphRangesCyrillic,
1787
1799
  :ImFontAtlas_GetGlyphRangesDefault,
1800
+ :ImFontAtlas_GetGlyphRangesGreek,
1788
1801
  :ImFontAtlas_GetGlyphRangesJapanese,
1789
1802
  :ImFontAtlas_GetGlyphRangesKorean,
1790
1803
  :ImFontAtlas_GetGlyphRangesThai,
@@ -2117,6 +2130,7 @@ module ImGui
2117
2130
  :igSetNextWindowContentSize,
2118
2131
  :igSetNextWindowFocus,
2119
2132
  :igSetNextWindowPos,
2133
+ :igSetNextWindowScroll,
2120
2134
  :igSetNextWindowSize,
2121
2135
  :igSetNextWindowSizeConstraints,
2122
2136
  :igSetScrollFromPosX,
@@ -2286,6 +2300,7 @@ module ImGui
2286
2300
  :ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon => [:pointer],
2287
2301
  :ImFontAtlas_GetGlyphRangesCyrillic => [:pointer],
2288
2302
  :ImFontAtlas_GetGlyphRangesDefault => [:pointer],
2303
+ :ImFontAtlas_GetGlyphRangesGreek => [:pointer],
2289
2304
  :ImFontAtlas_GetGlyphRangesJapanese => [:pointer],
2290
2305
  :ImFontAtlas_GetGlyphRangesKorean => [:pointer],
2291
2306
  :ImFontAtlas_GetGlyphRangesThai => [:pointer],
@@ -2487,7 +2502,7 @@ module ImGui
2487
2502
  :igGetWindowSize => [:pointer],
2488
2503
  :igGetWindowWidth => [],
2489
2504
  :igImage => [:pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec4.by_value, ImVec4.by_value],
2490
- :igImageButton => [:pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, :int, ImVec4.by_value, ImVec4.by_value],
2505
+ :igImageButton => [:pointer, :pointer, ImVec2.by_value, ImVec2.by_value, ImVec2.by_value, ImVec4.by_value, ImVec4.by_value],
2491
2506
  :igIndent => [:float],
2492
2507
  :igInputDouble => [:pointer, :pointer, :double, :double, :pointer, :int],
2493
2508
  :igInputFloat => [:pointer, :pointer, :float, :float, :pointer, :int],
@@ -2618,6 +2633,7 @@ module ImGui
2618
2633
  :igSetNextWindowContentSize => [ImVec2.by_value],
2619
2634
  :igSetNextWindowFocus => [],
2620
2635
  :igSetNextWindowPos => [ImVec2.by_value, :int, ImVec2.by_value],
2636
+ :igSetNextWindowScroll => [ImVec2.by_value],
2621
2637
  :igSetNextWindowSize => [ImVec2.by_value, :int],
2622
2638
  :igSetNextWindowSizeConstraints => [ImVec2.by_value, ImVec2.by_value, :ImGuiSizeCallback, :pointer],
2623
2639
  :igSetScrollFromPosX => [:float, :float],
@@ -2787,6 +2803,7 @@ module ImGui
2787
2803
  :ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon => :pointer,
2788
2804
  :ImFontAtlas_GetGlyphRangesCyrillic => :pointer,
2789
2805
  :ImFontAtlas_GetGlyphRangesDefault => :pointer,
2806
+ :ImFontAtlas_GetGlyphRangesGreek => :pointer,
2790
2807
  :ImFontAtlas_GetGlyphRangesJapanese => :pointer,
2791
2808
  :ImFontAtlas_GetGlyphRangesKorean => :pointer,
2792
2809
  :ImFontAtlas_GetGlyphRangesThai => :pointer,
@@ -3119,6 +3136,7 @@ module ImGui
3119
3136
  :igSetNextWindowContentSize => :void,
3120
3137
  :igSetNextWindowFocus => :void,
3121
3138
  :igSetNextWindowPos => :void,
3139
+ :igSetNextWindowScroll => :void,
3122
3140
  :igSetNextWindowSize => :void,
3123
3141
  :igSetNextWindowSizeConstraints => :void,
3124
3142
  :igSetScrollFromPosX => :void,
@@ -3216,7 +3234,8 @@ module ImGui
3216
3234
  attach_function :ImVector_ImWchar_destroy, :ImVector_ImWchar_destroy, [:pointer], :void
3217
3235
  attach_function :ImVector_ImWchar_Init, :ImVector_ImWchar_destroy, [:pointer], :void
3218
3236
  attach_function :ImVector_ImWchar_UnInit, :ImVector_ImWchar_destroy, [:pointer], :void
3219
- end # self.import_symbols
3237
+
3238
+ @@imgui_import_done = true end # self.import_symbols
3220
3239
 
3221
3240
  # arg: type(const char*), flags(ImGuiDragDropFlags)
3222
3241
  # ret: pointer
@@ -4073,10 +4092,10 @@ module ImGui
4073
4092
  igImage(user_texture_id, size, uv0, uv1, tint_col, border_col)
4074
4093
  end
4075
4094
 
4076
- # arg: user_texture_id(ImTextureID), size(ImVec2), uv0(ImVec2), uv1(ImVec2), frame_padding(int), bg_col(ImVec4), tint_col(ImVec4)
4095
+ # arg: str_id(const char*), user_texture_id(ImTextureID), size(ImVec2), uv0(ImVec2), uv1(ImVec2), bg_col(ImVec4), tint_col(ImVec4)
4077
4096
  # ret: bool
4078
- def self.ImageButton(user_texture_id, size, uv0 = ImVec2.create(0,0), uv1 = ImVec2.create(1,1), frame_padding = -1, bg_col = ImVec4.create(0,0,0,0), tint_col = ImVec4.create(1,1,1,1))
4079
- igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col)
4097
+ def self.ImageButton(str_id, user_texture_id, size, uv0 = ImVec2.create(0,0), uv1 = ImVec2.create(1,1), bg_col = ImVec4.create(0,0,0,0), tint_col = ImVec4.create(1,1,1,1))
4098
+ igImageButton(str_id, user_texture_id, size, uv0, uv1, bg_col, tint_col)
4080
4099
  end
4081
4100
 
4082
4101
  # arg: indent_w(float)
@@ -4828,6 +4847,12 @@ module ImGui
4828
4847
  igSetNextWindowPos(pos, cond, pivot)
4829
4848
  end
4830
4849
 
4850
+ # arg: scroll(ImVec2)
4851
+ # ret: void
4852
+ def self.SetNextWindowScroll(scroll)
4853
+ igSetNextWindowScroll(scroll)
4854
+ end
4855
+
4831
4856
  # arg: size(ImVec2), cond(ImGuiCond)
4832
4857
  # ret: void
4833
4858
  def self.SetNextWindowSize(size, cond = 0)
@@ -5264,7 +5289,7 @@ module ImGui
5264
5289
 
5265
5290
  # arg: ptr_id(const void*)
5266
5291
  # ret: void
5267
- def self.TreePush_Ptr(ptr_id = nil)
5292
+ def self.TreePush_Ptr(ptr_id)
5268
5293
  igTreePush_Ptr(ptr_id)
5269
5294
  end
5270
5295
 
@@ -173,10 +173,10 @@ module ImGui
173
173
 
174
174
  def self.ImGui_ImplGlfw_UpdateKeyModifiers(mods)
175
175
  io = ImGuiIO.new(ImGui::GetIO())
176
- io.AddKeyEvent(ImGuiKey_ModCtrl, (mods & GLFW::MOD_CONTROL) != 0)
177
- io.AddKeyEvent(ImGuiKey_ModShift, (mods & GLFW::MOD_SHIFT) != 0)
178
- io.AddKeyEvent(ImGuiKey_ModAlt, (mods & GLFW::MOD_ALT) != 0)
179
- io.AddKeyEvent(ImGuiKey_ModSuper, (mods & GLFW::MOD_SUPER) != 0)
176
+ io.AddKeyEvent(ImGuiMod_Ctrl, (mods & GLFW::MOD_CONTROL) != 0)
177
+ io.AddKeyEvent(ImGuiMod_Shift, (mods & GLFW::MOD_SHIFT) != 0)
178
+ io.AddKeyEvent(ImGuiMod_Alt, (mods & GLFW::MOD_ALT) != 0)
179
+ io.AddKeyEvent(ImGuiMod_Super, (mods & GLFW::MOD_SUPER) != 0)
180
180
  end
181
181
 
182
182
  @@ImplGlfw_MouseButtonCallback = GLFW::create_callback(:GLFWmousebuttonfun) do |window, button, action, mods|
@@ -260,10 +260,10 @@ module ImGui
260
260
  # [INTERNAL]
261
261
  def self.ImGui_ImplRaylib_UpdateKeyModifiers()
262
262
  io = ImGuiIO.new(ImGui::GetIO())
263
- io.AddKeyEvent(ImGuiKey_ModCtrl, Raylib.IsKeyDown(Raylib::KEY_RIGHT_CONTROL) || Raylib.IsKeyDown(Raylib::KEY_LEFT_CONTROL))
264
- io.AddKeyEvent(ImGuiKey_ModShift, Raylib.IsKeyDown(Raylib::KEY_RIGHT_SHIFT) || Raylib.IsKeyDown(Raylib::KEY_LEFT_SHIFT))
265
- io.AddKeyEvent(ImGuiKey_ModAlt, Raylib.IsKeyDown(Raylib::KEY_RIGHT_ALT) || Raylib.IsKeyDown(Raylib::KEY_LEFT_ALT))
266
- io.AddKeyEvent(ImGuiKey_ModSuper, Raylib.IsKeyDown(Raylib::KEY_RIGHT_SUPER) || Raylib.IsKeyDown(Raylib::KEY_LEFT_SUPER))
263
+ io.AddKeyEvent(ImGuiMod_Ctrl, Raylib.IsKeyDown(Raylib::KEY_RIGHT_CONTROL) || Raylib.IsKeyDown(Raylib::KEY_LEFT_CONTROL))
264
+ io.AddKeyEvent(ImGuiMod_Shift, Raylib.IsKeyDown(Raylib::KEY_RIGHT_SHIFT) || Raylib.IsKeyDown(Raylib::KEY_LEFT_SHIFT))
265
+ io.AddKeyEvent(ImGuiMod_Alt, Raylib.IsKeyDown(Raylib::KEY_RIGHT_ALT) || Raylib.IsKeyDown(Raylib::KEY_LEFT_ALT))
266
+ io.AddKeyEvent(ImGuiMod_Super, Raylib.IsKeyDown(Raylib::KEY_RIGHT_SUPER) || Raylib.IsKeyDown(Raylib::KEY_LEFT_SUPER))
267
267
  end
268
268
 
269
269
  def self.ImplRaylib_ProcessKeyboard()
@@ -170,10 +170,10 @@ module ImGui
170
170
  # [INTERNAL]
171
171
  def self.ImGui_ImplSDL2_UpdateKeyModifiers(sdl_key_mods)
172
172
  io = ImGuiIO.new(ImGui::GetIO())
173
- io.AddKeyEvent(ImGuiKey_ModCtrl, (sdl_key_mods & SDL::KMOD_CTRL) != 0)
174
- io.AddKeyEvent(ImGuiKey_ModShift, (sdl_key_mods & SDL::KMOD_SHIFT) != 0)
175
- io.AddKeyEvent(ImGuiKey_ModAlt, (sdl_key_mods & SDL::KMOD_ALT) != 0)
176
- io.AddKeyEvent(ImGuiKey_ModSuper, (sdl_key_mods & SDL::KMOD_GUI) != 0)
173
+ io.AddKeyEvent(ImGuiMod_Ctrl, (sdl_key_mods & SDL::KMOD_CTRL) != 0)
174
+ io.AddKeyEvent(ImGuiMod_Shift, (sdl_key_mods & SDL::KMOD_SHIFT) != 0)
175
+ io.AddKeyEvent(ImGuiMod_Alt, (sdl_key_mods & SDL::KMOD_ALT) != 0)
176
+ io.AddKeyEvent(ImGuiMod_Super, (sdl_key_mods & SDL::KMOD_GUI) != 0)
177
177
  end
178
178
 
179
179
  # You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
data/lib/imnodes.dll CHANGED
Binary file
data/lib/imnodes.dylib CHANGED
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imgui-bindings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaiorabbit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-14 00:00:00.000000000 Z
11
+ date: 2022-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi