v0.3.1: fixed some bugs relating to display scaling and very small screens

This commit is contained in:
Evan Debenham
2015-07-17 23:47:30 -04:00
committed by Evan Debenham
parent 36ccb6d48d
commit a1e9b10358
4 changed files with 6 additions and 13 deletions
@@ -63,7 +63,11 @@ public abstract class OptionSlider extends Component {
this.minVal = minVal;
this.maxVal = maxVal;
if (minVal > maxVal) throw new IllegalArgumentException();
//really shouldn't display the slider if this happens.
if (minVal > maxVal){
active = false;
visible = false;
}
sliderTicks = new ColorBlock[(maxVal - minVal) + 1];
for (int i = 0; i < sliderTicks.length; i++){
@@ -46,6 +46,7 @@ public class WndDisplay extends Window {
@Override
protected void onChange() {
ShatteredPixelDungeon.scale(getSelectedValue());
ShatteredPixelDungeon.resetScene();
}
};
scale.setSelectedValue(PixelScene.defaultZoom);