This commit is contained in:
@@ -203,13 +203,18 @@ public class DDDView extends GameAdapter implements CommandSender {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onFooterRender() {
|
private void onFooterRender() {
|
||||||
|
CastlingResult allowedCastlings = getAllowedCastlings();
|
||||||
|
ImGui.beginDisabled(allowedCastlings == CastlingResult.None || allowedCastlings == CastlingResult.Big);
|
||||||
if (ImGui.button("Roque")) {
|
if (ImGui.button("Roque")) {
|
||||||
sendCastling();
|
sendCastling();
|
||||||
}
|
}
|
||||||
|
ImGui.endDisabled();
|
||||||
ImGui.sameLine();
|
ImGui.sameLine();
|
||||||
|
ImGui.beginDisabled(allowedCastlings == CastlingResult.None || allowedCastlings == CastlingResult.Small);
|
||||||
if (ImGui.button("Grand Roque")) {
|
if (ImGui.button("Grand Roque")) {
|
||||||
sendBigCastling();
|
sendBigCastling();
|
||||||
}
|
}
|
||||||
|
ImGui.endDisabled();
|
||||||
ImGui.sameLine();
|
ImGui.sameLine();
|
||||||
if (ImGui.button("Annuler le coup précédent")) {
|
if (ImGui.button("Annuler le coup précédent")) {
|
||||||
sendUndo();
|
sendUndo();
|
||||||
|
|||||||
Reference in New Issue
Block a user