1
0
Fork 0

Welcome: extra settings for Power importing

This commit is contained in:
kauron 2015-07-19 20:08:08 +02:00
parent 841e5feb72
commit 267b00049f
2 changed files with 18 additions and 0 deletions

View file

@ -103,4 +103,20 @@ class Power implements Serializable{
return context.getResources().getColor(R.color.at_will); return context.getResources().getColor(R.color.at_will);
} }
} }
void saveToPreferences(SharedPreferences sav) {
SharedPreferences.Editor e = sav.edit();
e.putString("s0", name);
e.putString("s1", keywords);
e.putString("s2", impact);
e.putString("s3", distance);
e.putString("s4", objective);
e.putBoolean("used", used);
e.putInt("i0", freq);
e.putInt("i1", range);
e.putInt("i2", atk);
e.putInt("i3", def);
e.putInt("i4", action);
e.apply();
}
} }

View file

@ -211,5 +211,7 @@
<string name="save_changes">Save changes?</string> <string name="save_changes">Save changes?</string>
<string name="no">No</string> <string name="no">No</string>
<string name="power_same_name">Can\'t be saved. Another power already has that name.</string> <string name="power_same_name">Can\'t be saved. Another power already has that name.</string>
<string name="power_already_exists">The power %s already exists and hasn\'t been copied</string>
<string name="import_completed">Import completed without errors</string>
</resources> </resources>