I actually just forgotten

This commit is contained in:
Michał Gdula 2024-01-11 00:17:29 +00:00
parent 1b05e0364b
commit 9225fd428a
6 changed files with 64 additions and 6 deletions

View file

@ -9,10 +9,12 @@ import (
func Title() {
var (
titleText = "Example Game"
)
titleText = application.WindowTitle
mapImage = raylib.LoadTexture(application.DirAssets + "Map.png")
// load resources here
mapX = 0
mapY = 0
)
for !application.ShouldQuit {
application.ShouldQuit = raylib.WindowShouldClose()
@ -36,8 +38,26 @@ func Title() {
application.ShouldQuit = true
}
// Map thing?
raylib.DrawRectangleLines(120, 39, application.WindowWidth-130, application.WindowHeight-49, raylib.White)
raylib.BeginScissorMode(121, 40, application.WindowWidth-132, application.WindowHeight-51)
mapX += 1
mapX = 0
mapY = 0
if mapX > 1920 {
mapX = 0
}
mapY += 1
if mapY > 1080 {
mapY = 0
}
raylib.DrawTexture(mapImage, int32(-mapX), int32(-mapY), raylib.White)
raylib.EndScissorMode()
raylib.EndDrawing()
}
// unload resources here
raylib.UnloadTexture(mapImage)
}