I’m playing a blb game in remglk and I get some of the text styled as "style":"user2"
is there a way of getting the style sheet the user created?
Do you mean stylehints? I started adding support to my Remglk fork, but I’ll probably change the protocol in the future.
Ooooh… exactly this.
Thank you… I’ll test it
I’m testing your changes with this: Remakorp - Details
I’ve added “stylehints” to support
but I still get style “user2”: but no idea on what the colors should be
{"content":[{ "style":"user2", "text":" Siglo XXII"}]},
(see line 17 on the first answer)
I’m obviously using this wrong but I have no clue where to look. Any hint ( pun intended)
The stylehints are sent when a window is first created.
Edit: I see that you’ve got the first gen response there, so the stylehints should be listed. Are you sure it actually sets them? Does it work in other interpreters?
Well it works here (using Quixe rather than Glulxe+Remglk), so the stylehint functions are at least being called. Parchment (Though the game does make a Glk API error and crash immediately.)
Are you sure you’re compiling/linking it correctly?
I see. I’m sure I’m doing something wrong.
The if I’m testing works on gargoyle (with git 1.3.6 interpreter)
but I get css parsing errors in the console:
(gargoyle:28362): Gtk-WARNING **: 14:54:04.854: Theme parsing error: colors.css:71:44: Invalid number for color value
So, is there an if, you know it works properly I could use to test?
Aotearoa is a good one for testing stylehints. As far as I know it’s bug free.
Ah, so silly of me: I was not linking your lib but the old build one ¬¬
SORRY
Now I have something to play with:
"stylehints": [{"color": "#FF2000", "background-color": "#000000"}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}], "left":0, "top":0, "width":1000, "height":14 }
That’s for the status window - red on black. The other window should also have stylehints now.
Yes, the buffer window has its own stylehint as well
"stylehints": [{}, {"color": "#AAAA00"}, {"color": "#FFFF00"}, {"color": "#00EE00"}, {"color": "#FF0000"}, {"color": "#AAAA00"}, {"color": "#FFFFFF", "background-color": "#357D63"}, {"color": "#666699"}, {"color": "#0000FF"}, {"color": "#AAAA00"}, {"font-size": "1.4em", "color": "#357D63"}], "left":0, "top":14, "width":1000, "height":786 }
I guess those are the styles by order:
Emphasized, Preformatted, …, User2
Cool
This is actually a message coming from the UI toolkit used by older Gargoyle releases, and has to do with the toolkit theme. It’s unrelated to the IF being played (the toolkit, Gtk+, uses CSS to do widget theming).
Oh, thanks for the explanation.
I forgot to test with the recent appimage