How to show window background color in Quixe: background color property or text background? (Flexible Windows, Inform 7)

0 votes
69 views
asked Jun 11 in Authoring by bg (692 points)

I know you can use a custom CSS style sheet to set two custom text styles in Quixe. But I'm not sure if there's a way to make the background color property show the appropriate custom color in Quixe.

Even if there is, I'm thinking using the text style (rather than using the actual background color property) may be the better way to go to specify a background color for a window, because then one of the styles in the CSS style sheet can be customized to reflect both background color and text color.

On the other hand, defining a named custom style "uses up" one of the two style slots that the story author has available, and so maybe that would be a disadvantage if the author has other text styles they want to use for other things. (Unless the background color property also "uses up" one of the two custom style slots?)

1 Answer

0 votes
answered Jun 11 by Dannii (329 points)
selected Jun 13 by bg
 
Best answer

AFAIK, currently Quixe does not do any custom colours or styles - everything must be done through a custom CSS file.

commented Jun 11 by bg (692 points)
Ok, but is it possible to make something in the custom CSS file apply to the background color of a window, is what I mean. For instance, to set a text style, you'd do something like

.Style_user1 {
  color: #0000FF;
  font-weight: bold;
}

But can you do something like this (I know it's not proper code, but hopefully it gets the concept across)

.Background_window1 {
  color: #0000FF
}

And if there is a way to do this, does it "use up" one of the two slots for custom styles that interpreters allow?
commented Jun 11 by Dannii (329 points)
Ah, You will want to set the background colour based on the window's rock number. The window divs are given a class of WindowRock_#. You can specify the rock number yourself (set to something which isn't a multiple of 10), or use the autocomputed one (which will stay the same as long as the number and order of g-windows does). The two custom styles are only for text styles, not background colours.
This site is now closed.
As of 1st November 2015, this site is a read-only archive. For more information see the intfiction forum post

Welcome to IF Answers, a site for questions and answers about Interactive Fiction.

Technical questions about interactive fiction development tools such as Inform, Twine, Quest, QuestKit, Squiffy, Adrift, TADS etc. are all on-topic here.

Non-technical questions about interactive fiction are also on-topic. These questions could be about general IF design, specific games, entering the IF Comp etc.
...