summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2024-07-10 12:03:49 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2024-07-10 12:03:49 +0300
commit98761798b9a118c46e5482b1f36fef1260c9c5f9 (patch)
tree101de52bbbc548d61e864e86347decc4ad503916
parent2620b8038acc7c36aeaf3f2f7c0ded041f13497c (diff)
Simplify passing keys to leap.request
-rw-r--r--indra/newview/llviewerwindowlistener.cpp4
-rw-r--r--indra/newview/scripts/lua/require/UI.lua6
2 files changed, 4 insertions, 6 deletions
diff --git a/indra/newview/llviewerwindowlistener.cpp b/indra/newview/llviewerwindowlistener.cpp
index cba4fbc391..52f413792a 100644
--- a/indra/newview/llviewerwindowlistener.cpp
+++ b/indra/newview/llviewerwindowlistener.cpp
@@ -47,9 +47,9 @@ LLViewerWindowListener::LLViewerWindowListener(LLViewerWindow* llviewerwindow):
"Save screenshot: [\"filename\"] (extension may be specified: bmp, jpeg, png)\n"
"[\"width\"], [\"height\"], [\"showui\"], [\"showhud\"], [\"rebuild\"], [\"type\"]\n"
"type: \"COLOR\", \"DEPTH\"\n"
- "Post on [\"reply\"] an event containing [\"ok\"]",
+ "Post on [\"reply\"] an event containing [\"result\"]",
&LLViewerWindowListener::saveSnapshot,
- llsd::map("filename", LLSD(), "reply", LLSD()));
+ llsd::map("filename", LLSD::String(), "reply", LLSD()));
add("requestReshape",
"Resize the window: [\"w\"], [\"h\"]",
&LLViewerWindowListener::requestReshape);
diff --git a/indra/newview/scripts/lua/require/UI.lua b/indra/newview/scripts/lua/require/UI.lua
index 8fcc446e09..1eee4657f4 100644
--- a/indra/newview/scripts/lua/require/UI.lua
+++ b/indra/newview/scripts/lua/require/UI.lua
@@ -132,9 +132,7 @@ end
-- [, 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})
+ args.op = 'saveSnapshot'
+ return leap.request('LLViewerWindow', args).result
end
return UI