mirror of
https://gitlab.com/manzerbredes/cgeditor.git
synced 2025-04-19 03:59:44 +00:00
Now showing move NAGs is possible
This commit is contained in:
parent
a90469e71a
commit
f1f638100f
5 changed files with 24 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue