Program: 1030
Project: 1030
Buggy source:
public UIMenuConfigVideo(){
  setId("String_Node_Str");
  setBackgroundImage("String_Node_Str");
  setModal(true);
  maximize();
  title=new UIImage(Assets.getTexture("String_Node_Str"));
  title.setHorizontalAlign(EHorizontalAlign.CENTER);
  title.setPosition(new Vector2f(0f,128f));
  title.setVisible(true);
  title.setSize(new Vector2f(512f,128f));
  version=new UILabel("String_Node_Str");
  version.setHorizontalAlign(EHorizontalAlign.CENTER);
  version.setPosition(new Vector2f(0f,230f));
  version.setVisible(true);
  graphicsQualityButton=new UIStateButton(new Vector2f(256f,32f));
  StateButtonAction graphicsQualityStateAction=new StateButtonAction(){
    @Override public void action(    UIDisplayElement element){
      UIStateButton button=(UIStateButton)element;
switch (button.getState()) {
case 0:
        config.getRendering().setFlickeringLight(true);
      config.getRendering().setVignette(true);
    config.getRendering().setEyeAdaptation(true);
  config.getRendering().setFilmGrain(true);
config.getRendering().setBloom(false);
config.getRendering().setMotionBlur(false);
config.getRendering().setSsao(false);
config.getRendering().setLightShafts(false);
config.getRendering().setCloudShadows(false);
break;
case 1:
config.getRendering().setFlickeringLight(true);
config.getRendering().setVignette(true);
config.getRendering().setEyeAdaptation(true);
config.getRendering().setFilmGrain(true);
config.getRendering().setBloom(true);
config.getRendering().setSsao(false);
config.getRendering().setMotionBlur(false);
config.getRendering().setLightShafts(false);
config.getRendering().setCloudShadows(false);
break;
case 2:
config.getRendering().setFlickeringLight(true);
config.getRendering().setVignette(true);
config.getRendering().setEyeAdaptation(true);
config.getRendering().setFilmGrain(true);
config.getRendering().setBloom(true);
config.getRendering().setMotionBlur(true);
config.getRendering().setLightShafts(true);
config.getRendering().setCloudShadows(true);
config.getRendering().setSsao(false);
break;
case 3:
config.getRendering().setFlickeringLight(true);
config.getRendering().setVignette(true);
config.getRendering().setEyeAdaptation(true);
config.getRendering().setFilmGrain(true);
config.getRendering().setBloom(true);
config.getRendering().setMotionBlur(true);
config.getRendering().setSsao(true);
config.getRendering().setLightShafts(true);
config.getRendering().setCloudShadows(true);
break;
}
}
}
;
graphicsQualityButton.addState("String_Node_Str",graphicsQualityStateAction);
graphicsQualityButton.addState("String_Node_Str",graphicsQualityStateAction);
graphicsQualityButton.addState("String_Node_Str",graphicsQualityStateAction);
graphicsQualityButton.addState("String_Node_Str",graphicsQualityStateAction);
graphicsQualityButton.addClickListener(clickAction);
graphicsQualityButton.setHorizontalAlign(EHorizontalAlign.CENTER);
graphicsQualityButton.setPosition(new Vector2f(-graphicsQualityButton.getSize().x / 2f - 10f,300f));
graphicsQualityButton.setVisible(true);
viewingDistanceButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction viewingDistanceStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
config.getRendering().setViewDistance(ViewDistance.forIndex(button.getState()));
}
}
;
viewingDistanceButton.addState("String_Node_Str",viewingDistanceStateAction);
viewingDistanceButton.addState("String_Node_Str",viewingDistanceStateAction);
viewingDistanceButton.addState("String_Node_Str",viewingDistanceStateAction);
viewingDistanceButton.addState("String_Node_Str",viewingDistanceStateAction);
viewingDistanceButton.addClickListener(clickAction);
viewingDistanceButton.setHorizontalAlign(EHorizontalAlign.CENTER);
viewingDistanceButton.setPosition(new Vector2f(-viewingDistanceButton.getSize().x / 2f - 10f,300f + 40f));
viewingDistanceButton.setVisible(true);
fovButton=new UISlider(new Vector2f(256f,32f),75,130);
fovButton.addChangedListener(new ChangedListener(){
@Override public void changed(UIDisplayElement element){
UISlider slider=(UISlider)element;
slider.setText("String_Node_Str" + String.valueOf(slider.getValue()));
config.getRendering().setFieldOfView(slider.getValue());
}
}
);
fovButton.setHorizontalAlign(EHorizontalAlign.CENTER);
fovButton.setPosition(new Vector2f(-fovButton.getSize().x / 2f - 10f,300f + 2 * 40f));
fovButton.setVisible(true);
bobbingButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction bobbingStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
config.getRendering().setCameraBobbing(button.getState() != 0);
}
}
;
bobbingButton.addState("String_Node_Str",bobbingStateAction);
bobbingButton.addState("String_Node_Str",bobbingStateAction);
bobbingButton.addClickListener(clickAction);
bobbingButton.setHorizontalAlign(EHorizontalAlign.CENTER);
bobbingButton.setPosition(new Vector2f(-bobbingButton.getSize().x / 2f - 10f,300f + 3 * 40f));
bobbingButton.setVisible(true);
reflectiveWaterButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction reflectiveWaterStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
switch (button.getState()) {
case 0:
config.getRendering().setReflectiveWater(false);
config.getRendering().setLocalReflections(false);
break;
case 1:
config.getRendering().setReflectiveWater(false);
config.getRendering().setLocalReflections(true);
break;
case 2:
config.getRendering().setReflectiveWater(true);
config.getRendering().setLocalReflections(true);
break;
}
}
}
;
reflectiveWaterButton.addState("String_Node_Str",reflectiveWaterStateAction);
reflectiveWaterButton.addState("String_Node_Str",reflectiveWaterStateAction);
reflectiveWaterButton.addState("String_Node_Str",reflectiveWaterStateAction);
reflectiveWaterButton.addClickListener(clickAction);
reflectiveWaterButton.setHorizontalAlign(EHorizontalAlign.CENTER);
reflectiveWaterButton.setPosition(new Vector2f(reflectiveWaterButton.getSize().x / 2f,300f + 40f));
reflectiveWaterButton.setVisible(true);
blurIntensityButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction blurIntensityStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
config.getRendering().setBlurIntensity(button.getState());
}
}
;
blurIntensityButton.addState("String_Node_Str",blurIntensityStateAction);
blurIntensityButton.addState("String_Node_Str",blurIntensityStateAction);
blurIntensityButton.addState("String_Node_Str",blurIntensityStateAction);
blurIntensityButton.addState("String_Node_Str",blurIntensityStateAction);
blurIntensityButton.addClickListener(clickAction);
blurIntensityButton.setHorizontalAlign(EHorizontalAlign.CENTER);
blurIntensityButton.setPosition(new Vector2f(blurIntensityButton.getSize().x / 2f,300f + 2 * 40f));
blurIntensityButton.setVisible(true);
fullscreenButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction fullscreenStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
TerasologyEngine te=(TerasologyEngine)CoreRegistry.get(GameEngine.class);
if (button.getState() == 0) {
te.setFullscreen(false);
}
 else {
te.setFullscreen(true);
}
}
}
;
fullscreenButton.addState("String_Node_Str",fullscreenStateAction);
fullscreenButton.addState("String_Node_Str",fullscreenStateAction);
fullscreenButton.addClickListener(clickAction);
fullscreenButton.setHorizontalAlign(EHorizontalAlign.CENTER);
fullscreenButton.setPosition(new Vector2f(fullscreenButton.getSize().x / 2f,300f + 3 * 40f));
fullscreenButton.setVisible(true);
outlineButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction outlineStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
config.getRendering().setOutline(button.getState() != 0);
}
}
;
outlineButton.addState("String_Node_Str",outlineStateAction);
outlineButton.addState("String_Node_Str",outlineStateAction);
outlineButton.addClickListener(clickAction);
outlineButton.setHorizontalAlign(EHorizontalAlign.CENTER);
outlineButton.setPosition(new Vector2f(outlineButton.getSize().x / 2f,300f + 4 * 40f));
outlineButton.setVisible(true);
shadowButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction shadowStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
switch (button.getState()) {
case 0:
config.getRendering().setDynamicShadowsPcfFiltering(false);
config.getRendering().setDynamicShadows(false);
break;
case 1:
config.getRendering().setDynamicShadowsPcfFiltering(false);
config.getRendering().setDynamicShadows(true);
break;
case 2:
config.getRendering().setDynamicShadowsPcfFiltering(true);
config.getRendering().setDynamicShadows(true);
break;
}
}
}
;
shadowButton.addState("String_Node_Str",shadowStateAction);
shadowButton.addState("String_Node_Str",shadowStateAction);
shadowButton.addState("String_Node_Str",shadowStateAction);
shadowButton.addClickListener(clickAction);
shadowButton.setHorizontalAlign(EHorizontalAlign.CENTER);
shadowButton.setPosition(new Vector2f(-shadowButton.getSize().x / 2f - 10f,300f + 4 * 40f));
shadowButton.setVisible(true);
environmentEffectsButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction environmentEffectsStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
switch (button.getState()) {
case 0:
config.getRendering().setVolumetricLighting(false);
config.getRendering().setVolumetricFog(false);
config.getRendering().setAnimateGrass(false);
config.getRendering().setAnimateWater(false);
break;
case 1:
config.getRendering().setVolumetricLighting(false);
config.getRendering().setAnimateWater(false);
config.getRendering().setVolumetricFog(true);
config.getRendering().setAnimateGrass(true);
break;
case 2:
config.getRendering().setVolumetricLighting(false);
config.getRendering().setAnimateWater(true);
config.getRendering().setVolumetricFog(true);
config.getRendering().setAnimateGrass(true);
break;
case 3:
config.getRendering().setVolumetricLighting(true);
config.getRendering().setAnimateWater(true);
config.getRendering().setVolumetricFog(true);
config.getRendering().setAnimateGrass(true);
break;
}
}
}
;
environmentEffectsButton.addState("String_Node_Str",environmentEffectsStateAction);
environmentEffectsButton.addState("String_Node_Str",environmentEffectsStateAction);
environmentEffectsButton.addState("String_Node_Str",environmentEffectsStateAction);
environmentEffectsButton.addState("String_Node_Str",environmentEffectsStateAction);
environmentEffectsButton.addClickListener(clickAction);
environmentEffectsButton.setHorizontalAlign(EHorizontalAlign.CENTER);
environmentEffectsButton.setPosition(new Vector2f(environmentEffectsButton.getSize().x / 2f,300f));
environmentEffectsButton.setVisible(true);
vSyncButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction vSyncStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
TerasologyEngine te=(TerasologyEngine)CoreRegistry.get(GameEngine.class);
if (button.getState() == 0) {
te.setVSync(false);
}
 else {
te.setVSync(true);
}
}
}
;
vSyncButton.addState("String_Node_Str",vSyncStateAction);
vSyncButton.addState("String_Node_Str",vSyncStateAction);
vSyncButton.addClickListener(clickAction);
vSyncButton.setHorizontalAlign(EHorizontalAlign.CENTER);
vSyncButton.setPosition(new Vector2f(-vSyncButton.getSize().x / 2f - 10f,300f + 5 * 40f));
vSyncButton.setVisible(true);
backToConfigMenuButton=new UIButton(new Vector2f(256f,32f),UIButton.ButtonType.NORMAL);
backToConfigMenuButton.getLabel().setText("String_Node_Str");
backToConfigMenuButton.setHorizontalAlign(EHorizontalAlign.CENTER);
backToConfigMenuButton.setPosition(new Vector2f(0f,300f + 7 * 40f));
backToConfigMenuButton.setVisible(true);
backToConfigMenuButton.addClickListener(new ClickListener(){
@Override public void click(UIDisplayElement element,int button){
CoreRegistry.get(ShaderManager.class).recompileAllShaders();
getGUIManager().openWindow("String_Node_Str");
}
}
);
addDisplayElement(title);
addDisplayElement(version);
addDisplayElement(graphicsQualityButton);
addDisplayElement(fovButton);
addDisplayElement(viewingDistanceButton);
addDisplayElement(reflectiveWaterButton);
addDisplayElement(blurIntensityButton);
addDisplayElement(bobbingButton);
addDisplayElement(backToConfigMenuButton);
addDisplayElement(fullscreenButton);
addDisplayElement(outlineButton);
addDisplayElement(shadowButton);
addDisplayElement(environmentEffectsButton);
addDisplayElement(vSyncButton);
setup();
}

Fixed version (ground truth):
public UIMenuConfigVideo(){
  setId("String_Node_Str");
  setBackgroundImage("String_Node_Str");
  setModal(true);
  maximize();
  title=new UIImage(Assets.getTexture("String_Node_Str"));
  title.setHorizontalAlign(EHorizontalAlign.CENTER);
  title.setPosition(new Vector2f(0f,128f));
  title.setVisible(true);
  title.setSize(new Vector2f(512f,128f));
  version=new UILabel("String_Node_Str");
  version.setHorizontalAlign(EHorizontalAlign.CENTER);
  version.setPosition(new Vector2f(0f,230f));
  version.setVisible(true);
  graphicsQualityButton=new UIStateButton(new Vector2f(256f,32f));
  StateButtonAction graphicsQualityStateAction=new StateButtonAction(){
    @Override public void action(    UIDisplayElement element){
      UIStateButton button=(UIStateButton)element;
switch (button.getState()) {
case 0:
        config.getRendering().setFlickeringLight(true);
      config.getRendering().setVignette(true);
    config.getRendering().setEyeAdaptation(true);
  config.getRendering().setFilmGrain(true);
config.getRendering().setBloom(false);
config.getRendering().setMotionBlur(false);
config.getRendering().setSsao(false);
config.getRendering().setLightShafts(false);
config.getRendering().setCloudShadows(false);
break;
case 1:
config.getRendering().setFlickeringLight(true);
config.getRendering().setVignette(true);
config.getRendering().setEyeAdaptation(true);
config.getRendering().setFilmGrain(true);
config.getRendering().setBloom(true);
config.getRendering().setSsao(false);
config.getRendering().setMotionBlur(false);
config.getRendering().setLightShafts(false);
config.getRendering().setCloudShadows(false);
break;
case 2:
config.getRendering().setFlickeringLight(true);
config.getRendering().setVignette(true);
config.getRendering().setEyeAdaptation(true);
config.getRendering().setFilmGrain(true);
config.getRendering().setBloom(true);
config.getRendering().setMotionBlur(true);
config.getRendering().setLightShafts(true);
config.getRendering().setCloudShadows(true);
config.getRendering().setSsao(false);
break;
case 3:
config.getRendering().setFlickeringLight(true);
config.getRendering().setVignette(true);
config.getRendering().setEyeAdaptation(true);
config.getRendering().setFilmGrain(true);
config.getRendering().setBloom(true);
config.getRendering().setMotionBlur(true);
config.getRendering().setSsao(true);
config.getRendering().setLightShafts(true);
config.getRendering().setCloudShadows(true);
break;
}
}
}
;
graphicsQualityButton.addState("String_Node_Str",graphicsQualityStateAction);
graphicsQualityButton.addState("String_Node_Str",graphicsQualityStateAction);
graphicsQualityButton.addState("String_Node_Str",graphicsQualityStateAction);
graphicsQualityButton.addState("String_Node_Str",graphicsQualityStateAction);
graphicsQualityButton.addClickListener(clickAction);
graphicsQualityButton.setHorizontalAlign(EHorizontalAlign.CENTER);
graphicsQualityButton.setPosition(new Vector2f(-graphicsQualityButton.getSize().x / 2f - 10f,300f));
graphicsQualityButton.setVisible(true);
viewingDistanceButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction viewingDistanceStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
config.getRendering().setViewDistance(ViewDistance.forIndex(button.getState()));
}
}
;
viewingDistanceButton.addState("String_Node_Str",viewingDistanceStateAction);
viewingDistanceButton.addState("String_Node_Str",viewingDistanceStateAction);
viewingDistanceButton.addState("String_Node_Str",viewingDistanceStateAction);
viewingDistanceButton.addState("String_Node_Str",viewingDistanceStateAction);
viewingDistanceButton.addState("String_Node_Str",viewingDistanceStateAction);
viewingDistanceButton.addState("String_Node_Str",viewingDistanceStateAction);
viewingDistanceButton.addClickListener(clickAction);
viewingDistanceButton.setHorizontalAlign(EHorizontalAlign.CENTER);
viewingDistanceButton.setPosition(new Vector2f(-viewingDistanceButton.getSize().x / 2f - 10f,300f + 40f));
viewingDistanceButton.setVisible(true);
fovButton=new UISlider(new Vector2f(256f,32f),75,130);
fovButton.addChangedListener(new ChangedListener(){
@Override public void changed(UIDisplayElement element){
UISlider slider=(UISlider)element;
slider.setText("String_Node_Str" + String.valueOf(slider.getValue()));
config.getRendering().setFieldOfView(slider.getValue());
}
}
);
fovButton.setHorizontalAlign(EHorizontalAlign.CENTER);
fovButton.setPosition(new Vector2f(-fovButton.getSize().x / 2f - 10f,300f + 2 * 40f));
fovButton.setVisible(true);
bobbingButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction bobbingStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
config.getRendering().setCameraBobbing(button.getState() != 0);
}
}
;
bobbingButton.addState("String_Node_Str",bobbingStateAction);
bobbingButton.addState("String_Node_Str",bobbingStateAction);
bobbingButton.addClickListener(clickAction);
bobbingButton.setHorizontalAlign(EHorizontalAlign.CENTER);
bobbingButton.setPosition(new Vector2f(-bobbingButton.getSize().x / 2f - 10f,300f + 3 * 40f));
bobbingButton.setVisible(true);
reflectiveWaterButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction reflectiveWaterStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
switch (button.getState()) {
case 0:
config.getRendering().setReflectiveWater(false);
config.getRendering().setLocalReflections(false);
break;
case 1:
config.getRendering().setReflectiveWater(false);
config.getRendering().setLocalReflections(true);
break;
case 2:
config.getRendering().setReflectiveWater(true);
config.getRendering().setLocalReflections(true);
break;
}
}
}
;
reflectiveWaterButton.addState("String_Node_Str",reflectiveWaterStateAction);
reflectiveWaterButton.addState("String_Node_Str",reflectiveWaterStateAction);
reflectiveWaterButton.addState("String_Node_Str",reflectiveWaterStateAction);
reflectiveWaterButton.addClickListener(clickAction);
reflectiveWaterButton.setHorizontalAlign(EHorizontalAlign.CENTER);
reflectiveWaterButton.setPosition(new Vector2f(reflectiveWaterButton.getSize().x / 2f,300f + 40f));
reflectiveWaterButton.setVisible(true);
blurIntensityButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction blurIntensityStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
config.getRendering().setBlurIntensity(button.getState());
}
}
;
blurIntensityButton.addState("String_Node_Str",blurIntensityStateAction);
blurIntensityButton.addState("String_Node_Str",blurIntensityStateAction);
blurIntensityButton.addState("String_Node_Str",blurIntensityStateAction);
blurIntensityButton.addState("String_Node_Str",blurIntensityStateAction);
blurIntensityButton.addClickListener(clickAction);
blurIntensityButton.setHorizontalAlign(EHorizontalAlign.CENTER);
blurIntensityButton.setPosition(new Vector2f(blurIntensityButton.getSize().x / 2f,300f + 2 * 40f));
blurIntensityButton.setVisible(true);
fullscreenButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction fullscreenStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
TerasologyEngine te=(TerasologyEngine)CoreRegistry.get(GameEngine.class);
if (button.getState() == 0) {
te.setFullscreen(false);
}
 else {
te.setFullscreen(true);
}
}
}
;
fullscreenButton.addState("String_Node_Str",fullscreenStateAction);
fullscreenButton.addState("String_Node_Str",fullscreenStateAction);
fullscreenButton.addClickListener(clickAction);
fullscreenButton.setHorizontalAlign(EHorizontalAlign.CENTER);
fullscreenButton.setPosition(new Vector2f(fullscreenButton.getSize().x / 2f,300f + 3 * 40f));
fullscreenButton.setVisible(true);
outlineButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction outlineStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
config.getRendering().setOutline(button.getState() != 0);
}
}
;
outlineButton.addState("String_Node_Str",outlineStateAction);
outlineButton.addState("String_Node_Str",outlineStateAction);
outlineButton.addClickListener(clickAction);
outlineButton.setHorizontalAlign(EHorizontalAlign.CENTER);
outlineButton.setPosition(new Vector2f(outlineButton.getSize().x / 2f,300f + 4 * 40f));
outlineButton.setVisible(true);
shadowButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction shadowStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
switch (button.getState()) {
case 0:
config.getRendering().setDynamicShadowsPcfFiltering(false);
config.getRendering().setDynamicShadows(false);
break;
case 1:
config.getRendering().setDynamicShadowsPcfFiltering(false);
config.getRendering().setDynamicShadows(true);
break;
case 2:
config.getRendering().setDynamicShadowsPcfFiltering(true);
config.getRendering().setDynamicShadows(true);
break;
}
}
}
;
shadowButton.addState("String_Node_Str",shadowStateAction);
shadowButton.addState("String_Node_Str",shadowStateAction);
shadowButton.addState("String_Node_Str",shadowStateAction);
shadowButton.addClickListener(clickAction);
shadowButton.setHorizontalAlign(EHorizontalAlign.CENTER);
shadowButton.setPosition(new Vector2f(-shadowButton.getSize().x / 2f - 10f,300f + 4 * 40f));
shadowButton.setVisible(true);
environmentEffectsButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction environmentEffectsStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
switch (button.getState()) {
case 0:
config.getRendering().setVolumetricLighting(false);
config.getRendering().setVolumetricFog(false);
config.getRendering().setAnimateGrass(false);
config.getRendering().setAnimateWater(false);
break;
case 1:
config.getRendering().setVolumetricLighting(false);
config.getRendering().setAnimateWater(false);
config.getRendering().setVolumetricFog(true);
config.getRendering().setAnimateGrass(true);
break;
case 2:
config.getRendering().setVolumetricLighting(false);
config.getRendering().setAnimateWater(true);
config.getRendering().setVolumetricFog(true);
config.getRendering().setAnimateGrass(true);
break;
case 3:
config.getRendering().setVolumetricLighting(true);
config.getRendering().setAnimateWater(true);
config.getRendering().setVolumetricFog(true);
config.getRendering().setAnimateGrass(true);
break;
}
}
}
;
environmentEffectsButton.addState("String_Node_Str",environmentEffectsStateAction);
environmentEffectsButton.addState("String_Node_Str",environmentEffectsStateAction);
environmentEffectsButton.addState("String_Node_Str",environmentEffectsStateAction);
environmentEffectsButton.addState("String_Node_Str",environmentEffectsStateAction);
environmentEffectsButton.addClickListener(clickAction);
environmentEffectsButton.setHorizontalAlign(EHorizontalAlign.CENTER);
environmentEffectsButton.setPosition(new Vector2f(environmentEffectsButton.getSize().x / 2f,300f));
environmentEffectsButton.setVisible(true);
vSyncButton=new UIStateButton(new Vector2f(256f,32f));
StateButtonAction vSyncStateAction=new StateButtonAction(){
@Override public void action(UIDisplayElement element){
UIStateButton button=(UIStateButton)element;
TerasologyEngine te=(TerasologyEngine)CoreRegistry.get(GameEngine.class);
if (button.getState() == 0) {
te.setVSync(false);
}
 else {
te.setVSync(true);
}
}
}
;
vSyncButton.addState("String_Node_Str",vSyncStateAction);
vSyncButton.addState("String_Node_Str",vSyncStateAction);
vSyncButton.addClickListener(clickAction);
vSyncButton.setHorizontalAlign(EHorizontalAlign.CENTER);
vSyncButton.setPosition(new Vector2f(-vSyncButton.getSize().x / 2f - 10f,300f + 5 * 40f));
vSyncButton.setVisible(true);
backToConfigMenuButton=new UIButton(new Vector2f(256f,32f),UIButton.ButtonType.NORMAL);
backToConfigMenuButton.getLabel().setText("String_Node_Str");
backToConfigMenuButton.setHorizontalAlign(EHorizontalAlign.CENTER);
backToConfigMenuButton.setPosition(new Vector2f(0f,300f + 7 * 40f));
backToConfigMenuButton.setVisible(true);
backToConfigMenuButton.addClickListener(new ClickListener(){
@Override public void click(UIDisplayElement element,int button){
CoreRegistry.get(ShaderManager.class).recompileAllShaders();
getGUIManager().openWindow("String_Node_Str");
}
}
);
addDisplayElement(title);
addDisplayElement(version);
addDisplayElement(graphicsQualityButton);
addDisplayElement(fovButton);
addDisplayElement(viewingDistanceButton);
addDisplayElement(reflectiveWaterButton);
addDisplayElement(blurIntensityButton);
addDisplayElement(bobbingButton);
addDisplayElement(backToConfigMenuButton);
addDisplayElement(fullscreenButton);
addDisplayElement(outlineButton);
addDisplayElement(shadowButton);
addDisplayElement(environmentEffectsButton);
addDisplayElement(vSyncButton);
setup();
}