Cleaned up a bit of the unimplemented full-width terminal mode.

And promptly disabled it by correctly filtering against the settings.
This commit is contained in:
Sebastian Hartte
2020-06-14 19:02:13 +02:00
parent cbbb9d1ade
commit 42651ed087
3 changed files with 21 additions and 20 deletions
@@ -62,6 +62,7 @@ public class GuiSettingToggleButton<T extends Enum<T>> extends GuiIconButton
// Build a list of values (in order) that are valid w.r.t. the given predicate
EnumSet<T> validValues = EnumSet.allOf(val.getDeclaringClass());
validValues.removeIf(isValidValue.negate());
validValues.removeIf(s -> !setting.getPossibleValues().contains(s));
this.validValues = validValues;
this.buttonSetting = setting;
@@ -65,7 +65,7 @@ public class GuiToggleButton extends Button implements ITooltip
RenderSystem.color4f( 1.0f, 1.0f, 1.0f, 1.0f );
Minecraft.getInstance().textureManager.bindTexture( TEXTURE_STATES );
final int uv_y = (int) Math.floor( iconIndex / 16 );
final int uv_y = iconIndex / 16;
final int uv_x = iconIndex - uv_y * 16;
GuiUtils.drawTexturedModalRect( this.x, this.y, 256 - 16, 256 - 16, 16, 16, 0 );