Development: resetting a tool
Posted: Mon Sep 22, 2008 12:43 pm
I'm trying to add a new tool to maptool (the line-of-sight/concealment tool I suggested here).
I have small set of data stored with the tool (the points clicked on, basically) and I want to clear them when the user chooses a new tool or loads a new map. Is there a method to override for this or something?
Also, since I'm posting I might as well ask - right now the lines my tool draws are only visible to the user. I'd like to add a button to reveal them to all players so that you can use the tool to show everyone that you have line of sight to settle arguments. The only way I can see to do this is to send a server "draw" command. Then to get rid of the diagram I'd need to draw over it with the same drawing set to erase. I haven't had time to test this yet - would that interfere with actual drawings done with the draw tool (ie. accidentally erase them if there's overlap)?
I have small set of data stored with the tool (the points clicked on, basically) and I want to clear them when the user chooses a new tool or loads a new map. Is there a method to override for this or something?
Also, since I'm posting I might as well ask - right now the lines my tool draws are only visible to the user. I'd like to add a button to reveal them to all players so that you can use the tool to show everyone that you have line of sight to settle arguments. The only way I can see to do this is to send a server "draw" command. Then to get rid of the diagram I'd need to draw over it with the same drawing set to erase. I haven't had time to test this yet - would that interfere with actual drawings done with the draw tool (ie. accidentally erase them if there's overlap)?