FlightGear Newsletter February 2015: Difference between revisions

Jump to navigation Jump to search
Tooltips section
mNo edit summary
(Tooltips section)
Line 8: Line 8:
[[#ALS Volumetric Grass|ALS Volumetric Grass]]<br/>
[[#ALS Volumetric Grass|ALS Volumetric Grass]]<br/>
[[#PagedLOD for AI models|PagedLOD for AI models]]<br/>
[[#PagedLOD for AI models|PagedLOD for AI models]]<br/>
[[#Tooltips can now be positioned|Tooltips can now be positioned]]<br/>
  | valign="top" width="33%" |
  | valign="top" width="33%" |
{{Newsletter-cover-header|In the hanger}}<br/>
{{Newsletter-cover-header|In the hanger}}<br/>
Line 63: Line 64:
}}</small>
}}</small>


=== Popup tips can now be positioned ===
=== Tooltips can now be positioned ===
Thanks to some work by {{usr|Necolatis}}, [[Tooltips]] can now positioned at a specific place on-screen.


Popup tips can now be positioned on the screen.
New syntax:
<syntaxhighlight lang="nasal">
gui.popupTip(label[, timeout[, override[, position]]]);
</syntaxhighlight>
 
'''position''' must be a hash, consisting of either a <code>y</code> and/or <code>x</code> value.


Some examples:
Some examples:
<syntaxhighlight lang="nasal">
<syntaxhighlight lang="nasal">
#Show readme at position 10, 10
# Show "readme" at position 10, 10
gui.popupTip("readme", nil, nil, {y: 10, x: 10});
gui.popupTip("readme", nil, nil, { y: 10, x: 10 });


#Show readme at position y=10, with 2 second delay
# Show "readme" at position y = 10, with 2 second delay
gui.popupTip("readme", 2, nil, {y: 10});
gui.popupTip("readme", 2, nil, { y: 10 });


#Show readme at position x=10, y at default position
# Show "readme" at position x = 10, y at default position
gui.popupTip("readme", nil, nil, {x: 10});
gui.popupTip("readme", nil, nil, { x: 10 });


#Show readme at position 10, 10, with 10 second delay
# Show "readme" at position 10, 10, with 10 second delay
gui.popupTip("readme", 10, nil, {"y": 10, "x": 10});
gui.popupTip("readme", 10, nil, { y: 10, x: 10 });
</syntaxhighlight>
</syntaxhighlight>


Navigation menu