MCPcopy Create free account
hub / github.com/demoth/jake2 / BrightnessCallback

Method BrightnessCallback

client/src/main/java/jake2/client/VID.java:380–393  ·  view source on GitHub ↗
( Object s )

Source from the content-addressed store, hash-verified

378 }
379
380 static void BrightnessCallback( Object s )
381 {
382 Menu.menuslider_s slider = (Menu.menuslider_s) s;
383
384 // if ( stricmp( vid_ref.string, "soft" ) == 0 ||
385 // stricmp( vid_ref.string, "softx" ) == 0 )
386 if ( vid_ref.string.equalsIgnoreCase("soft") ||
387 vid_ref.string.equalsIgnoreCase("softx") )
388 {
389 float gamma = ( 0.8f - ( slider.curvalue/10.0f - 0.5f ) ) + 0.5f;
390
391 Cvar.getInstance().SetValue( "vid_gamma", gamma );
392 }
393 }
394
395 static void ResetDefaults( Object unused )
396 {

Callers 1

executeMethod · 0.95

Calls 2

getInstanceMethod · 0.95
SetValueMethod · 0.80

Tested by

no test coverage detected