package main import ( "image/color" "tetris/assets" "tetris/engine/graphics" "tetris/engine/render" "tetris/game/draw" rl "github.com/gen2brain/raylib-go/raylib" ) func main() { render.Init(render.Config{ Title: "Tetris", WindowWidth: 685, WindowHeight: 600, RenderWidth: 685, RenderHeight: 600, ScaleFlags: render.SCALE_INTEGER, }) defer render.Exit() // Load texture texture := graphics.LoadTextureFromMemory(".png", assets.Sprite) defer rl.UnloadTexture(texture) render.SetTexture(texture) render.SetFont(&assets.Font) r := draw.Renderer{ Theme: &draw.Theme{ FrameBG: color.RGBA{R: 30, G: 30, B: 46, A: 255}, FrameBorder: color.RGBA{R: 242, G: 205, B: 205, A: 255}, TextHeader: color.RGBA{R: 242, G: 205, B: 205, A: 255}, Text: color.RGBA{R: 205, G: 214, B: 244, A: 255}, GridBackground: color.RGBA{R: 17, G: 17, B: 27, A: 255}, }, } for !rl.WindowShouldClose() { render.Begin(r.Theme.GridBackground) r.DrawGrid(rl.RectangleInt32{ X: 25, Y: 25, Width: 10, Height: 16, }) r.DrawFrame(rl.RectangleInt32{X: 400, Y: 25, Width: 250, Height: 100}) r.DrawHeaderText(410, 30, "Score") r.DrawText(410, 65, "999999") r.DrawFrame(rl.RectangleInt32{X: 400, Y: 150, Width: 250, Height: 200}) render.End() } }