aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-02-17 09:30:29 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-02-17 09:30:29 +0100
commit3a058b2cfd9ca833b66398c0d4628d4c49c51f0b (patch)
treeeb65914cabe3205abdd52313b3bb78142732e598
parent3e818c0f0ca741fe8404e841a93b1401aacc4301 (diff)
Debug move icons
-rw-r--r--src/components/MoveTable.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/components/MoveTable.cpp b/src/components/MoveTable.cpp
index 71142dd..ab05bed 100644
--- a/src/components/MoveTable.cpp
+++ b/src/components/MoveTable.cpp
@@ -98,7 +98,6 @@ std::uint32_t MoveTable::UpdateMoves(CGEHalfMove *m, std::uint32_t line,
img.width = status->MoveIconWidth;
img.height = status->MoveHeight;
img.ShouldApplyScroll = true;
- elements.push_back(img);
// Move
Element e;
e.prop = move_bound.prop | Property::Text;
@@ -109,18 +108,18 @@ std::uint32_t MoveTable::UpdateMoves(CGEHalfMove *m, std::uint32_t line,
c == 'f' || c == 'O' || c == '0')) {
e.text = m->move.substr(1, m->move.size());
if (c == 'N') {
- e.prop |= Property::Knight;
+ img.prop |= Property::Knight;
} else if (c == 'B') {
- e.prop |= Property::Bishop;
+ img.prop |= Property::Bishop;
} else if (c == 'R') {
- e.prop |= Property::Rook;
+ img.prop |= Property::Rook;
} else if (c == 'Q') {
- e.prop |= Property::Queen;
+ img.prop |= Property::Queen;
} else {
- e.prop |= Property::King;
+ img.prop |= Property::King;
}
} else {
- e.prop |= Property::Pawn;
+ img.prop |= Property::Pawn;
}
}
e.x = status->MoveIconWidth + move_bound.x;
@@ -128,6 +127,7 @@ std::uint32_t MoveTable::UpdateMoves(CGEHalfMove *m, std::uint32_t line,
e.width = status->MoveWidth - status->MoveIconWidth;
e.height = status->MoveHeight;
e.ShouldApplyScroll = true;
+ elements.push_back(img);
elements.push_back(e);
} else {
move_bound.prop |= Property::Text;