Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 39e2475983 | |||
| 7dd3f198db |
@@ -9,6 +9,14 @@ Une application de génération et résolution de MultiDoku.
|
||||
- Sudoku saves
|
||||
- Multiplayer
|
||||
|
||||
## Screenshots 🖼
|
||||
|
||||
[[screenshots/menu.png]]
|
||||
|
||||
[[screenshots/solo.png]]
|
||||
|
||||
[[screenshots/multi.png]]
|
||||
|
||||
## Develop ☝🤓
|
||||
|
||||
**Pour plus de détails sur la conception et autres, regarder le 👉 [wiki](https://git.ale-pri.com/Ryuk/Sudoku/wiki)** 👈
|
||||
|
||||
@@ -71,24 +71,28 @@ public class SudokuRenderer {
|
||||
|
||||
private void renderPopup() {
|
||||
if (ImGui.beginPopup("editPopup")) {
|
||||
Block block = currentCell.getBlock();
|
||||
int symbolCount = block.getCells().size();
|
||||
for (int i = 0; i < symbolCount; i++) {
|
||||
if ((i + 1) % (int) (Math.sqrt(symbolCount)) != 1)
|
||||
ImGui.sameLine();
|
||||
if (currentCell.getSymbolIndex() == i) {
|
||||
if (ImGui.button("X", cellSize)) {
|
||||
currentCell.setSymbolIndex(Cell.NOSYMBOL);
|
||||
this.onCellChange.emit(currentCell);
|
||||
ImGui.closeCurrentPopup();
|
||||
}
|
||||
} else {
|
||||
if (ImGui.button(Options.Symboles.getSymbols().get(i), cellSize)) {
|
||||
currentCell.setSymbolIndex(i);
|
||||
this.onCellChange.emit(currentCell);
|
||||
if (this.doku.getDoku().isSolved())
|
||||
this.onResolve.emit();
|
||||
ImGui.closeCurrentPopup();
|
||||
if (currentCell == null)
|
||||
ImGui.closeCurrentPopup();
|
||||
else {
|
||||
Block block = currentCell.getBlock();
|
||||
int symbolCount = block.getCells().size();
|
||||
for (int i = 0; i < symbolCount; i++) {
|
||||
if ((i + 1) % (int) (Math.sqrt(symbolCount)) != 1)
|
||||
ImGui.sameLine();
|
||||
if (currentCell.getSymbolIndex() == i) {
|
||||
if (ImGui.button("X", cellSize)) {
|
||||
currentCell.setSymbolIndex(Cell.NOSYMBOL);
|
||||
this.onCellChange.emit(currentCell);
|
||||
ImGui.closeCurrentPopup();
|
||||
}
|
||||
} else {
|
||||
if (ImGui.button(Options.Symboles.getSymbols().get(i), cellSize)) {
|
||||
currentCell.setSymbolIndex(i);
|
||||
this.onCellChange.emit(currentCell);
|
||||
if (this.doku.getDoku().isSolved())
|
||||
this.onResolve.emit();
|
||||
ImGui.closeCurrentPopup();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BIN
screenshots/menu.png
Normal file
BIN
screenshots/menu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 204 KiB |
BIN
screenshots/multi.png
Normal file
BIN
screenshots/multi.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 236 KiB |
BIN
screenshots/solo.png
Normal file
BIN
screenshots/solo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 242 KiB |
Reference in New Issue
Block a user