-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli.lua
21 lines (18 loc) · 813 Bytes
/
cli.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
local argparse = require 'argparse'
local parser = argparse()
parser:flag '-v --version':action(function()
print('Sound Maker version ' .. VERSION)
os.exit()
end)
parser:flag '--moonscript' :default(false):hidden(true)
parser:flag('--hint-overlay', 'Show a text overlay with some hotkeys (default)')
parser:flag(
'--no-hint-overlay',
'Don\'t show the text overlay'
):target'hint_overlay':default(true):action 'store_false'
parser:group('Display options',
parser:option('--display', 'Which monitor to open on (1 is primary)'):default '1':convert(tonumber),
parser:flag('--vsync', 'Enable screen vsync (default)'):target'vsync':action 'store_true',
parser:flag('--no-vsync', 'Disable screen vsync'):target'vsync':default(true):action 'store_false'
)
option = parser:parse(love.arg.parseGameArguments(arg))