Dialog() window placement

Doc requests, organization, and submissions

Moderators: dorpond, trevor, Azhrei

Post Reply
OrigSyn
Cave Troll
Posts: 28
Joined: Sun Feb 13, 2011 10:51 pm
Contact:

Dialog() window placement

Post by OrigSyn »

I'm using dialog windows to give players specific instructions while creating characters. I am also using the unassigned variable to request information from the player. When the variable request window opens, it opens on top of the dialog window.

Is there any way to set the opening placement of the dialog window to (somewhere else on the map)?

Also, is there any way to allow active window switching between the input request window and the dialog window? OR should I just make my dialog window large enough to display all of my text, and have it open up (somewhere less on the map)?

Thanks
When all else fails, move a pawn.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Dialog() window placement

Post by aliasmask »

If you're using a dialog and mt input at the same time, I recommend not using the dialog. You can either put a label near your input or create a tab for your input and one for you info. Kind of depends on the amount of info you're presenting.

Another way is to use a tooltip, but you can't use tooltips with the MT input, but you can create your own forms with html where there can be a tooltip as long as it's not on a button or form object. I would just use a label if it's a short line and a tab if it's more in depth.

OrigSyn
Cave Troll
Posts: 28
Joined: Sun Feb 13, 2011 10:51 pm
Contact:

Re: Dialog() window placement

Post by OrigSyn »

Thanks!

Just found frames, and I think they will do what I need... I can create a frame called "Instant Info" or something inside each macro requiring information. Information in the new macro will replace what's in the frame (since they are called the same thing)... I think that will work!

Thanks again!
When all else fails, move a pawn.

OrigSyn
Cave Troll
Posts: 28
Joined: Sun Feb 13, 2011 10:51 pm
Contact:

Re: Dialog() window placement

Post by OrigSyn »

So, what I've discovered:

Any request for input from the user eliminates the ability to interact with the MapTool app... it wants input, and wants it now. This means that, if your input request covers up your pop-up window, it does so until the window closes, even if you need to see the contents of the window in order to answer the question.

I discovered that creating a frame instead of a dialog window allows you to dock the window, but only if the input window is not created. If it is, then your are trapped in the same situation; MapTool diverts sole attention to the input window.

I've gotten around this by creating one macro that creates the frame by itself, with some explanatory text, without the diversion of input. This gives the player a chance to move his or her frame into a dockable position prior to using any macro that might print to that frame. The catch is that any information to be printed in that frame needs to be scripted with that frame's name, and the author must realize that anything sent to that frame replaces anything in that frame.

Another caveat: Any dialog window that opens asking for input will suck MapTool's attention completely- the frame will still be unaccessible to window scrolling. Be sure to warn your players that their frame needs to be large enough to display enough text.

This workaround works for me. MapTool works amazingly well... LOVE IT!
When all else fails, move a pawn.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Dialog() window placement

Post by aliasmask »

Have you tried putting the info in a tab? See Wiki: input(). Then you have access to the data when the input is up. Did you want access to the data before and after the input?

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Dialog() window placement

Post by Azhrei »

OrigSyn wrote:So, what I've discovered:
Yep. [dialog:] and Wiki: input() are modal, [frame:] is modeless. (Definitions of modal and modeless are here.)

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Dialog() window placement

Post by wolph42 »

aliasmask wrote:Another way is to use a tooltip, but you can't use tooltips with the MT input
yes you can (granted it took me some tinkering to make it work, but it is possible)!

Example

Code: Select all

[h:status=input(   "verbose|0|<html><span title='<html>Turning this on will show the applied bonusses and penalties of the attack in the chat windows. Example:<br>Modifiers: aimBonus = 10, callShotPenalty = -20, visPenalty = -10, terrain = -10, higherGround = 10</html>'>Show <b>verbose</b> attack modifiers in chat</html></span></html>|CHECK")]
[abort(status)]
 
(yes I will update the wiki now)

Edit: for some reason I can't save the wiki page after editing it. Can someone else paste the following at the end and save it in the Wiki: input() entry
'''6. An input using Wolph42's tooltip-trick'''
It is possible to use HTML make up by just adding HTML tags around the input text. This makes it possible to use e.g. bold and italic tags, but also the span tag. This makes it also possible to add tooltips to the input text. Here's an example

<source lang="mtmacro" line>
[H: hasInput = input("someVariable|0|<html><span title='<html>This text will be shown as a tooltip if you hover with your mouse over the text</html>'>Do you wish to turn the <b>setting</b> on?</html></span></html>|CHECK")]
</source>
 

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Dialog() window placement

Post by Azhrei »

wolph42 wrote:Edit: for some reason I can't save the wiki page after editing it. Can someone else paste the following at the end and save it in the Wiki: input() entry
Done.

And I'll take a look at your user entry over there to see why there might be a permission problem...

Edit: Nothing I can do about it. It appears that edit/viewing user rights is restricted to the Bureaucrat group and I'm just a SysOp. (Cool group name, though. ;)) You'll have to ping Craig.

Post Reply

Return to “Documentation Requests/Discussion”