Update C sources, add new functions and rename package to

This commit is contained in:
Milan Nikolic 2018-10-08 18:56:34 +02:00
parent 391c25482d
commit 08aa518a46
156 changed files with 34542 additions and 19573 deletions

View file

@ -10,27 +10,27 @@ func main() {
screenWidth := int32(800)
screenHeight := int32(450)
raylib.InitWindow(screenWidth, screenHeight, "raylib [core] example - mouse wheel")
rl.InitWindow(screenWidth, screenHeight, "raylib [core] example - mouse wheel")
boxPositionY := screenHeight/2 - 40
scrollSpeed := int32(4) // Scrolling speed in pixels
raylib.SetTargetFPS(60)
rl.SetTargetFPS(60)
for !raylib.WindowShouldClose() {
boxPositionY -= raylib.GetMouseWheelMove() * scrollSpeed
for !rl.WindowShouldClose() {
boxPositionY -= rl.GetMouseWheelMove() * scrollSpeed
raylib.BeginDrawing()
rl.BeginDrawing()
raylib.ClearBackground(raylib.RayWhite)
rl.ClearBackground(rl.RayWhite)
raylib.DrawRectangle(screenWidth/2-40, boxPositionY, 80, 80, raylib.Maroon)
rl.DrawRectangle(screenWidth/2-40, boxPositionY, 80, 80, rl.Maroon)
raylib.DrawText("Use mouse wheel to move the square up and down!", 10, 10, 20, raylib.Gray)
raylib.DrawText(fmt.Sprintf("Box position Y: %d", boxPositionY), 10, 40, 20, raylib.LightGray)
rl.DrawText("Use mouse wheel to move the cube up and down!", 10, 10, 20, rl.Gray)
rl.DrawText(fmt.Sprintf("Box position Y: %d", boxPositionY), 10, 40, 20, rl.LightGray)
raylib.EndDrawing()
rl.EndDrawing()
}
raylib.CloseWindow()
rl.CloseWindow()
}