v1.3.0: adjusted internal setting for quick swapper, made it default on
This commit is contained in:
@@ -121,7 +121,7 @@ public class SPDSettings extends GameSettings {
|
||||
|
||||
public static final String KEY_UI_SIZE = "full_ui";
|
||||
public static final String KEY_SCALE = "scale";
|
||||
public static final String KEY_QUICKSLOTS = "quickslots";
|
||||
public static final String KEY_QUICK_SWAP = "quickslot_swapper";
|
||||
public static final String KEY_FLIPTOOLBAR = "flipped_ui";
|
||||
public static final String KEY_FLIPTAGS = "flip_tags";
|
||||
public static final String KEY_BARMODE = "toolbar_mode";
|
||||
@@ -152,9 +152,9 @@ public class SPDSettings extends GameSettings {
|
||||
return getInt( KEY_SCALE, 0 );
|
||||
}
|
||||
|
||||
public static void quickSlots( boolean value ){ put( KEY_QUICKSLOTS, value ); }
|
||||
public static void quickSwapper(boolean value ){ put( KEY_QUICK_SWAP, value ); }
|
||||
|
||||
public static boolean quickSlots(){ return getBoolean( KEY_QUICKSLOTS, false); }
|
||||
public static boolean quickSwapper(){ return getBoolean( KEY_QUICK_SWAP, true); }
|
||||
|
||||
public static void flipToolbar( boolean value) {
|
||||
put(KEY_FLIPTOOLBAR, value );
|
||||
|
||||
@@ -239,6 +239,11 @@ public class WelcomeScene extends PixelScene {
|
||||
}
|
||||
}
|
||||
|
||||
//defaults to false for older users
|
||||
if (previousVersion <= ShatteredPixelDungeon.v1_2_3){
|
||||
SPDSettings.quickSwapper(false);
|
||||
}
|
||||
|
||||
SPDSettings.version(ShatteredPixelDungeon.versionCode);
|
||||
}
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ public class Toolbar extends Component {
|
||||
if (PixelScene.uiCamera.width > 170) quickslotsToShow ++;
|
||||
|
||||
int startingSlot;
|
||||
if (SPDSettings.quickSlots() && quickslotsToShow < 6){
|
||||
if (SPDSettings.quickSwapper() && quickslotsToShow < 6){
|
||||
quickslotsToShow = 3;
|
||||
startingSlot = swappedQuickslots ? 3 : 0;
|
||||
btnSwap.visible = true;
|
||||
|
||||
@@ -520,11 +520,11 @@ public class WndSettings extends WndTabbed {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
super.onClick();
|
||||
SPDSettings.quickSlots(checked());
|
||||
SPDSettings.quickSwapper(checked());
|
||||
Toolbar.updateLayout();
|
||||
}
|
||||
};
|
||||
chkQuickSwapper.checked(SPDSettings.quickSlots());
|
||||
chkQuickSwapper.checked(SPDSettings.quickSwapper());
|
||||
add(chkQuickSwapper);
|
||||
|
||||
swapperDesc = PixelScene.renderTextBlock(Messages.get(WndSettings.UITab.this, "swapper_desc"), 5);
|
||||
|
||||
Reference in New Issue
Block a user