mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-10 16:12:41 +01:00
DroidFish: Moved color theme names to strings.xml.
This commit is contained in:
@@ -82,6 +82,13 @@ you are not actively using the program.\
|
||||
<string name="no_pgn_files">No files found in directory DroidFish/pgn on the SD card</string>
|
||||
<string name="no_scid_files">No files found in directory scid on the SD card</string>
|
||||
<string name="select_color_theme">Select Color Theme</string>
|
||||
<string name="colortheme_original">Original</string>
|
||||
<string name="colortheme_xboard">XBoard</string>
|
||||
<string name="colortheme_blue">Blue</string>
|
||||
<string name="colortheme_grey">Grey</string>
|
||||
<string name="colortheme_scid_default">Scid Default</string>
|
||||
<string name="colortheme_scid_brown">Scid Brown</string>
|
||||
<string name="colortheme_scid_green">Scid Green</string>
|
||||
<string name="select_game_mode">Select Game Mode</string>
|
||||
<string name="edit_replay_game">Edit/re-play Game</string>
|
||||
<string name="analysis_mode">Analysis Mode</string>
|
||||
|
||||
@@ -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