- let Ctrl-g have the same meaning as g (necessary for LMB emulation)
- more cosmetics
This commit is contained in:
parent
4c16eacf96
commit
a571440567
2 changed files with 22 additions and 8 deletions
|
@ -183,6 +183,21 @@
|
|||
</binding>
|
||||
</key>
|
||||
|
||||
<key n="7">
|
||||
<name>Ctrl-G</name>
|
||||
<desc>Gear Up.</desc>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.gearDown(-1)</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>controls.gearDown(0)</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</key>
|
||||
|
||||
<key n="9">
|
||||
<name>Ctrl-I</name>
|
||||
<desc>Show object adjustment dialog</desc>
|
||||
|
|
|
@ -201,7 +201,7 @@ var scan_models = func(base) {
|
|||
if (list == nil)
|
||||
return result;
|
||||
|
||||
var extensions = { ".ac": 1, ".osg": 2, ".xml": 3 }; # priority
|
||||
var ext = { ".ac": 1, ".osg": 2, ".xml": 3 }; # extension priorities
|
||||
var files = {};
|
||||
foreach (var d; list) {
|
||||
if (d[0] == `.` or d == "CVS")
|
||||
|
@ -213,10 +213,10 @@ var scan_models = func(base) {
|
|||
append(result, s);
|
||||
continue;
|
||||
}
|
||||
foreach (var e; keys(extensions)) {
|
||||
foreach (var e; keys(ext)) {
|
||||
if (substr(d, -size(e)) == e) {
|
||||
var basepath = base ~ "/" ~ substr(d, 0, size(d) - size(e));
|
||||
if (!contains(files, basepath) or extensions[e] > extensions[files[basepath]])
|
||||
if (!contains(files, basepath) or ext[e] > ext[files[basepath]])
|
||||
files[basepath] = e;
|
||||
break;
|
||||
}
|
||||
|
@ -811,16 +811,15 @@ var file_selector = nil;
|
|||
|
||||
# called via l-key (load object from disk)
|
||||
var file_select_model = func {
|
||||
if (file_selector == nil) {
|
||||
if (file_selector == nil)
|
||||
file_selector = gui.FileSelector.new(fsel_callback,
|
||||
"Select 3D model file", "Load Model",
|
||||
["*.ac", "*.osg", "*.xml"], getprop("/sim/fg-root"));
|
||||
}
|
||||
file_selector.open();
|
||||
}
|
||||
|
||||
var fsel_callback = func {
|
||||
var model = cmdarg().getValue();
|
||||
var fsel_callback = func(n) {
|
||||
var model = n.getValue();
|
||||
var root = string.fixpath(getprop("/sim/fg-root")) ~ "/";
|
||||
if (substr(model, 0, size(root)) == root)
|
||||
model = substr(model, size(root));
|
||||
|
|
Loading…
Add table
Reference in a new issue