Update examples

This commit is contained in:
Milan Nikolic 2022-12-04 13:20:26 +01:00
parent ab3ade6210
commit 317e9eea6a
No known key found for this signature in database
GPG key ID: 9229D0EAA3AA4E75
3 changed files with 11 additions and 8 deletions

View file

@ -1,14 +1,15 @@
package main
import (
"github.com/gen2brain/raylib-go/raylib"
"log"
rl "github.com/gen2brain/raylib-go/raylib"
)
func main() {
rl.SetTraceLogCallback(func(logType int, str string) {
level := ""
switch logType {
switch rl.TraceLogLevel(logType) {
case rl.LogDebug:
level = "Debug"
case rl.LogError:
@ -22,7 +23,7 @@ func main() {
case rl.LogFatal:
level = "Fatal"
}
if logType != rl.LogFatal {
if rl.TraceLogLevel(logType) != rl.LogFatal {
log.Printf("%s - %s", level, str)
} else {
log.Fatalf("%s - %s", level, str)