Improve GUI on Android, add OpenAsset function
This commit is contained in:
parent
8fc94a8d3d
commit
56debbf236
7 changed files with 181 additions and 109 deletions
|
@ -7,7 +7,12 @@ package raylib
|
|||
#include <stdlib.h>
|
||||
*/
|
||||
import "C"
|
||||
import "unsafe"
|
||||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// Initialize Window and OpenGL Graphics
|
||||
func InitWindow(width int32, height int32, title string) {
|
||||
|
@ -70,3 +75,12 @@ func GetDroppedFiles(count *int32) []string {
|
|||
func ClearDroppedFiles() {
|
||||
C.ClearDroppedFiles()
|
||||
}
|
||||
|
||||
// Open asset
|
||||
func OpenAsset(name string) (io.ReadCloser, error) {
|
||||
f, err := os.Open(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return f, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue