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

[WOD][In-Progress][Character Sheet Creation][Help Needed] Changing Backgrounds

First, thank you to all those who helped me in my last post, but now I have a new problem. Vampire Button Werewolf Button Mage Button [Basic] [Advantages] [ETC] [Basic] [Advantages] [ETC] [Basic] [Advantages] [ETC] So, the Vampire Button is always the first chosen and the background is that of green marble. I would like the background to change every time you change the game line. Sorry if this sounds confusing. If there are any misunderstandings, I'll try to help. [What it does] Vampire Button Werewolf Button Mage Button (Vampire Background) (Werewolf Background) (Mage Button) [Basic] [Advantages] [ETC] [Basic] [Advantages] [ETC] [Basic] [Advantages] [ETC] [What I want to accomplish] Vampire Button Werewolf Button Mage Button (Vampire Background) (Werewolf Background) (Mage Button) [Basic] [Advantages] [ETC] [Basic] [Advantages] [ETC] [Basic] [Advantages] [ETC]
1474300713
Havoc
Sheet Author
API Scripter
Something like this? &lt;input type="radio" name="attr_splat" value="1" class="sheet-splat sheet-vampire" checked&gt;&lt;span&gt;&lt;/span&gt; &lt;input type="radio" name="attr_splat" value="2" class="sheet-splat sheet-werewolf"&gt;&lt;span&gt;&lt;/span&gt; &lt;!-- etc, choose game type --&gt; &nbsp; &nbsp; &nbsp; &lt;div class="sheet-benisbackground sheet-vampire-only" style="background:url('<a href="http://i0.kym-cdn.com/entries/icons/facebook/000/019/615/120_-_benis.jpg" rel="nofollow">http://i0.kym-cdn.com/entries/icons/facebook/000/019/615/120_-_benis.jpg</a>') no-repeat;"&gt;&lt;/div&gt; &nbsp; &nbsp; &nbsp; &lt;div class="sheet-benisbackground sheet-werewolf-only" style="background:url('<a href="http://scontent.cdninstagram.com/t51.2885-15/e35/p320x320/13423494_519006621634276_165608611_n.jpg?ig_cache_key=MTI3MjEzMjgzMTE2NTQ2MDM5NA%3D%3D.2" rel="nofollow">http://scontent.cdninstagram.com/t51.2885-15/e35/p320x320/13423494_519006621634276_165608611_n.jpg?ig_cache_key=MTI3MjEzMjgzMTE2NTQ2MDM5NA%3D%3D.2</a>') no-repeat;"&gt;&lt;/div&gt; &lt;input type="radio" name="attr_tab" value="1" class="sheet-tab sheet-tab-1"/&gt;&lt;span class="sheet-tab"&gt;&lt;/span&gt; &lt;input type="radio" name="attr_tab" value="2" class="sheet-tab sheet-tab-2 sheet-vampire-only"/&gt;&lt;span class="sheet-tab sheet-vampire-only"&gt;&lt;/span&gt; &lt;input type="radio" name="attr_tab" value="3" class="sheet-tab sheet-tab-3 sheet-vampire-only"/&gt;&lt;span class="sheet-tab sheet-vampire-only"&gt;&lt;/span&gt; &lt;input type="radio" name="attr_tab" value="4" class="sheet-tab sheet-tab-4 sheet-vampire-only"/&gt;&lt;span class="sheet-tab sheet-vampire-only"&gt;&lt;/span&gt; &lt;input type="radio" name="attr_tab" value="5" class="sheet-tab sheet-tab-5 sheet-werewolf-only"/&gt;&lt;span class="sheet-tab sheet-werewolf-only"&gt;&lt;/span&gt; &lt;input type="radio" name="attr_tab" value="6" class="sheet-tab sheet-tab-6 sheet-werewolf-only"/&gt;&lt;span class="sheet-tab sheet-werewolf-only"&gt;&lt;/span&gt; &lt;div class="sheet-tab sheet-tab-1"&gt; &lt;!-- common tab contents --&gt; Common &lt;/div&gt; &lt;div class="sheet-tab sheet-vampire sheet-tab-2"&gt; &lt;!-- vampire #1 tab contents --&gt; &nbsp; &nbsp; Vampire 1 &lt;/div&gt; &lt;div class="sheet-tab sheet-vampire sheet-tab-3"&gt; &lt;!-- vampire #2 tab contents --&gt; &nbsp; &nbsp; Vampire 2 &lt;/div&gt; &lt;div class="sheet-tab sheet-vampire sheet-tab-4"&gt; &lt;!-- vampire #3 tab contents --&gt; &nbsp; &nbsp; Vampire 3 &lt;/div&gt; &lt;div class="sheet-tab sheet-werewolf sheet-tab-5"&gt; &lt;!-- werewolf #1 tab contents --&gt; &nbsp; &nbsp; Werewolf 1 &lt;/div&gt; &lt;div class="sheet-tab sheet-werewolf sheet-tab-6"&gt; &lt;!-- werewolf #1 tab contents --&gt; &nbsp; &nbsp; Werewolf 1 &lt;/div&gt; &lt;div class="sheet-tab sheet-werewolf sheet-tab-7"&gt; &lt;!-- werewolf #1 tab contents --&gt; &nbsp; &nbsp; Werewolf 1 &lt;/div&gt; &lt;script type="text/worker"&gt; &nbsp; &nbsp; on('change:splat', function() { &nbsp; &nbsp; &nbsp; &nbsp; setAttrs({ tab: 1 }); // reset to common tab when switching splats &nbsp; &nbsp; }); &lt;/script&gt;&nbsp; css div.sheet-tab{ &nbsp; &nbsp; display: none;&nbsp; } .charsheet { } input.sheet-tab-1:checked ~ div.sheet-tab-1, input.sheet-tab-2:checked ~ div.sheet-tab-2, input.sheet-tab-3:checked ~ div.sheet-tab-3, input.sheet-tab-4:checked ~ div.sheet-tab-4, input.sheet-tab-5:checked ~ div.sheet-tab-5, input.sheet-tab-6:checked ~ div.sheet-tab-6 { display: block; } .sheet-benisbackground { &nbsp; &nbsp; &nbsp; &nbsp; float: left;&nbsp; &nbsp; &nbsp; position:absolute; &nbsp; &nbsp; clear:both; &nbsp; width: 100%; &nbsp; height: 100%; &nbsp; position: absolute; &nbsp; top: 0; &nbsp; left: 0; &nbsp; z-index:-1; &nbsp; &nbsp; } input.sheet-vampire:checked ~ .sheet-vampire-only, input.sheet-werewolf:checked ~ .sheet-werewolf-only { &nbsp; &nbsp; display:inline; } .sheet-vampire-only, .sheet-werewolf-only { &nbsp; &nbsp; display:none; } .charsheet input.sheet-tab { &nbsp; &nbsp; width: 50px; &nbsp; &nbsp; height: 20px; &nbsp; &nbsp; cursor: pointer; &nbsp; &nbsp; opacity: 1; z-index: 9999; &nbsp; &nbsp; margin-bottom:10px; } .charsheet span.sheet-tab { background: white;&nbsp; color: black;&nbsp; width: 50px; /*originally 87px*/ &nbsp; &nbsp; height: 20px; /*originally 20px*/ &nbsp; &nbsp; border:2px solid black; &nbsp; &nbsp;&nbsp; } .charsheet input.sheet-tab:checked + span.sheet-tab { &nbsp; &nbsp; background: black; &nbsp;/*originally ab8b57*/ &nbsp; &nbsp; &nbsp; color: white; /*originally white*/ &nbsp; &nbsp; border:2px solid white; &nbsp; &nbsp; }
That should do it. Thank you so much!
You might look at Steve K.'s Chronicles of Darkness (New World of Darkness) sheet it has transitions for a lot of the different sheets/games in nWoD like your talking about. It seems like a lot of advanced scripting and such when into the work on it and is a great sheet, so might give you some ideas and insights.
1474390985

Edited 1474391040
Huntress said: You might look at Steve K.'s Chronicles of Darkness (New World of Darkness) sheet it has transitions for a lot of the different sheets/games in nWoD like your talking about. It seems like a lot of advanced scripting and such when into the work on it and is a great sheet, so might give you some ideas and insights. Thank you for pointing it out! It looks like it will help alot!