Evannessa / Journal-To-Canvas-Slideshow

FoundryVTT Project
8 stars 9 forks source link

Feature Request: A way to force an image to scene or window #10

Open codeadsa opened 3 years ago

codeadsa commented 3 years ago

I'd like a way to utilize both Scenes and Window images without having to goto Settings > Configure Settings > Modules > Journal to Canvas > Display Location then change the dropdown. Maybe create 2 journals, one that will open up to scene, the other to window. During my games i'd like to show a scene image during a Exploration phase, but in combat i'd like to show a window of what the monster looks like.

Right now I have a macro that attempts to change the config value via document.getElementsByName('journal-to-canvas-slideshow.displayLocation')[0].selectedIndex = 0 or 1 but i'd be nice to have an official method.

codeadsa commented 3 years ago

Here is my ghetto hack to change the drop down value via macro. try { //change to scene document.getElementById('sidebar-tabs').querySelector("a[title='Game Settings']").click(); setTimeout(() => { document.getElementById('settings-game').querySelector("button[data-action='configure']").click();},100); setTimeout(() => { document.getElementById('client-settings').querySelector("a[data-tab='modules']").click();},100); setTimeout(() => { document.getElementsByName('journal-to-canvas-slideshow.displayLocation')[0].selectedIndex = 0},100); setTimeout(() => { document.getElementById('client-settings').querySelector("button[name='submit']").click();},100); } catch(err) { console.log(err); }

To create a macro to display as a popup you would copy this macro and change .selectedIndex = 0, to selectedIndex = 1

Evannessa commented 3 years ago

Sure thing! That's next on my To-Do list for the next update along with some general UI clean-up ^ ^