Skip to content

Commit

Permalink
add lgl example
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtyomKingmang committed Jun 4, 2024
1 parent 27c3c8a commit d870a4b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions examples/lgl/handler.lzr
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using "lgl"

window = lgl.createFrame("Test Frame", 500, 500)


window.setFill(Color.rgb(100,100,200))

func drawRect() = window.rect(100,100,50,50)


Event.Handler(Event.KEY_PRESSED, func(e) {
if (e.code == KeyCode.C) {
window.setFill(Color.rgb(100,100,200))
drawRect()
}
if (e.code == KeyCode.X){
window.setFill(Color.rgb(200,100,200))
drawRect()
}
})

0 comments on commit d870a4b

Please sign in to comment.