So I whipped out some image buttons for some campaign macro's to toggle lights (we use them heavily so they deserve their own buttons vs using a pop-up menu!)
I liked the thought of condensing 12 macro's into the space of 6-8 and we had handy artwork to match the "states" but...
The question is, is there a performance hit using images for buttons? I noticed most frameworks don't seem to use them much? And I noticed saving any macro now takes a few extra seconds to close. I'm guessing MT is re-downloading every image from the web onClose?
Should I refrain from changing another 20+ macro's to images? Thoughts on Images vs Text for buttons?
FYI: I have the images stored on my web server, so http:// sources. I didn't see a way to use table or token images?
Image buttons for Macros, performance hit?
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Image buttons for Macros, performance hit?
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: Image buttons for Macros, performance hit?
I use image buttons in the bag of tricks and have no negative experience with those. However I use them in a form and I understand that you use them for actual macro buttons. Little experience with that. IRC rumble used to do that, but he aint around anymore
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: Image buttons for Macros, performance hit?
You can use images from a table, but in order to put them on a campaign macro you'll need to get the asset id manually first and then use it in place of html image url.
For example, to get assetId manually type in to chat [tableImage("lightImages",1)] and copy assetId in output. Then set button to <img src="assetId://..." />. You may have to play with some formatting. I don't recall if you need to surround it with <html> tags, but I don't think so.
For example, to get assetId manually type in to chat [tableImage("lightImages",1)] and copy assetId in output. Then set button to <img src="assetId://..." />. You may have to play with some formatting. I don't recall if you need to surround it with <html> tags, but I don't think so.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: Image buttons for Macros, performance hit?
Thanks for the tip, may try table image to see if it helps. Or hack the cache mechanic.
It does seem to refresh the images on every save of any macro so that's annoying (~4 second delay) but otherwise I'm not seeing any other performance hit.
It does seem to refresh the images on every save of any macro so that's annoying (~4 second delay) but otherwise I'm not seeing any other performance hit.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: Image buttons for Macros, performance hit?
It would probably speed things up if you didn't put the images in a table but saved them as tokens. Back when I was playing with token animations I noticed the lag when getting image data from a table so I would preload those images when starting campaign which was a janky way of doing it. Having them saved as tokens is much faster.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools