Skip to content

Commit

Permalink
Improved "faster interlevel scene" setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Smujb committed Feb 12, 2021
1 parent e2ff5c2 commit c08b07b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion core/src/main/assets/messages/windows/windows.properties
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ windows.wndsettings$displaytab.dark=Dark
windows.wndsettings$displaytab.bright=Bright
windows.wndsettings$displaytab.visual_grid=Visual Grid
windows.wndsettings$displaytab.cutscenes=Rewatch Cutscenes
windows.wndsettings$displaytab.fast=Fast interlevel scene
windows.wndsettings$displaytab.fast=Faster transitions
windows.wndsettings$displaytab.off=Off
windows.wndsettings$displaytab.high=High
windows.wndsettings$displaytab.particles=Particles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ public static boolean watchedCutscene(String sceneID) {
return getBoolean(Messages.format(KEY_CUTSCENE, sceneID), false );
}

public static void fastInterlevelScene( boolean value ){
public static void fasterLoading(boolean value ){
put( KEY_FAST_INTERLEVEL_SCENE, value );
}

public static boolean fastInterlevelScene() {
public static boolean fasterLoading() {
return getBoolean( KEY_FAST_INTERLEVEL_SCENE, false );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public static void doRestore() {
public void call() {
CPDGame.switchScene(GameScene.class);
}
}, getThread(), CPDSettings.fastInterlevelScene(), false);
}, getThread(), CPDSettings.fasterLoading(), false);
}

public static void doInit() {
Expand All @@ -234,7 +234,7 @@ public void run() {
throw new RuntimeException(e);
}
}
}, CPDSettings.fastInterlevelScene(), false);
}, CPDSettings.fasterLoading(), false);
}

public static void move(String key, String msg, Mode mode, int depth, int pos) {
Expand All @@ -247,7 +247,7 @@ public static void move(String key, String msg, Mode mode, int depth, int pos) {
public void call() {
CPDGame.switchScene(GameScene.class);
}
}, getThread(), CPDSettings.fastInterlevelScene(), false);
}, getThread(), CPDSettings.fasterLoading(), false);
}

public static void resetMode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,9 @@ protected void fadeIn( int color, boolean light, float time ) {
}

protected void fadeIn( int color, boolean light ) {
fadeIn(color, light, DEFAULT_FADE_TIME);
float fadeTime = DEFAULT_FADE_TIME;
if (CPDSettings.fasterLoading()) fadeTime /=3;
fadeIn(color, light, fadeTime);
}

public static void showBadge( Badges.Badge badge ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ private static class DisplayTab extends Component {
OptionSlider optBrightness;
OptionSlider optVisGrid;
CheckBox chkCutscenes;
CheckBox chkInterlevelScene;
CheckBox chkFastLoad;
OptionSlider particles;

@Override
Expand Down Expand Up @@ -341,15 +341,15 @@ protected void onClick() {
chkCutscenes.checked(CPDSettings.cutscenes());
add(chkCutscenes);

chkInterlevelScene = new CheckBox( Messages.get(this, "fast") ) {
chkFastLoad = new CheckBox( Messages.get(this, "fast") ) {
@Override
protected void onClick() {
super.onClick();
CPDSettings.fastInterlevelScene(checked());
CPDSettings.fasterLoading(checked());
}
};
chkInterlevelScene.checked(CPDSettings.fastInterlevelScene());
add(chkInterlevelScene);
chkFastLoad.checked(CPDSettings.fasterLoading());
add(chkFastLoad);

particles = new OptionSlider(Messages.get(this, "particles"), "1", "6", 1, 6) {
@Override
Expand Down Expand Up @@ -409,13 +409,13 @@ protected void layout() {

if (width > 200){
chkCutscenes.setRect(0, bottom + GAP, width/2-GAP/2, SLIDER_HEIGHT);
chkInterlevelScene.setRect(chkCutscenes.right() + GAP, chkCutscenes.top(), width/2-GAP/2, SLIDER_HEIGHT);
chkFastLoad.setRect(chkCutscenes.right() + GAP, chkCutscenes.top(), width/2-GAP/2, SLIDER_HEIGHT);
} else {
chkCutscenes.setRect(0, bottom + GAP, width, SLIDER_HEIGHT);
chkInterlevelScene.setRect(0, chkCutscenes.bottom() + GAP, width, SLIDER_HEIGHT);
chkFastLoad.setRect(0, chkCutscenes.bottom() + GAP, width, SLIDER_HEIGHT);
}

bottom = chkInterlevelScene.bottom() + 1;
bottom = chkFastLoad.bottom() + 1;

particles.setRect(0, bottom, width, SLIDER_HEIGHT);
height = particles.bottom();
Expand Down

0 comments on commit c08b07b

Please sign in to comment.