summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/require/UI.lua
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2024-07-08 13:56:46 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2024-07-08 13:56:46 +0300
commitb27606feca00172cdfd7467ff3e216824f1c9518 (patch)
tree975fae99f92b6deffd0c186595b3f2202853c973 /indra/newview/scripts/lua/require/UI.lua
parent66fb45ddc7dd1a994f6b8312687cb73dbb1281dd (diff)
Lua api for Snapshot and demo script
Diffstat (limited to 'indra/newview/scripts/lua/require/UI.lua')
-rw-r--r--indra/newview/scripts/lua/require/UI.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/require/UI.lua b/indra/newview/scripts/lua/require/UI.lua
index eb1a4017c7..8fcc446e09 100644
--- a/indra/newview/scripts/lua/require/UI.lua
+++ b/indra/newview/scripts/lua/require/UI.lua
@@ -122,4 +122,19 @@ function UI.type(...)
end
end
+-- ***************************************************************************
+-- Snapshot
+-- ***************************************************************************
+-- UI.snapshot{filename=filename -- extension may be specified: bmp, jpeg, png
+-- [, type='COLOR' | 'DEPTH']
+-- [, width=width][, height=height] -- uses current window size if not specified
+-- [, showui=true][, showhud=true]
+-- [, rebuild=false]}
+function UI.snapshot(...)
+ local args = mapargs('filename,width,height,showui,showhud,rebuild,type', ...)
+ leap.request('LLViewerWindow', {op='saveSnapshot', filename = args.filename,
+ width=args.width, height=args.height,
+ showui=args.showui, showhud=args.showhud,
+ rebuild=args.rebuild, type=args.type})
+end
return UI