aboutsummaryrefslogtreecommitdiff
path: root/src/components/MoveTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/MoveTable.cpp')
-rw-r--r--src/components/MoveTable.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/components/MoveTable.cpp b/src/components/MoveTable.cpp
index 4878275..88767b1 100644
--- a/src/components/MoveTable.cpp
+++ b/src/components/MoveTable.cpp
@@ -69,6 +69,9 @@ std::uint32_t MoveTable::UpdateMoves(CMI::HalfMove *m, std::uint32_t line,
move_bound.text = m->GetSAN();
move_bound.ShouldApplyScroll = true;
bool isMouseOver = IsMouseOver(move_bound);
+ // Save in cache:
+ MovesStates[m].Bound=move_bound;
+ MovesStates[m].Line=line;
//---------- Update current focus move ----------
if (isMouseOver) {
@@ -346,4 +349,9 @@ std::uint32_t MoveTable::DrawVariations(CMI::HalfMove *m, std::uint32_t line,
}
return (line);
}
+
+void MoveTable::GetMoveXY(CMI::HalfMove* m, double &X, double &Y){
+ X=MovesStates.at(m).Bound.x;
+ Y=MovesStates.at(m).Bound.y;
+}
} // namespace cgeditor \ No newline at end of file