From 42a71b0ec52817a98a0a69586752741cec2341db Mon Sep 17 00:00:00 2001 From: Peter Osterlund Date: Sat, 7 Jan 2012 08:19:14 +0000 Subject: [PATCH] DroidFish: Clarified that not all engine options work for all engines. Display the current engine in the program title bar. --- DroidFish/res/values/strings.xml | 5 +++-- DroidFish/res/xml/preferences.xml | 5 +++-- .../src/org/petero/droidfish/DroidFish.java | 15 ++++++++++++--- .../org/petero/droidfish/SeekBarPreference.java | 17 +++++++++++++++++ 4 files changed, 35 insertions(+), 7 deletions(-) diff --git a/DroidFish/res/values/strings.xml b/DroidFish/res/values/strings.xml index b66cf27..d46d668 100644 --- a/DroidFish/res/values/strings.xml +++ b/DroidFish/res/values/strings.xml @@ -443,10 +443,11 @@ you are not actively using the program.\ Automatically swap sides when new game started. Also overrides Flip Board setting Engine Settings Strength + Only supported by internal engines Pondering - Let engine think while waiting for opponent\'s move + Let engine think while waiting for opponent\'s move. Supported by most engines. Threads - Number of engine threads (CPU cores) to use + Number of engine threads (CPU cores) to use. Not supported by all engines. Time Control Moves Number of moves between time controls diff --git a/DroidFish/res/xml/preferences.xml b/DroidFish/res/xml/preferences.xml index cf4be24..70eab2e 100644 --- a/DroidFish/res/xml/preferences.xml +++ b/DroidFish/res/xml/preferences.xml @@ -20,8 +20,9 @@ android:title="@string/prefs_engine_settings"> + android:title="@string/prefs_strength_title" + android:summary="@string/prefs_strength_summary" + android:defaultValue="1000"> 0); + TextView summary = null; + if (haveSummary) { + summary = new TextView(getContext()); + summary.setText(getSummary()); +// summary.setTextAppearance(getContext(), android.R.style.TextAppearance_Large); + summary.setGravity(Gravity.LEFT); + lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, + LinearLayout.LayoutParams.WRAP_CONTENT); + lp.gravity = Gravity.LEFT; + lp.weight = 1.0f; + summary.setLayoutParams(lp); + } + LinearLayout layout = new LinearLayout(getContext()); layout.setPadding(25, 5, 25, 5); layout.setOrientation(LinearLayout.VERTICAL); layout.addView(row1); layout.addView(bar); + if (summary != null) + layout.addView(summary); layout.setId(android.R.id.widget_frame); currValBox.setOnClickListener(new OnClickListener() {