diff options
| author | jussi | 2024-11-21 23:25:28 +0200 |
|---|---|---|
| committer | jussi | 2024-11-21 23:25:28 +0200 |
| commit | c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d (patch) | |
| tree | dfd26a87fb2b2f702f77728b98a1e6c193684631 /examples/draw_textured_polygon/main.lua | |
| parent | d96e33bb1772c28f630de32e09201c0cdea6f896 (diff) | |
| download | reilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.tar.gz reilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.tar.bz2 reilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.zip | |
RL.config and InitWindow.
Diffstat (limited to 'examples/draw_textured_polygon/main.lua')
| -rw-r--r-- | examples/draw_textured_polygon/main.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/draw_textured_polygon/main.lua b/examples/draw_textured_polygon/main.lua index ddf5efc..c96e900 100644 --- a/examples/draw_textured_polygon/main.lua +++ b/examples/draw_textured_polygon/main.lua @@ -4,11 +4,7 @@ package.path = package.path..";"..RL.GetBasePath().."../resources/lib/?.lua" Vec2 = require( "vector2" ) -local monitor = 0 -local mPos = Vec2:newT( RL.GetMonitorPosition( monitor ) ) -local mSize = Vec2:newT( RL.GetMonitorSize( monitor ) ) -local winSize = Vec2:newT( RL.GetScreenSize() ) - +local winSize = Vec2:new() local polygon = { texture = -1, texcoords = { @@ -30,6 +26,11 @@ local polygon = { } function RL.init() + local monitor = 0 + local mPos = Vec2:newT( RL.GetMonitorPosition( monitor ) ) + local mSize = Vec2:newT( RL.GetMonitorSize( monitor ) ) + winSize = Vec2:newT( RL.GetScreenSize() ) + RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) RL.SetWindowState( RL.FLAG_VSYNC_HINT ) RL.SetWindowPosition( { mPos.x + mSize.x / 2 - winSize.x / 2, mPos.y + mSize.y / 2 - winSize.y / 2 } ) |
