How can i add floating text over image?
Moderators: dorpond, trevor, Azhrei
Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
How can i add floating text over image?
Hello,
I make some character sheet for my tokens and I m trying to make some inventory with icons.
I wander if there a way to make the name of the item to appear as floating text over my image when i move the cursor over it or when i click on it.
Anyone know if it can be done?
Any example will be valuable.
Thanks
I make some character sheet for my tokens and I m trying to make some inventory with icons.
I wander if there a way to make the name of the item to appear as floating text over my image when i move the cursor over it or when i click on it.
Anyone know if it can be done?
Any example will be valuable.
Thanks
High Templar of Ur
Re: How can i add floating text over image?
You can set an image as a background, but you can't control the size (afaik). There is kind of a hack way to do it though. Impersonate a token and type that in to chat. It does look a bit different in a form (aligned text at bottom). You can try a play with the rowspan to move the text up higher and use valign=top for text line.
Code: Select all
<table><tr><td></td><td rowspan=2><img src ="[r: getTokenImage(80)]"></td></tr><tr><td colspan=2 nowrap>Text Test Text</td></tr></table>
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: How can i add floating text over image?
Well thank for the idea but this is not what i wanted to make.
Thanks for answer anyway!
Thanks for answer anyway!
High Templar of Ur
- lmarkus001
- Great Wyrm
- Posts: 1867
- Joined: Sat Mar 29, 2008 12:30 am
- Location: Layfayette Hill, PA
Re: How can i add floating text over image?
Were you looking for hover tip like this?
The image tag has an alt property that you can supply text too that will hover over the image.
Code: Select all
<image src="[R: getTokenImage()]" alt="HOVER TEXT" />
Re: How can i add floating text over image?
hehe, duh. I was overthinking it. Using a span tag works too, <span title="hover text">whatever...</span>.lmarkus001 wrote:Were you looking for hover tip like this?
The image tag has an alt property that you can supply text too that will hover over the image.Code: Select all
<image src="[R: getTokenImage()]" alt="HOVER TEXT" />
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: How can i add floating text over image?
<td width=180 border="3" rowspan=8 Align=center><span title="hover text"><img src='[r:Portrait]' Height="135" Width="165"></img></span></td>
I made this but is not working neither "alt"
I made that in a dialog maybe that is the problem
I made this but is not working neither "alt"
I made that in a dialog maybe that is the problem
High Templar of Ur
- lmarkus001
- Great Wyrm
- Posts: 1867
- Joined: Sat Mar 29, 2008 12:30 am
- Location: Layfayette Hill, PA
Re: How can i add floating text over image?
Hummm... should work... I just did one in a frame without issue... keep tweaking and see if you can figure it out...
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: How can i add floating text over image?
You mean a dialog you created using [frame:] or [dialog:] OR Wiki: input()? The latter doesnt work IIRC. I
Re: How can i add floating text over image?
dialog
Code: Select all
[dialog("Report", "width=520, height=500, noframe=1, bgcolor="black""): {
<html>
<head>
<title>Mob Report</title>
</head>
<body align=center width=530 height=500 bgcolor="black">
<table border="0" bgcolor="black">
<tr>
</tr>
<tr>
<td></td>
<td width=65 border="1" span style="color:white"><b>Name:</td>
<td width=130 border="1" bgcolor="black" span style="color:white" align=top colspan=3>[r: Name]</td>
<td width=65 border="0"></td>
<td width=10 border="0"></td>
<td width=180 border="3" rowspan=8 Align=center><span title="hover text"><img src='[r:Portrait]' Height="135" Width="165"></img></span></td>
</tr>
<tr>
<td></td>
<td width=65 border="1" span style="color:white"><b>Owner:</td>
<td width=65 border="1" bgcolor="black" span style="color:white">[r: Owner]</td>
</tr>
<tr>
...
...
...
...
High Templar of Ur
Re: How can i add floating text over image?
I used this code to test, which works.
Code: Select all
[H: Portrait = getTokenImage()]
[H: Name = getName()]
[H: Owner = getPlayerName()]
[dialog("Report", "width=520; height=500; noframe=1;"): {
<html>
<head>
<title>Mob Report</title>
</head>
<body align="center" width="530" height="500" bgcolor="black">
<table border=1 style="background-color:black">
<tr></tr>
<tr>
<td></td>
<td width="65" border="1" style="color:white;border-style:solid;border-width:1"><b>Name:</b></td>
<td width="130" border="1" bgcolor="black" style="color:white" align="top" colspan=3>[r: Name]</td>
<td width="65" border="0"></td>
<td width="10" border="0"></td>
<td width="180" border=3 rowspan="8" Align="center"><span title="hover text"><img src="[r:Portrait]" Height="135" Width="165"></img></span></td>
</tr>
<tr>
<td></td>
<td width="65" border="1" style="color:white"><b>Owner:</b></td>
<td width="65" border="1" bgcolor="black" style="color:white">[r: Owner]</td>
</tr>
</table>
</body>
</html>
}]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: How can i add floating text over image?
I copied - pasted on a new makro and it doesnt work.aliasmask wrote:I used this code to test, which works.
Code: Select all
[H: Portrait = getTokenImage()] [H: Name = getName()] [H: Owner = getPlayerName()] [dialog("Report", "width=520; height=500; noframe=1;"): { <html> <head> <title>Mob Report</title> </head> <body align="center" width="530" height="500" bgcolor="black"> <table border=1 style="background-color:black"> <tr></tr> <tr> <td></td> <td width="65" border="1" style="color:white;border-style:solid;border-width:1"><b>Name:</b></td> <td width="130" border="1" bgcolor="black" style="color:white" align="top" colspan=3>[r: Name]</td> <td width="65" border="0"></td> <td width="10" border="0"></td> <td width="180" border=3 rowspan="8" Align="center"><span title="hover text"><img src="[r:Portrait]" Height="135" Width="165"></img></span></td> </tr> <tr> <td></td> <td width="65" border="1" style="color:white"><b>Owner:</b></td> <td width="65" border="1" bgcolor="black" style="color:white">[r: Owner]</td> </tr> </table> </body> </html> }]
Maybe somewhere there is a prob... dunno
High Templar of Ur
Re: How can i add floating text over image?
I impersonated a token, then put the code in the chat window.
Make sure for your macro, that "apply to selected" was checked.
Make sure for your macro, that "apply to selected" was checked.
- Attachments
-
- Image1.jpg (20.25 KiB) Viewed 1189 times
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: How can i add floating text over image?
Ye i checked impersonate and apply to selected but still is not wotking.
I m trying these 2 lines at same makro
span is not working
alt is working
ofc i prefer span because is more agile while alt is lagginh a bit.
Actually i tried on text and it works there but it doesnt on picture.
dunno...
Maybe i have bad program version?
I use 1.3.b85
I m trying these 2 lines at same makro
Code: Select all
<span title="Mutanus"><img src='[r:Portrait]' Height="135" Width="165"></img></span>
<br>
<img src='[r:Portrait]' alt="Mutanus" Height="135" Width="165"></img>
alt is working
ofc i prefer span because is more agile while alt is lagginh a bit.
Actually i tried on text and it works there but it doesnt on picture.
dunno...
Maybe i have bad program version?
I use 1.3.b85
High Templar of Ur
Re: How can i add floating text over image?
You're right, span doesn't work for the image alt text. span does work for actual text and is only activate by hovering over the text.. so if there is white space or an image, it doesn't show.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: How can i add floating text over image?
I´v got same problem with alt. Main problem is in ROWSPAN. Alt is showing just in first row. In space of second row alt text dissapear...