diff --git a/DroidFish/res/drawable/custom.png b/DroidFish/res/drawable/custom.png new file mode 100644 index 0000000..2d225a7 Binary files /dev/null and b/DroidFish/res/drawable/custom.png differ diff --git a/DroidFish/res/drawable/custom_large.png b/DroidFish/res/drawable/custom_large.png new file mode 100644 index 0000000..39833aa Binary files /dev/null and b/DroidFish/res/drawable/custom_large.png differ diff --git a/DroidFish/res/layout-land/main.xml b/DroidFish/res/layout-land/main.xml index 29356d6..1f21971 100644 --- a/DroidFish/res/layout-land/main.xml +++ b/DroidFish/res/layout-land/main.xml @@ -19,6 +19,13 @@ android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> + + + + + + Enable tablebase probing in engine, when supported. Takes effect next time engine is started GTB Directory Directory where Gaviota tablebases are installed. Leave blank to use default directory + Custom button Flip board button Mode button Backward button diff --git a/DroidFish/src/org/petero/droidfish/DroidFish.java b/DroidFish/src/org/petero/droidfish/DroidFish.java index 66902a9..477559a 100644 --- a/DroidFish/src/org/petero/droidfish/DroidFish.java +++ b/DroidFish/src/org/petero/droidfish/DroidFish.java @@ -167,7 +167,7 @@ public class DroidFish extends Activity implements GUIInterface { private ScrollView moveListScroll; private TextView moveList; private TextView thinking; - private ImageButton flipButton, modeButton, undoButton, redoButton; + private ImageButton custButton, flipButton, modeButton, undoButton, redoButton; private TextView whiteClock, blackClock, titleText; SharedPreferences settings; @@ -480,6 +480,12 @@ public class DroidFish extends Activity implements GUIInterface { } }); + custButton = (ImageButton)findViewById(R.id.customButton); + custButton.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + } + }); flipButton = (ImageButton)findViewById(R.id.flipButton); flipButton.setOnClickListener(new OnClickListener() { @Override @@ -635,21 +641,26 @@ public class DroidFish extends Activity implements GUIInterface { if (largeButtons) { bWidth = bWidth * 3 / 2; bHeight = bHeight * 3 / 2; + custButton.setImageResource(R.drawable.custom_large); flipButton.setImageResource(R.drawable.flip_large); modeButton.setImageResource(R.drawable.mode_large); undoButton.setImageResource(R.drawable.left_large); redoButton.setImageResource(R.drawable.right_large); } else { + custButton.setImageResource(R.drawable.custom); flipButton.setImageResource(R.drawable.flip); modeButton.setImageResource(R.drawable.mode); undoButton.setImageResource(R.drawable.left); redoButton.setImageResource(R.drawable.right); } + custButton.setLayoutParams(new LinearLayout.LayoutParams(bWidth, bHeight)); flipButton.setLayoutParams(new LinearLayout.LayoutParams(bWidth, bHeight)); modeButton.setLayoutParams(new LinearLayout.LayoutParams(bWidth, bHeight)); undoButton.setLayoutParams(new LinearLayout.LayoutParams(bWidth, bHeight)); redoButton.setLayoutParams(new LinearLayout.LayoutParams(bWidth, bHeight)); + custButton.setVisibility(true ? View.GONE : View.VISIBLE); + bookOptions.filename = settings.getString("bookFile", ""); bookOptions.maxLength = getIntSetting("bookMaxLength", 1000000); bookOptions.preferMainLines = settings.getBoolean("bookPreferMainLines", false);