Add button action "force computer move"

This commit is contained in:
Peter Osterlund 2019-10-08 20:55:09 +02:00
parent ac63a0125d
commit de33b2c98f
3 changed files with 108 additions and 0 deletions

View File

@ -374,6 +374,15 @@ public class DroidFish extends Activity
setBoardFlip(false);
}
});
addAction(new UIAction() {
public String getId() { return "forceMove"; }
public int getName() { return R.string.option_force_computer_move; }
public int getIcon() { return R.raw.stop; }
public boolean enabled() { return true; }
public void run() {
ctrl.stopSearch();
}
});
addAction(new UIAction() {
public String getId() { return "largeButtons"; }
public int getName() { return R.string.toggle_large_buttons; }

View File

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="36"
version="1.1"
height="32"
id="svg3092"
inkscape:version="0.92.4 (unknown)"
sodipodi:docname="stop.svg">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1442"
inkscape:window-height="1134"
id="namedview3148"
showgrid="true"
inkscape:zoom="16.375001"
inkscape:cx="16.532892"
inkscape:cy="18.346069"
inkscape:window-x="129"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg3092">
<inkscape:grid
type="xygrid"
id="grid3180" />
</sodipodi:namedview>
<defs
id="defs3094">
<radialGradient
fx="17.864586"
fy="15.999999"
cx="17.864586"
cy="15.999999"
gradientTransform="matrix(1.3714287,-7.8784533e-8,6.4012425e-8,1.1142857,-6.5000057,-1.828569)"
id="radialGradient7850"
r="17.5"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
style="stop-color:#e0e0e0;stop-opacity:1;"
id="stop12154" />
<stop
offset="0.69999999"
style="stop-color:#e0e0e0;stop-opacity:0.627451;"
id="stop12156" />
<stop
offset="1"
style="stop-color:#e0e0e0;stop-opacity:0;"
id="stop12158" />
</radialGradient>
<linearGradient
gradientTransform="scale(0.94468882,1.0585496)"
id="linearGradient3502"
y1="843.20789"
x1="201.38964"
y2="383.7653"
gradientUnits="userSpaceOnUse"
x2="547.80806">
<stop
offset="0.0000000"
style="stop-color:#000000;stop-opacity:0.095505618;"
id="stop3090" />
<stop
offset="1.0000000"
style="stop-color:#000000;stop-opacity:0.0000000;"
id="stop3092" />
</linearGradient>
</defs>
<rect
width="35"
x="0.5"
y="0.5"
ry="7"
height="31"
style="fill:url(#radialGradient7850);fill-opacity:1;fill-rule:evenodd;stroke:none"
id="rect3100" />
<rect
style="fill:#4748fe;fill-opacity:1;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke:#4748fe;stroke-opacity:1;stroke-linejoin:round"
id="rect850"
width="12"
height="12"
x="12"
y="10" />
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -753,6 +753,7 @@ If you are running on battery power, it is recommended that you change settings
<item>Disabled</item>
<item>@string/flip_board</item>
<item>@string/toggle_analysis</item>
<item>@string/option_force_computer_move</item>
<item>@string/toggle_show_thinking</item>
<item>@string/toggle_book_hints</item>
<item>@string/toggle_tb_hints</item>
@ -770,6 +771,7 @@ If you are running on battery power, it is recommended that you change settings
<item></item>
<item>flipboard</item>
<item>toggleAnalysis</item>
<item>forceMove</item>
<item>showThinking</item>
<item>bookHints</item>
<item>tbHints</item>