mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-19 20:22:18 +01:00
DroidFish: Moved color theme names to strings.xml.
This commit is contained in:
@@ -62,8 +62,15 @@ public class ColorTheme {
|
||||
private static final String prefPrefix = "color_";
|
||||
|
||||
private final static int defaultTheme = 2;
|
||||
final static String[] themeNames = { "Original", "XBoard", "Blue", "Grey",
|
||||
"Scid Default", "Scid Brown", "Scid Green"};
|
||||
final static int[] themeNames = {
|
||||
R.string.colortheme_original,
|
||||
R.string.colortheme_xboard,
|
||||
R.string.colortheme_blue,
|
||||
R.string.colortheme_grey,
|
||||
R.string.colortheme_scid_default,
|
||||
R.string.colortheme_scid_brown,
|
||||
R.string.colortheme_scid_green
|
||||
};
|
||||
private final static String themeColors[][] = {
|
||||
{ // Original
|
||||
"#FF808080", "#FFBEBE5A", "#FFFF0000", "#FF00FF00", "#FF000000", "#FFFFFFFF", "#FF888888",
|
||||
|
||||
@@ -2075,7 +2075,10 @@ public class DroidFish extends Activity implements GUIInterface {
|
||||
private final Dialog setColorThemeDialog() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(R.string.select_color_theme);
|
||||
builder.setSingleChoiceItems(ColorTheme.themeNames, -1, new DialogInterface.OnClickListener() {
|
||||
String[] themeNames = new String[ColorTheme.themeNames.length];
|
||||
for (int i = 0; i < themeNames.length; i++)
|
||||
themeNames[i] = getString(ColorTheme.themeNames[i]);
|
||||
builder.setSingleChoiceItems(themeNames, -1, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int item) {
|
||||
ColorTheme.instance().setTheme(settings, item);
|
||||
cb.setColors();
|
||||
|
||||
Reference in New Issue
Block a user