aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflysand7 <yyakut.ac@gmail.com>2023-11-05 14:58:27 +1100
committerflysand7 <yyakut.ac@gmail.com>2023-11-05 15:03:08 +1100
commitd400a5a108b348952a4d74b2e8f0a4c19c504025 (patch)
tree32c8999c95bd3bd5c6c822d5c26c1ecef59ecea7
parente206d6ba35796e2aab97c7741dc52d44317350c1 (diff)
[vendor/raylib]: Add pre-compiled libraries on linux; Minor changes in bindings
-rw-r--r--vendor/raylib/linux/libraygui.abin0 -> 122858 bytes
-rwxr-xr-xvendor/raylib/linux/libraygui.so.3.6bin0 -> 90584 bytes
-rw-r--r--vendor/raylib/raygui.odin29
3 files changed, 8 insertions, 21 deletions
diff --git a/vendor/raylib/linux/libraygui.a b/vendor/raylib/linux/libraygui.a
new file mode 100644
index 000000000..1e0ea9e2f
--- /dev/null
+++ b/vendor/raylib/linux/libraygui.a
Binary files differ
diff --git a/vendor/raylib/linux/libraygui.so.3.6 b/vendor/raylib/linux/libraygui.so.3.6
new file mode 100755
index 000000000..ed31f6b98
--- /dev/null
+++ b/vendor/raylib/linux/libraygui.so.3.6
Binary files differ
diff --git a/vendor/raylib/raygui.odin b/vendor/raylib/raygui.odin
index 04e11407a..80c6cb265 100644
--- a/vendor/raylib/raygui.odin
+++ b/vendor/raylib/raygui.odin
@@ -16,23 +16,9 @@ when ODIN_OS == .Windows {
}
} else when ODIN_OS == .Linux {
when RAYGUI_SHARED {
- // Note(bumbread): can't panic here, because the users might be expecting to
- // only use raylib. Let's have them get the error at link-time instead..
- //#panic("Cannot link libraygui.so: not in the vendor collection")
- // Note(bumbread): unless we import something the rest of the bindings will
- // make a compile-time error. This is a bit ugly for now, but in the future
- // raygui probably needs to be in a separate package.
- foreign import lib {"_"}
+ foreign import lib "linux/libraygui.so"
} else {
- // #panic("Cannot link libraygui.a: not in the vendor collection")
- // TODO(bumbread): apparently this one was missing. This might need
- // to get rebuilt for linux
- // foreign import lib {
- // "linux/libraygui.a",
- // // "system:dl",
- // // "system:pthread",
- // }
- foreign import lib {"_"}
+ foreign import lib "linux/libraygui.a"
}
} else when ODIN_OS == .Darwin {
when ODIN_ARCH == .arm64 {
@@ -238,6 +224,7 @@ SCROLLBAR_RIGHT_SIDE :: 1
@(default_calling_convention="c")
foreign lib {
+ @(link_name="raylib_version") version: cstring
// Global gui state control functions
GuiEnable :: proc() --- // Enable gui controls (global state)
@@ -293,17 +280,17 @@ foreign lib {
// Basic controls set
GuiLabel :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Label control, shows text
- GuiButton :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Button control, returns true when clicked
- GuiLabelButton :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Label button control, show true when clicked
+ GuiButton :: proc(bounds: Rectangle, text: cstring) -> bool --- // Button control, returns true when clicked
+ GuiLabelButton :: proc(bounds: Rectangle, text: cstring) -> bool --- // Label button control, show true when clicked
GuiToggle :: proc(bounds: Rectangle, text: cstring, active: ^bool) -> c.int --- // Toggle Button control, returns true when active
GuiToggleGroup :: proc(bounds: Rectangle, text: cstring, active: ^c.int) -> c.int --- // Toggle Group control, returns active toggle index
- GuiCheckBox :: proc(bounds: Rectangle, text: cstring, checked: ^bool) -> c.int --- // Check Box control, returns true when active
+ GuiCheckBox :: proc(bounds: Rectangle, text: cstring, checked: ^bool) -> bool --- // Check Box control, returns true when active
GuiComboBox :: proc(bounds: Rectangle, text: cstring, active: ^c.int) -> c.int --- // Combo Box control, returns selected item index
- GuiDropdownBox :: proc(bounds: Rectangle, text: cstring, active: ^c.int, editMode: bool) -> c.int --- // Dropdown Box control, returns selected item
+ GuiDropdownBox :: proc(bounds: Rectangle, text: cstring, active: ^c.int, editMode: bool) -> bool --- // Dropdown Box control, returns selected item
GuiSpinner :: proc(bounds: Rectangle, text: cstring, value: ^c.int, minValue, maxValue: c.int, editMode: bool) -> c.int --- // Spinner control, returns selected value
GuiValueBox :: proc(bounds: Rectangle, text: cstring, value: ^c.int, minValue, maxValue: c.int, editMode: bool) -> c.int --- // Value Box control, updates input text with numbers
- GuiTextBox :: proc(bounds: Rectangle, text: cstring, textSize: c.int, editMode: bool) -> c.int --- // Text Box control, updates input text
+ GuiTextBox :: proc(bounds: Rectangle, text: cstring, textSize: c.int, editMode: bool) -> bool --- // Text Box control, updates input text
GuiSlider :: proc(bounds: Rectangle, textLeft: cstring, textRight: cstring, value: ^f32, minValue: f32, maxValue: f32) -> c.int --- // Slider control, returns selected value
GuiSliderBar :: proc(bounds: Rectangle, textLeft: cstring, textRight: cstring, value: ^f32, minValue: f32, maxValue: f32) -> c.int --- // Slider Bar control, returns selected value