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

change token macro bar position

Hello, I started now to experiment with styling ( <a href="https://app.roll20.net/forum/post/7841113/show-off-your-style-2-the-stylening/?pagenum=1#newtopic" rel="nofollow">https://app.roll20.net/forum/post/7841113/show-off-your-style-2-the-stylening/?pagenum=1#newtopic</a> &nbsp; )and I would like to know if there is a code for Stylish or API script that makes the macro bar token appear above the token instead of appearing in the upper left corner.
1606989482
Oosh
Sheet Author
API Scripter
I don't think you can do this, at least not easily. You'd either need to know the position of the token, or the token would need to be a parent element of the menu (which it isn't). You can grab the token position with the API, I'm not sure how you would dynamically feed that to the CSS though. Presumably there's a way to do it, but it's beyond my abilities.
1607012181
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It would likely need an injected script through something like Tampermonkey. The potential there for abuse, or simply really screwing up your game is pretty high, and would require some pretty high level coding skills. I would not recommend.
1607013831

Edited 1607014124
Pat
Pro
API Scripter
It would be relatively simple to code it - warning is that the same "secondary-toolbar" id is used for all the context menus (font, shape etc.)&nbsp; so it's already being positioned dynamically... not sure if you can document.getElementById("secondary-toolbar") from a sandboxed API script... but it is absolutely positioned, and appears to already position itself other than top-left for other tools. You would have to query the selected token - however, that event is the key. Not knowing which token is "selected" means you're out of luck with regard to querying a select event, since that event is not available to the API, just selected in terms of the chat message event.&nbsp; Honestly, this should be an available setting in the API - the reason they haven't might be crowding the other attributes/pips/display options already around a token.&nbsp;
I would really like to see something in that sense, where the player has slots and can allocate their macros within it, I think it would be more practical than having to select the token and then walk with the mouse to the button and click on the macro.
1607020491
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That would drive me crazy, particularly since some of my tokens can have over 20 token actions. :D I'd much prefer to have a static placement for interface items. In fact, I have moved the token interface buttons to the side of my screen, just for that purpose. Still, I can see how this fits with expectations of people used to radial menus from many online games. It's worth a Suggestion in the Suggestion forum.