diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2023-06-05 13:48:29 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2023-06-05 13:48:29 +0200 |
| commit | 2a4a20beefa533730d85a75bbc2dc6676fa247b5 (patch) | |
| tree | 987bea897030e3f5a6114f30acccaef56bb01768 /src/CGEditor.cpp | |
| parent | 298714449a7c19c7a0f85d2f06305432f8a5251c (diff) | |
Introduce move based focusing
Diffstat (limited to 'src/CGEditor.cpp')
| -rw-r--r-- | src/CGEditor.cpp | 8 |
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 |
