i’m sure i’m making this harder than it actually is, but futzing with the status bar in dialog is messing with my brain.
all i want to do is BOLD the score (this has specific meaning under certain game conditions).
i’ve tried this but it doesn’t work:
(redraw status bar)
(status bar @status) {
(status headline)
(current score $Score)
(div @score) {
(span @bold)Score: $Score
(if) (maximum score $Max) (then)
of $Max
(endif)
}
}
1 Like
bkirwi
(Ben Kirwin)
November 27, 2023, 3:07am
2
Heartbreaking news, but:
Spans and inline style changes (bold, italic, reverse, fixed pitch, and roman) are ignored in the top status area.
Via: Chapter 5: Input and output
However! You can achieve very similar effects using divs. For example:
(style class @bold)
font-weight: bold;
float: left;
(style class @status)
font-weight: normal;
(redraw status bar)
(status bar @status) {
(div @bold) { Score: 1 }
Score: 1000
}
3 Likes
nephar
(Timur Ozturk)
November 27, 2023, 10:20am
3
This only works in Å-machine right?
bkirwi
(Ben Kirwin)
November 27, 2023, 2:10pm
4
So far I’ve only tested it in the Aa-machine… but I believe the div-based approach should work on the Z-machine too, based on the docs at least!
1 Like
Draconis
(Daniel Stelzer)
November 27, 2023, 8:30pm
5
I’m not actually sure if you can use bold and italics in the Z-machine status line. (Not as a Dialog thing, as a Z-machine standard thing.) You certainly can’t switch fixed-pitch on and off.
1 Like
Dannii
November 27, 2023, 8:36pm
6
Bold, italics, and colours should work in the Z-Machine’s upper window, but I don’t know if Dialog lets you control that.
1 Like
yeah, tried the above and it didn’t work. and, yes, you can use bold (at least) in the z-machine status line (it can be done with inform, anyway). i guess this just isn’t possible in dialog.
1 Like
bkirwi
(Ben Kirwin)
November 28, 2023, 2:59am
8
Yeah, tested and confirmed. Odd! There’s no reason I know of it shouldn’t be possible. (Though I can’t make heads or tails of the compiler source…)