v0.4.3: adjusted some elements of power saver
This commit is contained in:
parent
debbb57066
commit
250652ac04
|
@ -340,8 +340,8 @@ public class ShatteredPixelDungeon extends Game {
|
|||
|
||||
int maxZoom = (int)Math.min(dispWidth/renderWidth, dispHeight/renderHeight);
|
||||
|
||||
renderWidth *= GameMath.gate( 2, (float)Math.ceil(maxZoom/2f), 4);
|
||||
renderHeight *= GameMath.gate( 2, (float)Math.ceil(maxZoom/2f), 4);
|
||||
renderWidth *= Math.max( 2, Math.round(maxZoom/2f));
|
||||
renderHeight *= Math.max( 2, Math.round(maxZoom/2f));
|
||||
|
||||
if (dispRatio > renderWidth / renderHeight){
|
||||
renderWidth = renderHeight * dispRatio;
|
||||
|
|
|
@ -158,20 +158,24 @@ public class WndSettings extends WndTabbed {
|
|||
@Override
|
||||
protected void onClick() {
|
||||
super.onClick();
|
||||
checked( !checked() );
|
||||
ShatteredPixelDungeon.scene().add(new WndOptions(
|
||||
Messages.get(ScreenTab.class, "saver"),
|
||||
Messages.get(ScreenTab.class, "saver_desc"),
|
||||
Messages.get(ScreenTab.class, "okay"),
|
||||
Messages.get(ScreenTab.class, "cancel")){
|
||||
@Override
|
||||
protected void onSelect(int index) {
|
||||
if (index == 0){
|
||||
checked( !checked() );
|
||||
ShatteredPixelDungeon.powerSaver(checked());
|
||||
if (checked()) {
|
||||
checked(!checked());
|
||||
ShatteredPixelDungeon.scene().add(new WndOptions(
|
||||
Messages.get(ScreenTab.class, "saver"),
|
||||
Messages.get(ScreenTab.class, "saver_desc"),
|
||||
Messages.get(ScreenTab.class, "okay"),
|
||||
Messages.get(ScreenTab.class, "cancel")) {
|
||||
@Override
|
||||
protected void onSelect(int index) {
|
||||
if (index == 0) {
|
||||
checked(!checked());
|
||||
ShatteredPixelDungeon.powerSaver(checked());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
ShatteredPixelDungeon.powerSaver(checked());
|
||||
}
|
||||
}
|
||||
};
|
||||
chkSaver.setRect( 0, chkImmersive.bottom() + GAP_TINY, WIDTH, BTN_HEIGHT );
|
||||
|
|
|
@ -88,8 +88,8 @@ windows.wndsettings$screentab.brightness=Brightness
|
|||
windows.wndsettings$screentab.dark=Dark
|
||||
windows.wndsettings$screentab.bright=Bright
|
||||
windows.wndsettings$screentab.soft_keys=Hide Software Keys
|
||||
windows.wndsettings$screentab.saver=Power Saver Mode
|
||||
windows.wndsettings$screentab.saver_desc=Power saver mode draws the game at a reduced size and scales it up to fit your screen.\n\nThis will make the graphics less crisp, but will improve performance and battery life.\n\nYou may need to restart the game for changes to take effect.
|
||||
windows.wndsettings$screentab.saver=Power Saver
|
||||
windows.wndsettings$screentab.saver_desc=Power Saver mode draws the game at a reduced size and scales it up to fit your screen.\n\nThis will make graphics less crisp and enlarge the UI slightly, but will also improve performance and battery life.\n\nYou may need to restart the game for changes to take effect.
|
||||
windows.wndsettings$screentab.okay=Okay
|
||||
windows.wndsettings$screentab.cancel=Cancel
|
||||
windows.wndsettings$screentab.portrait=Switch to portrait
|
||||
|
|
Loading…
Reference in New Issue
Block a user