Now showing move NAGs is possible

This commit is contained in:
Loic Guegan 2022-12-29 19:58:37 +01:00
parent a90469e71a
commit f1f638100f
5 changed files with 24 additions and 4 deletions

View file

@ -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);