From 2a4a20beefa533730d85a75bbc2dc6676fa247b5 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Mon, 5 Jun 2023 13:48:29 +0200 Subject: Introduce move based focusing --- src/CGEditor.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/CGEditor.cpp') 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 + 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 -- cgit v1.2.3