From f1f638100f4bcd88b31c3412e961dbbb5e12ad0a Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Thu, 29 Dec 2022 19:58:37 +0100 Subject: Now showing move NAGs is possible --- src/components/MoveTable.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/components/MoveTable.cpp') 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); -- cgit v1.2.3