PDA

View Full Version : FGU: Dev question, Blocking windows?



celestian
April 20th, 2019, 23:47
Is there any plans to add blocking popups in FGU now or down the road?

Many libraries have a window/menu control that you can use that pops up for "yes/no" or question or alert that forces you to repond to the window and doesn't let you do anything else. It is the top window until you do. Typically these are also not something you need to do callbacks/registers for.

Among other things it allows you to do something like these.



local bAccept = popupYesNo(nodeChar,"Are you sure you want to delete that?");
if bAccept then
....
end

local sNewName = popupGetString(nodechar,"Enter the new name of your pet.","Spot");
DB.setValue(nodeChar,"petname","string",sNewName);

popupCustom(nodeChar,windowClass);
... continue after the custom window was closed...



There are many situations I'd love to put up a window to get a response on yes/no, ask for input/etc and doesn't accidentally get clicked over to something else and missed.

LordEntrails
April 21st, 2019, 00:02
Even if you get a response from John or Doug, if you want this (which you do) I would add it to the wishlist. That way we can vote and they can track it.

Trenloe
April 21st, 2019, 03:25
How about this? https://www.fantasygrounds.com/refdoc/Interface.xcp#dialogMessage

dulux-oz
April 21st, 2019, 03:46
There's also one of these inside the DOE:Base - it does need to be called via code, of course :)

LordEntrails
April 21st, 2019, 03:47
I think celestian is looking for a window that is always on top. Can't dialogMessage be hidden/obscured under other windows?

celestian
April 21st, 2019, 06:10
How about this? https://www.fantasygrounds.com/refdoc/Interface.xcp#dialogMessage

That does solve a yes/no question (thanks for pointing it out I missed it) but my main use case is a blocking window for anything so I can force the function to run and get input (other than just yes/no) before proceeding.

I will certainly make use of the yes/no on somethings I've been floating around if I can. I will experiment with it, thanks!


I think celestian is looking for a window that is always on top. Can't dialogMessage be hidden/obscured under other windows?

It doesn't seem to, it's exactly what I want only I also want the ability to do more than just yes/no ;)

Bidmaron
April 22nd, 2019, 01:35
I made a wishlist entry so we can set an FG window to modal. Just go to the last page of the wishlist and it is there. Can’t figure out how to link to individual wish list item.

esmdev
April 22nd, 2019, 02:03
I made a wishlist entry so we can set an FG window to modal. Just go to the last page of the wishlist and it is there. Can’t figure out how to link to individual wish list item.

https://fg2app.idea.informer.com/proj/?ia=125639

You click on the title of the wishlist entry and it will open a window that is the specific entry. Then just cut/paste URL.

celestian
April 29th, 2019, 00:25
https://fg2app.idea.informer.com/proj/?ia=125639

You click on the title of the wishlist entry and it will open a window that is the specific entry. Then just cut/paste URL.

The linked idea is sorta what I want but I want it to actually block everything for that user until the menu is dealt with... and not just yes/no but customizable input/view. I want to prompt users for various things and not proceed in the code until they respond and then use those values and proceed with that same function.

celestian
May 1st, 2019, 00:15
I guess what I really want is blocking, period. Where I could show a window that is blocking and force focused. That way you can do as I mentioned previously without the leaping around call backs for some specific tasks.