momentum-mod/panorama

Add mat_brightness to settings

SlidyBat opened this issue · 3 comments

Should be able to replace the brightness slider with this cvar, although the scale slightly differs.
Other cvar was default brightness at value of 2.2, whereas mat_brightness is default brightness at 1.

Although mat_brightness has min/max range of 0-10, should probably limit slider to something more reasonable, like 0.7-1.3.

I was trying to implement this but unless I'm mistaken the brightness id needs to be changed in C++, I get a source engine error when it can't find it and the game crashes. But it needs to be removed/changed so the slider isn't greyed out when not in fullscreen.

Are settings ids defined anywhere the user can edit? I couldn't find anything

Also additional question: where are the #GAMEUI_X strings defined?

Thanks for looking at this.

I was trying to impalement this but unless I'm mistaken the brightness id needs to be changed in C++, I get a source engine error when it can't find it and the game crashes. But it needs to be removed/changed so the slider isn't greyed out when not in fullscreen.

You are right, there is some hardcoded C++ code that disables the slider for non-fullscreen modes. I'll work on removing that logic, since brightness isn't tied to any specific mode anymore, and then everything can be handled from XML side.

Are settings ids defined anywhere the user can edit? I couldn't find anything

What do you mean by setting ids?

Also additional question: where are the #GAMEUI_X strings defined?

Should be in the translation files in the resource/ folder (e.g. momentum_english.txt)

I meant the id=“brightness” tag, I didn’t know if the user could edit it’s properties or if it was C++ code, but you said it was hard coded, so never mind.