1
0
Fork 0

Use Tooltip instead of PUI dialog for gui.popupTip.

Hopefully everything works as expected, seems to for the cases I know about (changing view / FoV / visibility).
This commit is contained in:
James Turner 2013-03-16 12:47:51 +00:00
parent 29438e1e7d
commit 4f66ca4a8f

View file

@ -6,23 +6,11 @@
# comes along and wants to pop a tip up before your delay is finished,
# you lose. :)
#
var popupTip = func(label, delay = nil, override = nil) {
var tmpl = props.Node.new({
name : "PopTip", modal : 0, layout : "hbox",
y: screenHProp.getValue() - 140,
text : { label : label, padding : 6 }
});
var popupTip = func(label, delay = nil, override = nil)
{
fgcommand("show-message", props.Node.new({ "label": label, "delay":delay }));
if (override != nil) tmpl.setValues(override);
popdown();
fgcommand("dialog-new", tmpl);
fgcommand("dialog-show", tipArg);
currTimer += 1;
var thisTimer = currTimer;
# Final argument is a flag to use "real" time, not simulated time
settimer(func { if(currTimer == thisTimer) { popdown() } }, delay or DELAY, 1);
}
var showDialog = func(name) {