Login
Remember
IF Answers
Ask a Question

# 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?)

related to an answer for: With Flexible Windows, can I make the background color of one window always match another one? (Inform 7)

- flexible-windows
- inform7
- glulx
- css

## 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.

## Related questions

- In Flexible Windows, is it acceptable to set, e.g., the window position at or after the start of play? (Inform 7)
- With Flexible Windows by Jon Ingold, is there a way to make the text display at the top of the window, even in Gargoyle? (Inform 7)
- How do you use a hyperlink to paste text without (in effect) pressing enter? (Flexible Windows, Inform 7)
- How do you avoid an extra line break when refreshing a window with Flexible Windows (Inform 7)?
- With Flexible Windows, can I make the background color of one window always match another one? (Inform 7)

...