Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Check to see if Selected (Buttons on the Canvas)

I'm wondering if there's a way for the api to detect a change in whether or not someone has selected a graphic. Basically, can you make buttons on screen that can be "clicked" by being selected? I was thinking that, if there isn't, could an interval send chat as a player, and if that player has certain things selected, you could check for that using msg.selected? This wouldn't be great, as the interval might bog things down.  I've liked the idea for clickable buttons on the canvas for a while, especially in sci-fi games, but someone was posting on reddit about accessibility for someone who can only tap on a tablet (no tap and hold, or drag, or presumably double click), and it seems like an interesting problem. Obviously macros along the bottom could be a thing, but I was thinking expanding bubble buttons around the token might be a nicer interface.
1525301673
The Aaron
Pro
API Scripter
Nope. Stephen S. and I dug into various ways of activating based on the canvas.  The best we came up with were: "Dractivation" -- drag a graphic and catch the change in locations as the "click", resetting it afterwards. "Rotactivation" -- rotate a graphic and catch the change in rotation as the "click" resetting it afterwards. Both of those work reasonably well and you can end up with a pretty decent interface using them.  Some of Stephen's old test scripts should be findable in the API forum.
Aye, that's what I figured after digging into the wiki, and trying to send a chat msg from a "selected" event (which seems to not exist).