The fgcommand show-message is not documented anywhere I could find.
How do I set transparency and position?
Philosopher wrote:Hmm, I don't think it's possible to show two popupTips simultaneously (AFAIK, I could be wrong). However, you could (try and) look at Nasal/canvas/tooltip.nas and create your own Tooltips (basically you can look at that and Nasal/gui.nas for examples based on gui.popupTip and go from there; warning, it might be hard ). Those will allow custom repositioning, and might fit your needs better anyways.
fgcommand("show-message", props.Node.new({ label: label, delay:delay, x: position.x, y: position.y }));
if(node != nil and node.getNode('y') != nil and num(node.getNode('y').getValue()) != nil)
var haveNode = func(node, key) {
if(node == nil ) return nil;
var n = node.getNode(key);
(if n == nil) return nil;
var value = num(n.getValue() );
return value;
}
if(var y = haveNode(node, 'y') != nil ) {
me.setInt("y", y);
} else {
me.setInt("y", getprop('/sim/startup/ysize') * 0.2);
}
if(var x = haveNode(node, 'x') != nil) {
me.setInt("x", x);
} else {
var screenW = getprop('/sim/startup/xsize');
me.setInt("x", (screenW - me._width) * 0.5);
}
Hooray wrote in Tue Dec 16, 2014 7:29 pm:
- Code: Select all
fgcommand("show-message", props.Node.new({ label: label, delay:delay, x: position.x, y: position.y }));
Hooray wrote in Tue Dec 16, 2014 7:29 pm:You can also simplify your conditional by factoring out the logic into a helper function, e.g. instead of using this twice:
Users browsing this forum: No registered users and 1 guest