Plo's Message Manager
Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice
Re: Plo's Message Manager
Depends on the application, but a built in way is to do: assetid-## which is the width. But if using an image tag, then specify height and width.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Plo's Message Manager
couldnt figure out the assetid:## thing.
using this for a title, it doesnt accept percentages:
<img src="asset://blahblah" width=10 height=10>
using this for a title, it doesnt accept percentages:
<img src="asset://blahblah" width=10 height=10>
Re: Plo's Message Manager
Oh, you can't put images in the title, I've tried. You can't (edit) use any html assuming you're talking about a title of a frame. You can't use percentages for height/width. The number should be in quotes and represent the number of pixels. The assetId-## is a shortcut format only used in a very few places in MT. The -## part is the width in pixels and the height sizes with the aspect ratio of image.
Last edited by aliasmask on Sat Jan 01, 2011 3:08 am, edited 1 time in total.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Plo's Message Manager
Yeah, I had originally envisioned modifying the asset id URL so that it could contain something like ?width=## and ?height=## but that turned out to be much more involved that I expected so I dropped that idea for 1.3.
Re: Plo's Message Manager
It's not the title of the frame. I edited it so that all messages appear in the "Messages" frame.aliasmask wrote:Oh, you can't put images in the title, I've tried. You can't (edit) use any html assuming you're talking about a title of a frame. You can't use percentages for height/width. The number should be in quotes and represent the number of pixels. The assetId-## is a shortcut format only used in a very few places in MT. The -## part is the width in pixels and the height sizes with the aspect ratio of image.
Re: Plo's Message Manager
You can do this:
Code: Select all
<img src="[r: getTokenImage()]-100">
<!-- OR -->
<img src="[r: getTokenImage()]" height="100" width="100">
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Plo's Message Manager
wouldnt that do the same thing asaliasmask wrote:You can do this:Code: Select all
<img src="[r: getTokenImage()]-100"> <!-- OR --> <img src="[r: getTokenImage()]" height="100" width="100">
Guy Dude wrote:using this for a title, because it doesnt accept percentages:
<img src="asset://blahblah" width=100 height=100>
Re: Plo's Message Manager
Right, but it's not percentages, just pixels. Also, using the built in method, it will scale it correctly while the height/width doesn't scale. So, if you don't know the dimensions and it's not square, then you would see a distortion. So, if the height is 200px and width=100px, putting -100 will look good while height/width=100 would not.Guy Dude wrote:wouldnt that do the same thing asaliasmask wrote:You can do this:Code: Select all
<img src="[r: getTokenImage()]-100"> <!-- OR --> <img src="[r: getTokenImage()]" height="100" width="100">
Guy Dude wrote:using this for a title, because it doesnt accept percentages:
<img src="asset://blahblah" width=100 height=100>
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Plo's Message Manager
I just used this and it worked:aliasmask wrote:You can't use percentages for height/width.
Code: Select all
[h: img = getTokenImage()]
<img src="[r: img]" width="200%">
Re: Plo's Message Manager
I tried this on an impersonated token to no avail:Azhrei wrote:I just used this and it worked:aliasmask wrote:You can't use percentages for height/width.
Is that somehow different from what you tried?Code: Select all
[h: img = getTokenImage()] <img src="[r: img]" width="200%">
Code: Select all
[frame("D"):{<img src="[r: getTokenImage()]" width="200%"><br><img src="[r: getTokenImage()]" width="50%">}]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Plo's Message Manager
Heh, I should've checked my original image sizes. lolaliasmask wrote:I tried this on an impersonated token to no avail:
It seems my original image was 100px and the one in the chat window is limited to 40px. So when I tried mine and an image came up that appeared to be twice as large, I figured the "200%" was working. It isn't.
Not sure why it isn't, except that there are a few CSS attributes that fail for specific HTML elements. I know width failed for some elements, margin fails for others, and float fails for all of them. But I don't remember the specific combinations.
Oh well. Not something that will be fixed in 1.3 if it's embedded in the Java library.
Re: Plo's Message Manager
On an unrelated note. This is a way to have an image and have a zoom of image after you mouse over it:
Code: Select all
[frame("D"):{<img alt="<html><img src='[r: getTokenImage())]'></html>" src="[r: getTokenImage()]-50">}]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Plo's Message Manager
I thought it may be useful if Players could take notes during the game as well with this tool so I did a little mod to allow it.
/// Updates \\\
Code: Select all
v1.1 Updates
* Changed campaign button name to NOTES
* Updated code so Players can use.
* GM can view/edit player notes by selecting "PC" token and clicking NOTES button
* GM can view/edit campaign notes by selecting "NPC" token and clicking NOTES button
* Added image to View Notes so GM will know which token is being updated
- Attachments
-
- Message Manager v1.1 MT1.3b86.rptok
- MT 1.3b86
- (210.73 KiB) Downloaded 118 times
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Plo's Message Manager
I was having a problem with the gm options and selecting or not selecting tokens on other maps, so I did this update:
Let me know if you find any bugs. btw, not being able to add/edit message while you're not on the map of the token is not an error. I just haven't created a nice descriptive error message for that yet.
||| Updates |||
Code: Select all
v1.1 Updates
* Changed campaign button name to NOTES
* Updated code so Players can use.
* GM can view/edit player notes by selecting "PC" token and clicking NOTES button
* GM can view/edit campaign notes by selecting "NPC" token and clicking NOTES button
* Added image to View Notes so GM will know which token is being updated
1.1a fixed edit bug
1.1b fixed not being on same map as lib and using open frame while not selecting a token (gm only function)
- Attachments
-
- MessageManager 1.1b.rptok
- (210.97 KiB) Downloaded 143 times
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools