RicardoRix wrote: ↑08 December 2019, 23:11
Firstly, where are all these undocumented functions:
1. this.connectClass
2. this.disconnectAll() ?
Agreed on this. I will say that the one thing that really has frustrated me is the lack of documenation. I found the above 2 items in searching the forums here. Is there any project in place for updating the documentation at all for everything?
I will have to look at your solution. The problem that I have is that a player needs to have 3 different options when they click on a region of the map:
1. Move the King to that location
2. Move their Grande to that location
3. Place a Caballero into that region.
Yes each of these options are only available from a single State, it would be silly to display an error message for the first and second option when the user is trying to place a Caballero into a region. Once I have connected the onclick event to the div for the region for during the phase place King phase, if I don't disconnect it then it will still be there when the player moves to the next phase of the turn which is placing Caballeros.
So far my solution has been to disconnectAll() and completely remove the mouseenter/mouseleave events because I just couldn't figure out how to get them to not fire after disconnecting them all.
Thanks everyone!
Eric