|
|
@@ -68,6 +68,17 @@ bool CBoxAlgorithmP300TactileVisualization::initialize() |
|
|
|
m_selectedFontSize = FSettingValueAutoCast(*this->getBoxAlgorithmContext(), 14);
|
|
|
|
|
|
|
|
m_nTactilos = FSettingValueAutoCast(*this->getBoxAlgorithmContext(), 15);
|
|
|
|
|
|
|
|
//set m_nTactilos to 2 if lower than 2
|
|
|
|
if(m_nTactilos < 2)
|
|
|
|
{
|
|
|
|
m_nTactilos = 2;
|
|
|
|
}
|
|
|
|
//set m_nTactilos to MAX if greater than MAX_TACTILOS
|
|
|
|
if(m_nTactilos > MAX_TACTILOS)
|
|
|
|
{
|
|
|
|
m_nTactilos = MAX_TACTILOS;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
@@ -174,20 +185,23 @@ bool CBoxAlgorithmP300TactileVisualization::initialize() |
|
|
|
|
|
|
|
//Set Pointer to Mainmenu
|
|
|
|
m_currMenu = &m_Menu[0];
|
|
|
|
|
|
|
|
//Init Gtk Labels
|
|
|
|
for(int i = 0; i < 6; i++)
|
|
|
|
{
|
|
|
|
std::string label_id = "label-" + std::to_string(i+1);
|
|
|
|
std::string label_text = m_currMenu->get_LabelText(i);
|
|
|
|
m_Label.push_back(GTK_LABEL(gtk_builder_get_object(m_mainWidgetInterface, label_id.c_str())));
|
|
|
|
gtk_label_set_text(m_Label[i], label_text.c_str());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else //Create default menu for m_nTactilos != 6
|
|
|
|
{
|
|
|
|
m_Menu.push_back(TactileMenu(m_nTactilos));
|
|
|
|
m_currMenu = &m_Menu[0];
|
|
|
|
}
|
|
|
|
|
|
|
|
//Init Gtk Labels
|
|
|
|
for(int i = 0; i < m_nTactilos; i++)
|
|
|
|
{
|
|
|
|
std::string label_id = "label-" + std::to_string(i+1);
|
|
|
|
std::string label_text = m_currMenu->get_LabelText(i);
|
|
|
|
|
|
|
|
m_Label.push_back(GTK_LABEL(gtk_builder_get_object(m_mainWidgetInterface, label_id.c_str())));
|
|
|
|
gtk_label_set_text(m_Label[i], label_text.c_str());
|
|
|
|
}
|
|
|
|
|
|
|
|
//End Menu Initialization ---------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
gtk_builder_connect_signals(m_mainWidgetInterface, nullptr);
|
|
|
@@ -659,6 +673,7 @@ bool CBoxAlgorithmP300TactileVisualization::process() |
|
|
|
for(int i = 0; i < 6; i++)
|
|
|
|
{
|
|
|
|
std::string label_text = m_currMenu->get_LabelText(i);
|
|
|
|
|
|
|
|
gtk_label_set_text(m_Label[i], label_text.c_str());
|
|
|
|
}
|
|
|
|
}
|