v0.8.1: fixed minor alignment errors in option slider
This commit is contained in:
parent
15718fc30f
commit
8578e3c397
|
@ -121,7 +121,8 @@ public abstract class OptionSlider extends Component {
|
||||||
|
|
||||||
//sets the selected value
|
//sets the selected value
|
||||||
selectedVal = minVal + Math.round(sliderNode.x / tickDist);
|
selectedVal = minVal + Math.round(sliderNode.x / tickDist);
|
||||||
sliderNode.x = (int) (x + tickDist * (selectedVal - minVal));
|
sliderNode.x = x + tickDist * (selectedVal - minVal);
|
||||||
|
PixelScene.align(sliderNode);
|
||||||
onChange();
|
onChange();
|
||||||
pressed = false;
|
pressed = false;
|
||||||
}
|
}
|
||||||
|
@ -152,7 +153,8 @@ public abstract class OptionSlider extends Component {
|
||||||
tickDist = sliderBG.width()/(maxVal - minVal);
|
tickDist = sliderBG.width()/(maxVal - minVal);
|
||||||
for (int i = 0; i < sliderTicks.length; i++){
|
for (int i = 0; i < sliderTicks.length; i++){
|
||||||
sliderTicks[i].y = sliderBG.y-5;
|
sliderTicks[i].y = sliderBG.y-5;
|
||||||
sliderTicks[i].x = (int)(x + 2 + (tickDist*i));
|
sliderTicks[i].x = x + 2 + (tickDist*i);
|
||||||
|
PixelScene.align(sliderTicks[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
minTxt.setPos(
|
minTxt.setPos(
|
||||||
|
@ -164,8 +166,9 @@ public abstract class OptionSlider extends Component {
|
||||||
sliderBG.y-6-minTxt.height()
|
sliderBG.y-6-minTxt.height()
|
||||||
);
|
);
|
||||||
|
|
||||||
sliderNode.x = (int)(x + tickDist*(selectedVal-minVal));
|
sliderNode.x = x + tickDist*(selectedVal-minVal);
|
||||||
sliderNode.y = sliderBG.y-4;
|
sliderNode.y = sliderBG.y-4;
|
||||||
|
PixelScene.align(sliderNode);
|
||||||
|
|
||||||
pointerArea.x = x;
|
pointerArea.x = x;
|
||||||
pointerArea.y = y;
|
pointerArea.y = y;
|
||||||
|
|
|
@ -360,7 +360,7 @@ public class WndSettings extends WndTabbed {
|
||||||
Assets.Sounds.ITEM,
|
Assets.Sounds.ITEM,
|
||||||
Assets.Sounds.SHATTER,
|
Assets.Sounds.SHATTER,
|
||||||
Assets.Sounds.EVOKE,
|
Assets.Sounds.EVOKE,
|
||||||
Assets.Sounds.TELEPORT));
|
Assets.Sounds.SECRET));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user