diff options
| author | jussi | 2022-02-20 20:37:39 +0200 |
|---|---|---|
| committer | jussi | 2022-02-20 20:37:39 +0200 |
| commit | 8182a5f1b6c61bdf95d32a4ad102e1762f0d0924 (patch) | |
| tree | dea5baa7433161c1eb00277ae186b99fee940a1f /examples | |
| parent | 6e4fdd3b3ae4e4656e151f098c40cfe551a36e8c (diff) | |
| download | reilua-enhanced-8182a5f1b6c61bdf95d32a4ad102e1762f0d0924.tar.gz reilua-enhanced-8182a5f1b6c61bdf95d32a4ad102e1762f0d0924.tar.bz2 reilua-enhanced-8182a5f1b6c61bdf95d32a4ad102e1762f0d0924.zip | |
Documentation and better cmakelist.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/window/main.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/window/main.lua b/examples/window/main.lua new file mode 100644 index 0000000..d49d96a --- /dev/null +++ b/examples/window/main.lua @@ -0,0 +1,23 @@ +local textColor = BLACK +local textPos = { 192, 200 } + +function init() + RL_SetWindowTitle( "First window" ) +end + +function process( delta ) + if RL_IsKeyPressed( KEY_ENTER ) then + textColor = BLUE + textPos = { 230, 230 } + end + + if RL_IsKeyPressed( KEY_SPACE ) then + textColor = BLACK + textPos = { 192, 200 } + end +end + +function draw() + RL_ClearBackground( RAYWHITE ); + RL_DrawText( 0, "Congrats! You created your first window!", textPos, 20, 2, textColor ); +end |
