1
0
Fork 0

Canvas tooltips: respect position from node

Previous (faulty) behavior was to always set x and y to 1 when non-nil
This commit is contained in:
Gijs de Rooy 2024-01-19 17:22:15 +01:00
parent 12469f2966
commit e61faa738b

View file

@ -248,12 +248,12 @@ var Tooltip = {
showMessage: func(timeout = nil, node = nil) showMessage: func(timeout = nil, node = nil)
{ {
if(var y = me._haveNode(node, 'y') != nil ) { if((var y = me._haveNode(node, 'y')) != nil ) {
me.setInt("y", y); me.setInt("y", y);
} else { } else {
me.setInt("y", getprop('/sim/startup/ysize') * 0.2); me.setInt("y", getprop('/sim/startup/ysize') * 0.2);
} }
if(var x = me._haveNode(node, 'x') != nil) { if((var x = me._haveNode(node, 'x')) != nil) {
me.setInt("x", x); me.setInt("x", x);
} else { } else {
var screenW = getprop('/sim/startup/xsize'); var screenW = getprop('/sim/startup/xsize');