I have been bashing my head against this for about five hours, so now I turn to you.
What I am trying to achieve is something like this.
In chat:
My PC does this awesome thing using this card -->(small picture of power card)
My PC does this awesome thing using this card --> *mousehover for big
Now I want the picture of the card to be a small rendering of the card, and on hover, have the fill-size image of the card show as a tooltip.
I can get the resized image in chat, I can get images in tooltips, but I cannot get tooltips on images.
I suspect I am a victim of the alt= component of the image tag.
Am I right that the alt= predefines a text only tooltip that overrides whatever I want? Can I work around it?
Dr Bubb
Images as tooltips on images in chat - can it be done?
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
- bubblobill
- Giant
- Posts: 167
- Joined: Sun Jan 24, 2010 3:07 pm
Images as tooltips on images in chat - can it be done?
Bubblobill on the forum.
@Reverend on the MapTool Discord Server
Responsible for less atrocities than most... I do accept responsibility for these though: SmartDoors, Simple d20 Framework - barebones, Drop-in: All 3.5 SRD Monsters, Drop in: Simple Character Editor, Battletech Framework
@Reverend on the MapTool Discord Server
Responsible for less atrocities than most... I do accept responsibility for these though: SmartDoors, Simple d20 Framework - barebones, Drop-in: All 3.5 SRD Monsters, Drop in: Simple Character Editor, Battletech Framework
Re: Images as tooltips on images in chat - can it be done?
Tooltip text is a little tricky. You have to surround the text with <html>...</html> for it to process html like an image tag. Also, use " instead of " inside, for example:
Code: Select all
[H: img = getImage(imageName)]
[H: tip = strformat('<html><img src="%{img}" height="400" width="400" /></html>')]
[H: tip = replace(tip,'"',"%quot;")]
[R: strformat('<img src="%{img}" height="50" width="50" alt="%{tip}">')]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- bubblobill
- Giant
- Posts: 167
- Joined: Sun Jan 24, 2010 3:07 pm
Re: Images as tooltips on images in chat - can it be done?
Thanks heaps for the assist, but it did not fly.
although it is much closer than I have managed to get so far.
The tooltip does appear, but it does so with a broken image icon.
Thus: Still beating my head around it fruitlessly.
although it is much closer than I have managed to get so far.
The tooltip does appear, but it does so with a broken image icon.
Thus: Still beating my head around it fruitlessly.
Bubblobill on the forum.
@Reverend on the MapTool Discord Server
Responsible for less atrocities than most... I do accept responsibility for these though: SmartDoors, Simple d20 Framework - barebones, Drop-in: All 3.5 SRD Monsters, Drop in: Simple Character Editor, Battletech Framework
@Reverend on the MapTool Discord Server
Responsible for less atrocities than most... I do accept responsibility for these though: SmartDoors, Simple d20 Framework - barebones, Drop-in: All 3.5 SRD Monsters, Drop in: Simple Character Editor, Battletech Framework
Re: Images as tooltips on images in chat - can it be done?
I'll check the code, could be something minor. I think it has something to do with the \\ in the asset link and how strformat processes it.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Images as tooltips on images in chat - can it be done?
Hmm, I'm sure this worked before, but after changing the quotes I got it to work.
Code: Select all
[H: img = getImage(tokenName)]
[H: tip = strformat("<html><img src='%{img}' height='400' width='400'></html>")]
[R: strformat('<img src="%{img}" height="50" width="50" alt="%{tip}">')]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- bubblobill
- Giant
- Posts: 167
- Joined: Sun Jan 24, 2010 3:07 pm
Re: Images as tooltips on images in chat - can it be done?
Win!
I thought I had tried every possible combination between ' and " but apparently not.
+1 vote for Aliasmask's godhood.
You rock
I thought I had tried every possible combination between ' and " but apparently not.
+1 vote for Aliasmask's godhood.
You rock
Bubblobill on the forum.
@Reverend on the MapTool Discord Server
Responsible for less atrocities than most... I do accept responsibility for these though: SmartDoors, Simple d20 Framework - barebones, Drop-in: All 3.5 SRD Monsters, Drop in: Simple Character Editor, Battletech Framework
@Reverend on the MapTool Discord Server
Responsible for less atrocities than most... I do accept responsibility for these though: SmartDoors, Simple d20 Framework - barebones, Drop-in: All 3.5 SRD Monsters, Drop in: Simple Character Editor, Battletech Framework
Re: Images as tooltips on images in chat - can it be done?
Something's been bugging me about my first post that didn't work, so I went back and found what I did wrong. I put % instead of & when using the quote entity, oops.
Code: Select all
[H: img = getImage(tokenName)]
[H: tip = strformat('<html><img src="%{img}" height="400" width="400" /></html>')]
[H: tip = replace(tip,'"',""")]
[R: strformat('<img src="%{img}" height="50" width="50" alt="%{tip}">')]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools