b48 Macro Additions

Doc requests, organization, and submissions

Moderators: dorpond, trevor, Azhrei

User avatar
Natha
Dragon
Posts: 733
Joined: Sat Oct 11, 2008 3:37 am
Location: Limoges/Guéret, France
Contact:

Re: b48 Macro Additions

Post by Natha »

Thank you !
ImageImageImageImage

User avatar
PyroMancer2k
Dragon
Posts: 925
Joined: Thu Sep 11, 2008 2:04 pm

Re: b48 Macro Additions

Post by PyroMancer2k »

I'm trying to setup some Dialog boxes with links to macros in them so I use the MacroLink() function. The problem though is that they always seem to turn the text into Blue font with underlines. Is there anyway to change this? I had the font originally the color I wanted but no matter what it seems to always change it to blue.

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: b48 Macro Additions

Post by Craig »

PyroMancer2k wrote:I'm trying to setup some Dialog boxes with links to macros in them so I use the MacroLink() function. The problem though is that they always seem to turn the text into Blue font with underlines. Is there anyway to change this? I had the font originally the color I wanted but no matter what it seems to always change it to blue.
You could enclose it in a span

Code: Select all

[dialog("test"): {<span style="color:#FF1111">[r:macroLink("Test", "Test@Lib:Test")]</span>}]
of course CSS would be nicer but that gives you an idea.

You could also use macroLinkText() and build the html portion yourself it you needed more control.

User avatar
PyroMancer2k
Dragon
Posts: 925
Joined: Thu Sep 11, 2008 2:04 pm

Re: b48 Macro Additions

Post by PyroMancer2k »

I was trying <FONT> before cause that's how I was changing the text ;). The span works though thanks.

I'm winging it with the HTML code cause I'm basically learning it on the fly. And then trying to add CSS on top is a bit much at this point :P.

Since you seem to know a lot of the subject do you know how to do multiple rows of roll over text? Most of the google searches turned up java scripting examples which is not what I wanted. The only example I did find didn't work. What I want is I move mouse over text and it says say.
Dagger
+3
1d4
But instead it does..
Dagger +3 1d4
when I mouse over the text in question. Line breaks like <BR> don't see to work.

The only example I saw on the net was this but it didn't work it still puts everything on one line.

Code: Select all

<span Title="lineone \n linetwo \n etc...">

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: b48 Macro Additions

Post by Craig »

PyroMancer2k wrote:I was trying <FONT> before cause that's how I was changing the text ;). The span works though thanks.

I'm winging it with the HTML code cause I'm basically learning it on the fly. And then trying to add CSS on top is a bit much at this point :P.

Since you seem to know a lot of the subject do you know how to do multiple rows of roll over text? Most of the google searches turned up java scripting examples which is not what I wanted. The only example I did find didn't work. What I want is I move mouse over text and it says say.
Dagger
+3
1d4
But instead it does..
Dagger +3 1d4
when I mouse over the text in question. Line breaks like <BR> don't see to work.

The only example I saw on the net was this but it didn't work it still puts everything on one line.

Code: Select all

<span Title="lineone \n linetwo \n etc...">
Java allows you to use html in your tool tip, the only thing you need to do is enclose it in <html> </html> tag so it knows that it is html. (this wont work in standard HTML but it works for maptool ;) )

So

Code: Select all

<span title="<html>lineone<br>linetwo<br>...</html>">foo</span>
You can do tables and other formatting in there. In fact I didn't like how TKs macros would take up so much space in chat but I liked having the info available so what I did was just print out a plain simple (some would say boring) line, and attached the formatted output as a tool tip, this is an example of what it looks like when I hover over the attack name.
Image

User avatar
PyroMancer2k
Dragon
Posts: 925
Joined: Thu Sep 11, 2008 2:04 pm

Re: b48 Macro Additions

Post by PyroMancer2k »

OMG That's awesome! I didn't know you could do that in MT and didn't think MT's HTML support could do advanced features like that. I've never seen anyone do anything close to that before. The most I've seen is standard use of [] tooltips with the text replace option.

It gives me so many ideas :) hehehe.

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: b48 Macro Additions

Post by Rumble »

PyroMancer2k wrote:OMG That's awesome! I didn't know you could do that in MT and didn't think MT's HTML support could do advanced features like that. I've never seen anyone do anything close to that before. The most I've seen is standard use of [] tooltips with the text replace option.

It gives me so many ideas :) hehehe.
That is way cool. So much stuff could be left out of chat and only pop up if desired. Wheels are turning!

Lindharin
Dragon
Posts: 668
Joined: Sat Apr 21, 2007 4:51 pm

Re: b48 Macro Additions

Post by Lindharin »

The only problem I have with tool tips for info like that is they seem to go away after a few seconds. I'm not sure if it's something I do (like jiggle the mouse accidentally) or what, but it seems like tool tips in MapTool rarely (or possibly never) stay visible for more than a few seconds. This isn't something I've really experimented with, so maybe it's just something I'm doing without realizing it.

If it is not just me, and tool tips really do go away after X seconds, that makes it much less valuable to put large blocks of information in a tool tip.

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: b48 Macro Additions

Post by Craig »

Lindharin wrote:The only problem I have with tool tips for info like that is they seem to go away after a few seconds. I'm not sure if it's something I do (like jiggle the mouse accidentally) or what, but it seems like tool tips in MapTool rarely (or possibly never) stay visible for more than a few seconds. This isn't something I've really experimented with, so maybe it's just something I'm doing without realizing it.

If it is not just me, and tool tips really do go away after X seconds, that makes it much less valuable to put large blocks of information in a tool tip.
Hmm that is strange, my tool tips seem stable enough (running under mac os x) I can even move the mouse as long as it stays within the area of text that has the tool tip.

What OS are you running?

Lindharin
Dragon
Posts: 668
Joined: Sat Apr 21, 2007 4:51 pm

Re: b48 Macro Additions

Post by Lindharin »

I'm running Windows XP Media (basically the same as Pro), and Java 6.

I just opened b48 and tested it, and it's not just me. I just did a [1d6] in chat and then moved the mouse over the result, and took my hand off the mouse. The tool tip appeared, stayed visible for 5 seconds, then went away. I repeated it several times, and it always lasts 5 seconds then disappears.

User avatar
PyroMancer2k
Dragon
Posts: 925
Joined: Thu Sep 11, 2008 2:04 pm

Re: b48 Macro Additions

Post by PyroMancer2k »

Yea I have the same problem with tooltips. It always did it with the [] tooltips so I just assumed it was the way MT was setup. But when you guys mentioned it could be otherwise I figured I'd test it on your example code with foo. Well sure enough the same thing it only last for 5 seconds.

I'm also running windows OS. Think it could have something to do with that since it seems to stay up forever on Mac OS?

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: b48 Macro Additions

Post by Craig »

Tool tips on Mac OS X last for 4 seconds in map tool, if you move the mouse keeping it withing the bounds of the thing that the tool tip is on you can keep it open indefinitely (not that this is a good solution).

Its quite easy to extend the duration of tool tips, but making such a change would mean all tool tips in maptool are displayed for this long, not just ones in chat.

How long do you think is a minimum reasonable amount of time to keep the tool tip open so this is useful?

User avatar
PyroMancer2k
Dragon
Posts: 925
Joined: Thu Sep 11, 2008 2:04 pm

Re: b48 Macro Additions

Post by PyroMancer2k »

Is there a way you could maybe add this to the MT settings? That way each person could choose how long they want tooltips to display? Possible put it under the interacts tab on Preferences either in the chat section or under it in that empty space.

But as for minimum time I'd say 10 seconds is probably more reasonable cause it's twice as long as the current and I feel they are way to short now and twice as long seems reasonable. Though most of them up to now have been short so if I do something complex like your example it would probably need to be longer. Which is why the adjustable suggestion.

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

Re: b48 Macro Additions

Post by Azhrei »

Yeah, I suppose a spinner control could be added to the preferences somewhere... I'd rather see the object that triggers the tooltip be "clickable". Clicking on it pops up the tooltip and leaves it there until either (a) another object is clicked on, (b) the window containing the object loses focus, or (c) another tooltip needs to be popped up.

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: b48 Macro Additions

Post by Craig »

Azhrei wrote:Yeah, I suppose a spinner control could be added to the preferences somewhere... I'd rather see the object that triggers the tooltip be "clickable". Clicking on it pops up the tooltip and leaves it there until either (a) another object is clicked on, (b) the window containing the object loses focus, or (c) another tooltip needs to be popped up.
That wont work for links they already have a reasonably well defined behavior for mouse clicks ;) And making other tool tips in chat behave differently from the ones on links makes things messy.

Post Reply

Return to “Documentation Requests/Discussion”