The screen-capture command no longer pops up a dialog, so toss up a tip
from within the F3 keybaord handler instead.
This commit is contained in:
parent
0fcdafe2aa
commit
30502189d8
2 changed files with 13 additions and 5 deletions
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
isa = func {
|
||||
obj = arg[0]; class = arg[1];
|
||||
if(!contains(obj, "parents")) { return 0; }
|
||||
if(obj == nil or !contains(obj, "parents")) { return 0; }
|
||||
foreach(c; obj.parents) {
|
||||
if(c == class) { return 1; }
|
||||
elsif(isa(obj, c)) { return 1; }
|
||||
|
@ -19,9 +19,9 @@ isa = func {
|
|||
# string, in which case it specifies a path in the global property
|
||||
# tree.
|
||||
#
|
||||
fgcommand = func {
|
||||
if(isa(arg[1], props.Node)) { arg[1] = arg[1]._g }
|
||||
_fgcommand(arg[0], arg[1]);
|
||||
fgcommand = func(cmd, node=nil) {
|
||||
if(isa(node, props.Node)) node = node._g;
|
||||
_fgcommand(cmd, node);
|
||||
}
|
||||
|
||||
##
|
||||
|
|
10
keyboard.xml
10
keyboard.xml
|
@ -981,7 +981,15 @@ calculated by adding 256 to the GLUT key value in glut.h.
|
|||
<name>F3</name>
|
||||
<desc>Capture screen.</desc>
|
||||
<binding>
|
||||
<command>screen-capture</command>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
fgcommand("screen-capture");
|
||||
var file = getprop("/sim/last-screenshot");
|
||||
if(file == "")
|
||||
gui.popupTip("Error writing screenshot");
|
||||
else
|
||||
gui.popupTip("Screenshot written to " ~ file);
|
||||
</script>
|
||||
</binding>
|
||||
<mod-shift>
|
||||
<desc>Load panel.</desc>
|
||||
|
|
Loading…
Reference in a new issue