mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-19 04:02:23 +01:00
DroidFish: Report engine name in the GUI when a new engine is started.
This commit is contained in:
@@ -1765,6 +1765,13 @@ public class DroidFish extends Activity implements GUIInterface {
|
||||
Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reportEngineName(String engine) {
|
||||
String msg = String.format("%s: %s",
|
||||
getString(R.string.engine), engine);
|
||||
Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void computerMoveMade() {
|
||||
if (soundEnabled) {
|
||||
|
||||
@@ -64,6 +64,9 @@ public interface GUIInterface {
|
||||
/** Report that user attempted to make an invalid move. */
|
||||
public void reportInvalidMove(Move m);
|
||||
|
||||
/** Report UCI engine name. */
|
||||
public void reportEngineName(String engine);
|
||||
|
||||
/** Called when computer made a move. GUI can notify user, for example by playing a sound. */
|
||||
public void computerMoveMade();
|
||||
|
||||
|
||||
@@ -697,6 +697,7 @@ public class DroidChessController {
|
||||
gui.runOnUIThread(new Runnable() {
|
||||
public void run() {
|
||||
updatePlayerNames(engineName);
|
||||
gui.reportEngineName(engineName);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user