Skip to content

Commit

Permalink
Update the example
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkauzh committed Oct 8, 2023
1 parent 49f1cd7 commit 6da8ede
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,22 @@ import (
func main() {
// Initialize webzen
webzen.Init()

// Start loop
for {
// Fill background
draw.FillBackground([4]int{255, 255, 188, 255})

// Fill background
draw.FillBackground([4]int{255, 255, 188, 255})
// Draw text on the screen
draw.DrawText("Hello under the world!", 21, 100, 100)

// Draw text on the screen
draw.DrawText("Hello under the world!", 21, 100, 100)
// Draw a rectangle on the screen
draw.DrawRect(50, 500, 400, 400, [4]int{146, 255, 123, 255})

// Draw a rectangle on the screen
draw.DrawRect(50, 500, 400, 400, [4]int{146, 255, 123, 255})
// Draw a second rectangle on the screen
draw.DrawRect(200, 200, 100, 400, [4]int{146, 255, 123, 255})

// Draw a second rectangle on the screen
draw.DrawRect(200, 200, 100, 400, [4]int{146, 255, 123, 255})
// Update
webzen.Update()
}
}

0 comments on commit 6da8ede

Please sign in to comment.