raylib-bindings 0.5.2 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
data/lib/raygui.x86_64.so CHANGED
Binary file
@@ -0,0 +1,28 @@
1
+ # Yet another raylib wrapper for Ruby
2
+ #
3
+ # * https://github.com/vaiorabbit/raylib-bindings
4
+
5
+ require 'ffi'
6
+
7
+ module Raylib
8
+
9
+ def RGuiButton(bounds, text)
10
+ result = GuiButton(bounds, text)
11
+ return result == 1
12
+ end
13
+
14
+ def RGuiSliderBar(bounds, textLeft, textRight, value, minValue, maxValue)
15
+ value_buf = FFI::MemoryPointer.new(:float, 1)
16
+ value_buf.put_float(0, value)
17
+ result = GuiSliderBar(bounds, textLeft, textRight, value_buf, minValue, maxValue)
18
+ return value_buf.read_float
19
+ end
20
+
21
+ def RGuiCheckBox(bounds, text, checked)
22
+ checked_buf = FFI::MemoryPointer.new(:bool, 1)
23
+ checked_buf.put(:bool, 0, checked)
24
+ result = GuiCheckBox(bounds, text, checked_buf)
25
+ return checked_buf.get(:bool, 0)
26
+ end
27
+
28
+ end