#include "EngineTab.hpp" EngineTab::EngineTab(wxWindow *parent, std::string engine_path_or_name) : EngineTabBF(parent), TabInfos(TabInfos::ENGINE) { SetLabel("New Engine"); engine = new uciadapter::UCI(engine_path_or_name); engine_location->SetValue(engine_path_or_name); std::vector opts = engine->GetOptions(); for (uciadapter::Option &opt : opts) { if (opt.type == "check") { engine_parameters->Append(new wxBoolProperty( opt.name, wxPG_LABEL, opt.default_value == "true")); } else if (opt.type == "spin") { engine_parameters->Append(new wxIntProperty( opt.name, wxPG_LABEL, std::stoi(opt.default_value))); } else if (opt.type == "string") { engine_parameters->Append( new wxStringProperty(opt.name, wxPG_LABEL, opt.default_value)); } } }