Remove example
This commit is contained in:
parent
6630170a3b
commit
b027cb19bd
2 changed files with 0 additions and 56 deletions
|
@ -1,46 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/gen2brain/raylib-go/raylib"
|
||||
"log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
rl.SetTraceLogCallback(func(logType int, str string) {
|
||||
level := ""
|
||||
switch logType {
|
||||
case rl.LogDebug:
|
||||
level = "Debug"
|
||||
case rl.LogError:
|
||||
level = "Error"
|
||||
case rl.LogInfo:
|
||||
level = "Info"
|
||||
case rl.LogTrace:
|
||||
level = "Trace"
|
||||
case rl.LogWarning:
|
||||
level = "Warning"
|
||||
case rl.LogFatal:
|
||||
level = "Fatal"
|
||||
}
|
||||
if logType != rl.LogFatal {
|
||||
log.Printf("%s - %s", level, str)
|
||||
} else {
|
||||
log.Fatalf("%s - %s", level, str)
|
||||
}
|
||||
})
|
||||
|
||||
rl.SetConfigFlags(rl.FlagVsyncHint)
|
||||
rl.InitWindow(800, 450, "raylib [utils] example - SetTraceLogCallback")
|
||||
|
||||
for !rl.WindowShouldClose() {
|
||||
rl.BeginDrawing()
|
||||
|
||||
rl.ClearBackground(rl.RayWhite)
|
||||
|
||||
rl.DrawText("The raylib trace log is controlled in GO!", 190, 200, 20, rl.LightGray)
|
||||
|
||||
rl.EndDrawing()
|
||||
}
|
||||
|
||||
rl.CloseWindow()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue