aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2025-09-14 10:12:56 +0000
committers-ol <s+removethis@s-ol.nu>2025-09-14 15:36:31 +0000
commitc18a39b1a8dabe7a7606b2e797d23b9920f7275c (patch)
treedd7aa396d74979fff7d45843ff19621260fc3986
parentde/fn, loop parameter lists use square brackets (diff)
downloadalive-c18a39b1a8dabe7a7606b2e797d23b9920f7275c.tar.gz
alive-c18a39b1a8dabe7a7606b2e797d23b9920f7275c.zip
lib/love: set and get window size
-rw-r--r--alv-lib/love.moon14
1 files changed, 14 insertions, 0 deletions
diff --git a/alv-lib/love.moon b/alv-lib/love.moon
index d4d198d..39434d4 100644
--- a/alv-lib/love.moon
+++ b/alv-lib/love.moon
@@ -47,6 +47,18 @@ draw = Constant.meta
destroy: =>
COPILOT.drawlist[@state] = nil
+window_mode = Constant.meta
+ meta:
+ name: 'window-mode'
+ summary: "set the love2d swagger."
+ examples: { '(love/window-mode width height [flags])' }
+
+ value: class extends PureOp
+ pattern: any.num + any.num + -any!
+ tick: =>
+ { width, height, flags } = @unwrap_all!
+ love.window.setMode width, height, flags
+
tsv_output = Constant.meta
meta:
name: 'tsv-output'
@@ -571,6 +583,7 @@ macro [->>][]:
value:
:draw
+ 'window-mode': window_mode
'no-shape': no_shape
:font
@@ -590,3 +603,4 @@ macro [->>][]:
'key-presses': key_presses
'key-releases': key_releases
'key-down?': key_down
+ 'window-size': window_size