(Continued from a question I had in a previous thread:
http://twinery.org/forum/index.php/topic,1410.msg2530.html#msg2530)
Alright, so I looked at the Twine file you gave me and tried to implement the necessary bits into my own game, but I frankly didn't understand a lot of it and basically messed up my CSS in the process blah.
I especially have issues with an option to change the font. I've added this to the CSS passage (and even tried to substitute ".passages" instead of "body" but got the same effect):
body.default {font-family: 'Schoolbell', cursive;}
body.verdana {font-family: 'Verdana', sans-serif;}
body.helvetica {font-family: 'Helvetica', serif;}
body.arial {font-family: 'Arial', sans-serif;}
and this to the options menu:
<<ensureOptionsExist>>\
!Visual Options
<<optionlist "font" "Schoolbell, Verdana, Helvetica, Arial">>
Select the font used in the main passage text.
<<onchange>>
<<removeclass "body" "default verdana helvetica arial">>
<<if options.font eq "Schoolbell">>
<<addclass "body" "default">>
<<elseif options.font eq "Verdana">>
<<addclass "body" "verdana">>
<<elseif options.font eq "Helvetica">>
<<addclass "body" "helvetica">>
<<elseif options.font eq "Arial">>
<<addclass "body" "arial">>
<<endif>>
<<endoptionlist>>
------
<<optionbar>>
and lastly this to a widget passage:
<<widget "ensureOptionsExist">><<if Object.keys(options) eq 0>><<setOptionsToDefault>><<endif>><</widget>>
<<widget "setOptionsToDefault">>\
<<script>>
options =
{
"font" : ["Default"]
}
<</script>>\
<<saveoptions>>\
<</widget>>
but the fonts don't change on the passages they're supposed to, the sidebar is now bigger than it's supposed to be, and the menu links (Saves, Options, etc.) have reverted back to blue instead of the color I specified in the stylesheet and yeah I have no idea why.
I feel like I'm in way over my head here, and any help you could give me would be really, really appreciated.
Thank you!
Comments
MenuOptions special passage: Your widget passage: StoryInit special passage: PassageReady special passage:
And the sidebar issue was actually a problem completely on my end due to some faulty CSS I used on #ui-bar, so yep, set to go.
Thanks again, it's so nice that always willing to help! ^^