display sudoku inner grids
All checks were successful
Linux arm64 / Build (push) Successful in 23m58s
All checks were successful
Linux arm64 / Build (push) Successful in 23m58s
This commit is contained in:
@@ -67,6 +67,9 @@ public class SudokuView extends BaseView {
|
|||||||
@Override
|
@Override
|
||||||
public void render() {
|
public void render() {
|
||||||
final Sudoku sudoku = doku.getSubGrid(0);
|
final Sudoku sudoku = doku.getSubGrid(0);
|
||||||
|
ImGui.pushStyleVar(ImGuiStyleVar.FrameBorderSize, 2.0f);
|
||||||
|
ImGui.pushStyleVar(ImGuiStyleVar.ItemSpacing, new ImVec2(0.0f, 0.0f));
|
||||||
|
ImGui.pushStyleColor(ImGuiCol.Border, new ImVec4(0.0f, 0.0f, 0.0f, 1.0f));
|
||||||
for (int y = 0; y < sudoku.getSize(); y++) {
|
for (int y = 0; y < sudoku.getSize(); y++) {
|
||||||
for (int x = 0; x < sudoku.getSize(); x++) {
|
for (int x = 0; x < sudoku.getSize(); x++) {
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
@@ -76,11 +79,11 @@ public class SudokuView extends BaseView {
|
|||||||
int symbol = cell.getSymbolIndex();
|
int symbol = cell.getSymbolIndex();
|
||||||
Color blockColor = colorPalette.get(cell.getBlock());
|
Color blockColor = colorPalette.get(cell.getBlock());
|
||||||
ImGui.pushStyleVar(ImGuiStyleVar.SelectableTextAlign, new ImVec2(0.5f, 0.5f));
|
ImGui.pushStyleVar(ImGuiStyleVar.SelectableTextAlign, new ImVec2(0.5f, 0.5f));
|
||||||
ImGui.pushStyleColor(ImGuiCol.Header, new ImVec4(blockColor.r, blockColor.g, blockColor.b, 1.0f));
|
ImGui.pushStyleColor(ImGuiCol.Button, new ImVec4(blockColor.r, blockColor.g, blockColor.b, 1.0f));
|
||||||
String cellText = "";
|
String cellText = "";
|
||||||
if (symbol != -1)
|
if (symbol != -1)
|
||||||
cellText += Integer.toString(symbol + 1);
|
cellText += Integer.toString(symbol + 1);
|
||||||
if (ImGui.selectable(cellText + "##" + index, true, 0, new ImVec2(50, 50))) {
|
if (ImGui.button(cellText + "##" + index, new ImVec2(50, 50))) {
|
||||||
ImGui.openPopup("editPopup");
|
ImGui.openPopup("editPopup");
|
||||||
currentIndex = index;
|
currentIndex = index;
|
||||||
}
|
}
|
||||||
@@ -88,6 +91,8 @@ public class SudokuView extends BaseView {
|
|||||||
ImGui.popStyleColor();
|
ImGui.popStyleColor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ImGui.popStyleVar(2);
|
||||||
|
ImGui.popStyleColor();
|
||||||
renderPopup();
|
renderPopup();
|
||||||
if (resolveThread != null)
|
if (resolveThread != null)
|
||||||
ImGui.beginDisabled();
|
ImGui.beginDisabled();
|
||||||
|
|||||||
Reference in New Issue
Block a user