diff --git a/DroidFishApp/src/main/java/org/petero/droidfish/DroidFish.java b/DroidFishApp/src/main/java/org/petero/droidfish/DroidFish.java index eb8cd17..a8cda98 100644 --- a/DroidFishApp/src/main/java/org/petero/droidfish/DroidFish.java +++ b/DroidFishApp/src/main/java/org/petero/droidfish/DroidFish.java @@ -325,6 +325,16 @@ public class DroidFish extends Activity updateThinkingInfo(); } }); + addAction(new UIAction() { + public String getId() { return "tbHints"; } + public int getName() { return R.string.toggle_tb_hints; } + public int getIcon() { return R.raw.tb; } + public boolean enabled() { return true; } + public void run() { + engineOptions.hints = toggleBooleanPref("tbHints"); + setEgtbHints(cb.getSelectedSquare()); + } + }); addAction(new UIAction() { public String getId() { return "viewVariations"; } public int getName() { return R.string.toggle_pgn_variations; } diff --git a/DroidFishApp/src/main/res/raw/tb.svg b/DroidFishApp/src/main/res/raw/tb.svg new file mode 100644 index 0000000..135ac3b --- /dev/null +++ b/DroidFishApp/src/main/res/raw/tb.svg @@ -0,0 +1,218 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/DroidFishApp/src/main/res/values/strings.xml b/DroidFishApp/src/main/res/values/strings.xml index 4ae4857..b9abbf5 100644 --- a/DroidFishApp/src/main/res/values/strings.xml +++ b/DroidFishApp/src/main/res/values/strings.xml @@ -133,6 +133,7 @@ you are not actively using the program.\ Blindfold mode Toggle Show Thinking Toggle Book Hints + Toggle Tablebase Hints Toggle Variations Toggle Comments Toggle Headers @@ -757,6 +758,7 @@ you are not actively using the program.\ @string/toggle_analysis @string/toggle_show_thinking @string/toggle_book_hints + @string/toggle_tb_hints @string/toggle_pgn_variations @string/toggle_pgn_comments @string/toggle_pgn_headers @@ -773,6 +775,7 @@ you are not actively using the program.\ toggleAnalysis showThinking bookHints + tbHints viewVariations viewComments viewHeaders diff --git a/DroidFishApp/src/main/res/xml/preferences.xml b/DroidFishApp/src/main/res/xml/preferences.xml index 7bac51d..214f72f 100644 --- a/DroidFishApp/src/main/res/xml/preferences.xml +++ b/DroidFishApp/src/main/res/xml/preferences.xml @@ -389,14 +389,14 @@ android:title="@string/prefs_button_action_4_title" android:entryValues="@array/button_action_values" android:entries="@array/button_action_texts" - android:defaultValue=""> + android:defaultValue="bookHints"> + android:defaultValue="tbHints">