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, # comes along and wants to pop a tip up before your delay is finished,
# you lose. :) # you lose. :)
# #
var popupTip = func(label, delay = nil, override = nil) { var popupTip = func(label, delay = nil, override = nil)
var tmpl = props.Node.new({ {
name : "PopTip", modal : 0, layout : "hbox", fgcommand("show-message", props.Node.new({ "label": label, "delay":delay }));
y: screenHProp.getValue() - 140,
text : { label : label, padding : 6 }
});
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) { var showDialog = func(name) {