diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-17 10:07:54 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-17 10:07:54 +0100 |
| commit | cba432b023d3aba5cebc7a04afec3c94d8cac972 (patch) | |
| tree | 32eed0b1d9be9d3ab7b16945ee202b018fcb7dae | |
| parent | e9d6188092150e310e219d9469a3f15c0267a6a9 (diff) | |
Debug and clean editor
| -rw-r--r-- | src/Types.hpp | 2 | ||||
| -rw-r--r-- | src/components/MoveTable.cpp | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/Types.hpp b/src/Types.hpp index 68aa3fe..e2ad0e2 100644 --- a/src/Types.hpp +++ b/src/Types.hpp @@ -71,8 +71,6 @@ typedef struct Status { double MarginBarWidth = 50; double ScrollbarWidth = 30; double MoveIconWidth = 25; - double MenuX, MenuY; - double MoveX, MoveY; std::uint16_t CommentLinePerRow = 2; /// @brief Ask the editor to scroll for a specific amout of pixels double EventVScroll = 0, EventHScroll = 0; diff --git a/src/components/MoveTable.cpp b/src/components/MoveTable.cpp index 3c2a3be..f6ce64a 100644 --- a/src/components/MoveTable.cpp +++ b/src/components/MoveTable.cpp @@ -60,7 +60,7 @@ std::uint32_t MoveTable::UpdateMoves(CGEHalfMove *m, std::uint32_t line, if (m->IsBlack) { move_bound.prop |= Property::Black; } - move_bound.x = status->MarginBarWidth + status->MoveX + + move_bound.x = status->MarginBarWidth + status->MoveWidth * (indent + indent_black) + ((indent + 1) / 2 * status->MarginBarWidth); move_bound.y = status->MoveHeight * line; @@ -190,7 +190,7 @@ std::uint32_t MoveTable::DrawComment(CGEHalfMove *m, std::uint32_t line, const char &indent_black) { // Show three dots if (!m->IsBlack) { - DRAW_DOTS(status->MarginBarWidth + status->MoveX + + DRAW_DOTS(status->MarginBarWidth + status->MoveWidth * (indent + 1) + ((indent + 1) / 2 * status->MarginBarWidth), status->MoveHeight * line); @@ -237,7 +237,7 @@ std::uint32_t MoveTable::DrawVariations(CGEHalfMove *m, std::uint32_t line, const char &indent_black) { // Show three dots next to move if white turn if ((m->variations.size() == 0) && !m->IsBlack) { - DRAW_DOTS(status->MarginBarWidth + status->MoveX + + DRAW_DOTS(status->MarginBarWidth + status->MoveWidth * (indent + 1), status->MoveHeight * line); } @@ -266,7 +266,7 @@ std::uint32_t MoveTable::DrawVariations(CGEHalfMove *m, std::uint32_t line, { Element e; e.prop = Property::Rectangle | Property::Button; - e.x = (status->MarginBarWidth + status->MoveX + + e.x = (status->MarginBarWidth + status->MoveWidth * indent) + status->MoveWidth - std::ceil(status->MoveHeight / 2) - std::ceil(status->MoveHeight / 4); |
