(solved) Colors of dialog selection

Started by Radiant, Fri 20/09/2013 00:10:42

Previous topic - Next topic

Radiant

I can't seem to find the function to change the color of dialog options on the (custom) dialog screen. I'm sure it's possible to change this from the default white (and red for mouseover)?

monkey0506

Are you using a specific module? If you're using the custom rendering yourself, then you can just track it yourself. The built-in system uses player.SpeechColor for drawing the options, and you said "red" on mouseover, but I'm pretty sure it's yellow? The game.read_dialog_option_color is unused by the built-in system unless you expressly change it.

Any module should have some public methods or properties to override this, but should presumably emulate the built-in behavior by default, which the module would be handling internally.

Again, if you're handling it yourself, just use a couple of global variables for the normal and highlight colors.

Radiant

No module, just the default. Ok, so I can easily change the option color, and I cannot change the mouseover color unless I make my own dialog system?

monkey0506

Right. It seemed a bit odd to me, but there was never a game.highlighted_dialog_option_color or anything like that.

Just in case you're not aware, be sure to read up on the Custom dialog options rendering and DialogOptionsRenderingInfo in the manual. You don't have to replace the entire dialog system, just the bit that draws it onto the screen. If you always rely on the SpeechColor for the normal color and game.read_dialog_option_color for the "visited" color (to use your terminology ;) ) then you'd only need one global variable for the highlighted color, which would be the ActiveOptionID when using the rendering methods. The process is pretty simple unless you need some extravagant features.

Radiant

Or should I beg for a game.highlighted_dialog_option_color to be added to the current 3.3 beta build? :D

Crimson Wizard

#5
I think (judging on what I saw in the engine code) that the highlight colour is set to the gui's foreground color (if you set a custom gui for dialog options), but for some reason this works only for "QFG4-style" (which is fullscreen dialog, I suppose).

In all other cases a hard-coded color is used. (wtf)

Radiant

Hey, that worked. Yes, if you use a custom GUI then the text color of that GUI is used, even in Sierra-style-with-background.

monkey0506

Interesting. I wasn't aware of that. Well, guess we got that all squared away for you! ;)

SMF spam blocked by CleanTalk