summaryrefslogtreecommitdiffstatshomepage
path: root/docs/luaengine.md
diff options
context:
space:
mode:
author Jeffrey Clark <dude@zaplabs.com>2016-02-15 23:51:18 -0600
committer Jeffrey Clark <dude@zaplabs.com>2016-02-16 15:28:46 -0600
commitbacced3c81c010fb096f1df5cace1452a8132585 (patch)
tree5024ecc0d31986712db1a3c26be51c9927bb72d5 /docs/luaengine.md
parent11f82be5400b274bc624b520f045dbc573182fe8 (diff)
lua api: cleanup options handling and fix cheat state return value (nw)
Diffstat (limited to 'docs/luaengine.md')
-rw-r--r--docs/luaengine.md25
1 files changed, 19 insertions, 6 deletions
diff --git a/docs/luaengine.md b/docs/luaengine.md
index ff79f46c21c..223a421cc27 100644
--- a/docs/luaengine.md
+++ b/docs/luaengine.md
@@ -156,10 +156,12 @@ program
41
```
-manager:machine().options[]
+manager:options()
+manager:machine():options()
+manager:machine():ui():options()
```
-> opts = manager:machine().options
-> for k, entry in pairs(opts) do print(string.format("%10s: %s\n%11s %s", k, entry:value(), "", entry:description())) end
+> opts = manager:machine():options()
+> for k, entry in pairs(opts.entries) do print(string.format("%10s: %s\n%11s %s", k, entry:value(), "", entry:description())) end
diff_directory: diff
directory to save hard drive image differeVnce files
joystick_contradictory: false
@@ -169,9 +171,20 @@ joystick_contradictory: false
oslog: false
output error.log data to the system debugger
[...]
-> print(opts["sleep"]:value())
+> print(opts.entries["sleep"]:value())
true
-> print(opts["sleep"]:value("invalid"))
-Illegal boolean value for sleep: "invalid"; reverting to 0
+> print(opts.entries["sleep"]:value("invalid"))
+Illegal boolean value for sleep: "invalid"; reverting to 1
+true
+> print(opts.entries["sleep"]:value(false))
false
```
+
+individual screen snapshots
+```
+> local screen = manager:machine().screens[":screen"]
+> screen:snapshot()
+saved snap/gridlee/0000.png
+> screen:snapshot('%g.png')
+saved snap/gridlee.png
+```