diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-12-29 19:58:37 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-12-29 19:58:37 +0100 |
| commit | f1f638100f4bcd88b31c3412e961dbbb5e12ad0a (patch) | |
| tree | 1a66d6b192985d272d3fbb97f06edaaea92c4acf /src/components | |
| parent | a90469e71a821d152ae31d16bd8b78793ada98d6 (diff) | |
Now showing move NAGs is possible
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/MoveTable.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/components/MoveTable.cpp b/src/components/MoveTable.cpp index 42280eb..9e8ee38 100644 --- a/src/components/MoveTable.cpp +++ b/src/components/MoveTable.cpp @@ -127,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; + // Add elements: elements.push_back(img); elements.push_back(e); } else { @@ -134,6 +135,19 @@ std::uint32_t MoveTable::UpdateMoves(CGEHalfMove *m, std::uint32_t line, elements.push_back(move_bound); } + //---------- NAG ---------- + if(m->nag.size()>0){ + Element nag; + nag.text = m->nag; + nag.x = move_bound.x + status->MoveWidth - status->NagWidth - status->NagRightMargin; + nag.y = status->MoveHeight * line; + nag.width = status->NagWidth; + nag.height = status->NagHeight; + nag.prop = move_bound.prop | Property::Text | Property::Nag; + nag.ShouldApplyScroll = true; + elements.push_back(nag); + } + //---------- Move number in marge or for variation ---------- if (indent == 0 && (!m->IsBlack || only_black)) { DRAW_NB(0, status->MoveHeight * line, m->Number); |
