aboutsummaryrefslogtreecommitdiff
path: root/src/CGEditor.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-06-05 13:48:29 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2023-06-05 13:48:29 +0200
commit2a4a20beefa533730d85a75bbc2dc6676fa247b5 (patch)
tree987bea897030e3f5a6114f30acccaef56bb01768 /src/CGEditor.cpp
parent298714449a7c19c7a0f85d2f06305432f8a5251c (diff)
Introduce move based focusing
Diffstat (limited to 'src/CGEditor.cpp')
-rw-r--r--src/CGEditor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/CGEditor.cpp b/src/CGEditor.cpp
index fadbdc8..cf405db 100644
--- a/src/CGEditor.cpp
+++ b/src/CGEditor.cpp
@@ -1,5 +1,5 @@
#include "CGEditor.hpp"
-#include <iostream>
+
namespace cgeditor {
CGEditor::CGEditor() {
@@ -180,4 +180,10 @@ std::uint8_t CGEditor::GetNAGId(const std::string& symbol) const{
return 0;
}
+void CGEditor::FocusOnMove(CMI::HalfMove* move){
+ double X,Y;
+ MT->GetMoveXY(move,X,Y);
+ SBH->Focus(X+status.MoveWidth);
+ SBV->Focus(Y+status.MoveHeight);
+}
} // namespace cgeditor