mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-26 22:38:00 +01:00
Give the hidden setting some <3
This commit is contained in:
parent
0f0849d7da
commit
60c81cc095
3 changed files with 32 additions and 11 deletions
|
@ -79,7 +79,8 @@ public class PonyConfig extends SensibleConfig implements Exposable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGlobalScaleFactor(float f) {
|
public void setGlobalScaleFactor(float f) {
|
||||||
globalScaleFactor = Math.round(MathHelper.clamp(f, 0.1F, 1) * 100) / 100F;
|
globalScaleFactor = Math.round(MathHelper.clamp(f, 0.1F, 3) * 100) / 100F;
|
||||||
|
showscale = globalScaleFactor != 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -46,15 +46,9 @@ public class GuiPonySettings extends SettingsPanel {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (isCtrlKeyDown() && isShiftKeyDown()) {
|
if (isCtrlKeyDown() && isShiftKeyDown()) {
|
||||||
addButton(new Label(LEFT, row += 30, OPTIONS_PREFIX + "global_scale", -1));
|
addButton(new Label(LEFT, row += 30, "minelp.debug.scale", -1));
|
||||||
addButton(new Slider(LEFT, row += 15, 0.1F, 1, config.getGlobalScaleFactor(), (int id, String name, float value) -> {
|
addButton(new Slider(LEFT, row += 15, 0.1F, 3, config.getGlobalScaleFactor(), (int id, String name, float value) -> {
|
||||||
if (value >= 1) {
|
return format("minelp.debug.scale.value", format(describeCurrentScale(value)));
|
||||||
return "Scale: Default";
|
|
||||||
}
|
|
||||||
if (value == 0.9F) {
|
|
||||||
return "Scale: Show Accurate";
|
|
||||||
}
|
|
||||||
return String.format("Scale: %f", value);
|
|
||||||
}, v -> {
|
}, v -> {
|
||||||
config.setGlobalScaleFactor(v);
|
config.setGlobalScaleFactor(v);
|
||||||
return config.getGlobalScaleFactor();
|
return config.getGlobalScaleFactor();
|
||||||
|
@ -79,6 +73,25 @@ public class GuiPonySettings extends SettingsPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String describeCurrentScale(float value) {
|
||||||
|
if (value >= 3) {
|
||||||
|
return format("minelp.debug.scale.meg");
|
||||||
|
}
|
||||||
|
if (value == 2) {
|
||||||
|
return format("minelp.debug.scale.max");
|
||||||
|
}
|
||||||
|
if (value == 1) {
|
||||||
|
return format("minelp.debug.scale.mid");
|
||||||
|
}
|
||||||
|
if (value == 0.9F) {
|
||||||
|
return format("minelp.debug.scale.sa");
|
||||||
|
}
|
||||||
|
if (value <= 0.1F) {
|
||||||
|
return format("minelp.debug.scale.min");
|
||||||
|
}
|
||||||
|
return String.format("%f", value);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawContents(int mouseX, int mouseY, float partialTicks) {
|
public void drawContents(int mouseX, int mouseY, float partialTicks) {
|
||||||
drawDefaultBackground();
|
drawDefaultBackground();
|
||||||
|
|
|
@ -25,3 +25,10 @@ minelp.mode.dry=Land pony
|
||||||
minelp.mode.wet=Sea pony
|
minelp.mode.wet=Sea pony
|
||||||
|
|
||||||
minelp.debug.reload_models.message=Reloading pony models...
|
minelp.debug.reload_models.message=Reloading pony models...
|
||||||
|
minelp.debug.scale=Scaling Factor
|
||||||
|
minelp.debug.scale.value=Scale: %s
|
||||||
|
minelp.debug.scale.meg=Mega
|
||||||
|
minelp.debug.scale.max=Double
|
||||||
|
minelp.debug.scale.mid=Default
|
||||||
|
minelp.debug.scale.sa=Show Accurate
|
||||||
|
minelp.debug.scale.min=Miniscule
|
Loading…
Reference in a new issue