2022-02-23 18:11:55 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../Game.hpp"
|
2022-02-28 13:44:27 +01:00
|
|
|
#include "board/BoardCanvas.hpp"
|
2022-02-23 18:11:55 +01:00
|
|
|
#include "ochess.hpp"
|
2022-12-30 15:09:24 +01:00
|
|
|
#include "base_tab/gamebase/GameBase.hpp"
|
2023-01-11 10:46:14 +01:00
|
|
|
#include "game_tab/right_panel/LiveEngineDialog.hpp"
|
2022-02-23 18:11:55 +01:00
|
|
|
|
|
|
|
// Foreign events
|
|
|
|
wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent);
|
|
|
|
|
2023-05-13 10:43:21 +02:00
|
|
|
/**
|
|
|
|
* @brief Panel that contains the BoardCanvas and the bottom control buttons
|
|
|
|
*
|
|
|
|
*/
|
2022-02-28 14:02:02 +01:00
|
|
|
class GameTabLeftPanel : public TabGameLeftPanel {
|
2022-02-28 20:16:57 +01:00
|
|
|
std::shared_ptr<Game> game;
|
2022-02-23 18:11:55 +01:00
|
|
|
BoardCanvas *board_canvas;
|
2022-12-29 10:08:22 +01:00
|
|
|
bool repeat;
|
2023-01-01 20:21:23 +01:00
|
|
|
HalfMove *last_move;
|
2023-01-10 11:14:25 +01:00
|
|
|
std::vector<GameState::Arrow> engine_arrows;
|
2023-01-10 17:18:40 +01:00
|
|
|
std::string promote_on;
|
|
|
|
std::string promotion_move;
|
2023-01-11 10:46:14 +01:00
|
|
|
float eval_cp;
|
2023-01-11 11:56:21 +01:00
|
|
|
bool is_engine_on;
|
2023-01-09 16:36:48 +01:00
|
|
|
|
2022-02-23 18:11:55 +01:00
|
|
|
public:
|
2022-02-28 20:16:57 +01:00
|
|
|
GameTabLeftPanel(wxFrame *parent, std::shared_ptr<Game> game);
|
2023-01-01 18:18:27 +01:00
|
|
|
void Notify(bool skip_animation=false);
|
2022-02-23 18:11:55 +01:00
|
|
|
void OnPlay(wxCommandEvent &event);
|
|
|
|
void OnGotoMove(wxCommandEvent &event);
|
|
|
|
void OnRefreshBoard(wxCommandEvent &event);
|
|
|
|
void ApplyPreferences();
|
2023-01-09 10:30:17 +01:00
|
|
|
void SetSaveToolEnable(bool state){game_toolbar->EnableTool(0,state);};
|
2023-01-11 10:46:14 +01:00
|
|
|
void SetEngineEvaluation(EngineEvaluation eval);
|
2023-01-11 11:56:21 +01:00
|
|
|
void SetLiveEngineState(bool isOn);
|
2022-02-23 18:11:55 +01:00
|
|
|
};
|