This commit is contained in:
Konstantin8105 2022-11-22 18:50:35 +03:00
parent 0bec81c656
commit fe6d2c0ed3
190 changed files with 104835 additions and 5 deletions

View file

@ -8,8 +8,7 @@ package rl
import "C"
import (
"unsafe"
"fmt"
"unsafe"
)
// int GuiToggleGroup(Rectangle bounds, const char *text, int active)
@ -23,11 +22,9 @@ func ToggleGroup(bounds Rectangle, text string, active int) int {
defer C.free(unsafe.Pointer(ctext))
cactive := C.int(active)
res := C.GuiToggleGroup(cbounds, ctext, cactive)
fmt.Printf(">%v %v<", active, res)
return int(res)
}
// bool GuiButton(Rectangle bounds, const char *text)
func Button(bounds Rectangle, text string) bool {
var cbounds C.struct_Rectangle
@ -38,6 +35,5 @@ func Button(bounds Rectangle, text string) bool {
ctext := C.CString(text)
defer C.free(unsafe.Pointer(ctext))
res := C.GuiButton(cbounds, ctext)
fmt.Printf(">%v<", res)
return bool(res)
}