int kmloverlay_pi::Init(void) { m_puserinput = NULL; AddLocaleCatalog( _T("opencpn-kmloverlay_pi") ); m_toolbar_item_id = InsertPlugInTool( _T(""), _img_kmloverlay, _img_kmloverlay, wxITEM_NORMAL, _("KML overlay"), _T(""), NULL, KMLOVERLAY_TOOL_POSITION, 0, this ); m_pauimgr = GetFrameAuiManager(); m_puserinput = new KMLOverlayUI( GetOCPNCanvasWindow(), wxID_ANY, _T("") ); wxAuiPaneInfo pane = wxAuiPaneInfo().Name(_T("KMLOverlay")).Caption(_("KML overlay")).CaptionVisible(true).Float().FloatingPosition(50,150).Dockable(false).Resizable().CloseButton(true).Show(false); m_pauimgr->AddPane( m_puserinput, pane ); m_pauimgr->Update(); // Get a pointer to the opencpn configuration object m_pconfig = GetOCPNConfigObject(); // And load the configuration items LoadConfig(); ApplyConfig(); return ( WANTS_OVERLAY_CALLBACK | WANTS_OPENGL_OVERLAY_CALLBACK | WANTS_TOOLBAR_CALLBACK | INSTALLS_TOOLBAR_TOOL | // nothing yet // WANTS_PREFERENCES | WANTS_CONFIG ); }
int gecomapi_pi::Init(void) { m_bshuttingDown = false; mPriPosition = 99; m_pgecomapi_window = NULL; AddLocaleCatalog( _T("opencpn-gecomapi_pi") ); // Get a pointer to the opencpn display canvas, to use as a parent for the POI Manager dialog m_parent_window = GetOCPNCanvasWindow(); m_pauimgr = GetFrameAuiManager(); // Get a pointer to the opencpn configuration object m_pconfig = GetOCPNConfigObject(); // And load the configuration items LoadConfig(); // This PlugIn needs a toolbar icon #ifdef GECOMAPI_USE_SVG m_toolbar_item_id = InsertPlugInToolSVG(_T("GoogleEarth"), _svg_gecomapi, _svg_gecomapi_rollover, _svg_gecomapi_toggled, wxITEM_CHECK, _T("GoogleEarth"), _T(""), NULL, GECOMAPI_TOOL_POSITION, 0, this); #else m_toolbar_item_id = InsertPlugInTool(_T("GoogleEarth"), _img_gecomapi, _img_gecomapi, wxITEM_CHECK, _T("GoogleEarth"), _T(""), NULL, GECOMAPI_TOOL_POSITION, 0, this); #endif m_pgecomapi_window = new GEUIDialog(GetOCPNCanvasWindow(), wxID_ANY, m_pauimgr, m_toolbar_item_id, this); wxAuiPaneInfo pane = wxAuiPaneInfo().Name(_T("GoogleEarth")).Caption(_T("GoogleEarth")).CaptionVisible(true).Float().FloatingPosition(0,0).Show(!m_bstartHidden).TopDockable(false).BottomDockable(false).LeftDockable(true).RightDockable(true).CaptionVisible(true).CloseButton(false).MinSize(300,300); m_pauimgr->AddPane(m_pgecomapi_window, pane); if(m_pgecomapi_window) { m_pgecomapi_window->SetCameraParameters(m_iCameraAzimuth, m_iCameraTilt, m_iCameraRange); } ApplyConfig(); m_pauimgr->Update(); //m_pauimgr->Connect( wxEVT_AUI_RENDER, wxAuiManagerEventHandler( gecomapi_pi::OnAuiRender ), NULL, this ); return (WANTS_OVERLAY_CALLBACK | WANTS_CURSOR_LATLON | WANTS_TOOLBAR_CALLBACK | INSTALLS_TOOLBAR_TOOL | WANTS_PREFERENCES | WANTS_CONFIG | WANTS_NMEA_EVENTS | WANTS_NMEA_SENTENCES | USES_AUI_MANAGER | WANTS_ONPAINT_VIEWPORT ); }
void gecomapi_pi::ShowPreferencesDialog( wxWindow* parent ) { GEPrefsDlg *dialog = new GEPrefsDlg( parent, wxID_ANY ); dialog->m_Azimuthslider->SetValue(m_iCameraAzimuth); dialog->m_Tiltslider->SetValue(m_iCameraTilt); dialog->m_Rangeslider->SetValue(m_iCameraRange); dialog->m_Transparencyslider->SetValue(m_iOpacity); dialog->m_cbStartHidden->SetValue(m_bstartHidden); dialog->m_cbAutodisconnect->SetValue(m_bdisconnectOnGEAction); dialog->m_cbUpdateSettingsFromGE->SetValue(m_bupdateSettingsFromGE); dialog->m_cbShowBoatInGE->SetValue(m_bShowBoatInGE); switch(m_iWhatToFollow) { case GECOMAPI_FOLLOW_BOAT: dialog->m_radioFlwBoat->SetValue(true); break; case GECOMAPI_FOLLOW_CURSOR: dialog->m_radioFlwCursor->SetValue(true); break; case GECOMAPI_FOLLOW_VIEW: dialog->m_radioFlwView->SetValue(true); dialog->m_Azimuthslider->Disable(); dialog->m_Tiltslider->Disable(); dialog->m_Rangeslider->Disable(); dialog->m_btnResetToDefaults->Disable(); break; case GECOMAPI_FOLLOW_OFF: dialog->m_radioDontFollow->SetValue(true); break; } if(dialog->ShowModal() == wxID_OK) { m_iCameraAzimuth = dialog->m_Azimuthslider->GetValue(); m_iCameraTilt = dialog->m_Tiltslider->GetValue(); m_iCameraRange = dialog->m_Rangeslider->GetValue(); m_iOpacity = dialog->m_Transparencyslider->GetValue(); m_bstartHidden = dialog->m_cbStartHidden->GetValue(); m_bdisconnectOnGEAction = dialog->m_cbAutodisconnect->GetValue(); m_bupdateSettingsFromGE = dialog->m_cbUpdateSettingsFromGE->GetValue(); m_bShowBoatInGE = dialog->m_cbShowBoatInGE->GetValue(); if (dialog->m_radioFlwBoat->GetValue()) m_iWhatToFollow = GECOMAPI_FOLLOW_BOAT; if (dialog->m_radioFlwCursor->GetValue()) m_iWhatToFollow = GECOMAPI_FOLLOW_CURSOR; if (dialog->m_radioFlwView->GetValue()) m_iWhatToFollow = GECOMAPI_FOLLOW_VIEW; if (dialog->m_radioDontFollow->GetValue()) m_iWhatToFollow = GECOMAPI_FOLLOW_OFF; SaveConfig(); ApplyConfig(); // WAS IST DAS? SetToolbarItemState( m_toolbar_item_id, GetDashboardWindowShownCount()==0 ); } dialog->Destroy(); }
void CocosFrame::OnFileMenuOpenSolution(wxCommandEvent& event) { wxFileDialog dialog(this, _T("open solution"), wxEmptyString, wxEmptyString, _T("solution(*.lua) |*.lua")); dialog.CentreOnParent(); if (dialog.ShowModal() == wxID_OK) { if (LoadConfig(dialog.GetPath())) { ApplyConfig(); } } }
BOOL Sockets_NetduinoIP_Driver::Initialize() { NATIVE_PROFILE_PAL_COM(); if(!s_initialized) { ApplyConfig(); ApplyConfigExtended(); ApplyWirelessConfig(); s_initialized = TRUE; } }
void RestoreConfig(void) { unsigned char t = Menu[CurrentMenu].Sub; // preserve active menu option unsigned short i; if ((F_Buff[0] == 0x30) && (F_Buff[1] == 0x00)) { Erase_Sensitivity(); memcpy(Item_Index, F_Buff + 2, sizeof(Item_Index)); memcpy(Hide_Index, F_Buff + 64, sizeof(Hide_Index)); for (i = 0; i < 9; i ++) Menu[i].Sub = CheckSub(Menu[i].Sub,F_Buff[2 + 96 + i]); Menu[CurrentMenu].Sub = t; // restore active menu } ApplyConfig(); }
void kmloverlay_pi::ShowPreferencesDialog( wxWindow* parent ) { KMLOverlayPreferencesDialog *dialog = new KMLOverlayPreferencesDialog( parent, wxID_ANY, m_interval ); if ( dialog->ShowModal() == wxID_OK ) { // OnClose should handle that for us normally but it doesn't seems to do so // We must save changes first dialog->SaveKMLOverlayConfig(); m_interval = dialog->m_interval; SaveConfig(); ApplyConfig(); } dialog->Destroy(); }
void gecomapi_pi::OnToolbarToolCallback(int id) { if(NULL == m_pgecomapi_window) return; wxAuiPaneInfo &pane = m_pauimgr->GetPane(m_pgecomapi_window); if(!pane.IsOk()) return; m_pgecomapi_window->m_ballowStart = true; pane.Show(!pane.IsShown()); // Toggle is handled by the toolbar but we must keep plugin manager b_toggle updated // to actual status to ensure right status upon toolbar rebuild SetToolbarItemState(m_toolbar_item_id, pane.IsShown()); if (NULL != m_pgecomapi_window->app) { if (!pane.IsShown()) { m_iWindowWidth = m_pgecomapi_window->GetSize().GetWidth(); m_iWindowHeight = m_pgecomapi_window->GetSize().GetHeight(); pane.window->SetSize(m_iWindowWidth, m_iWindowHeight); pane.BestSize(m_iWindowWidth, m_iWindowHeight); m_pgecomapi_window->GEAttachWindow(false); } else { pane.window->SetSize(m_iWindowWidth, m_iWindowHeight); pane.BestSize(m_iWindowWidth, m_iWindowHeight); m_pgecomapi_window->GEAttachWindow(true); } } else { if (pane.IsShown()) { m_pgecomapi_window->m_pfocusedwindow = wxWindow::FindFocus(); m_pgecomapi_window->GEInitialize(); ApplyConfig(); } } m_pauimgr->Update(); }
BOOL HAL_CONFIG_BLOCK::ApplyConfig( const char* Name, void* Address, size_t Length ) { return ApplyConfig( Name, Address, Length, NULL ); }
void SceneSwitcherSettings::ApplySettings() { pChange = false; ApplyConfig(hwnd); }
INT_PTR SceneSwitcherSettings::MsgClicked(int controlId, int code, HWND controlHwnd) { switch(controlId) { case IDC_CLEAR_HOTKEY: if(code == BN_CLICKED) { SendMessage(GetDlgItem(hwnd, IDC_TOGGLEHOTKEY), HKM_SETHOTKEY, 0, 0); SetChangedSettings(pChange = true); return TRUE; } break; case IDC_STOP: if(code == BN_CLICKED) // Stop button clicked { if(thePlugin->IsRunning()) thePlugin->StopThread(hwnd); else { ApplyConfig(hwnd); pChange = false; thePlugin->StartThread(hwnd); } SetChangedSettings(pChange); return TRUE; } break; case IDUP: { HWND wsMap = GetDlgItem(hwnd, IDC_WSMAP); const int sel = SendMessage(wsMap, LVM_GETSELECTIONMARK, 0, 0); if (sel > 0) { // Get the text from the item String wnd; wnd.SetLength(256); ListView_GetItemText(wsMap, sel, 0, wnd, 256); String scn; scn.SetLength(256); ListView_GetItemText(wsMap, sel, 1, scn, 256); // Delete it SendMessage(wsMap, LVM_DELETEITEM, sel, 0); // Add it above LVITEM lv1; lv1.mask = LVIF_TEXT; lv1.iItem = sel - 1; lv1.iSubItem = 0; lv1.pszText = wnd; LVITEM lv2; lv2.mask = LVIF_TEXT; lv2.iItem = sel - 1; lv2.iSubItem = 1; lv2.pszText = scn; SendMessage(wsMap, LVM_INSERTITEM, sel - 1, (LPARAM) &lv1); SendMessage(wsMap, LVM_SETITEM, sel - 1, (LPARAM) &lv2); // Update the selection mark SendMessage(wsMap, LVM_SETSELECTIONMARK, 0, sel - 1); SetChangedSettings(pChange = true); return TRUE; } break; } case IDDOWN: { HWND wsMap = GetDlgItem(hwnd, IDC_WSMAP); const int sel = SendMessage(wsMap, LVM_GETSELECTIONMARK, 0, 0); const int max = SendMessage(wsMap, LVM_GETITEMCOUNT, 0, 0) - 1; if (sel > -1 && sel < max) { // Get the text from the item String wnd; wnd.SetLength(256); ListView_GetItemText(wsMap, sel, 0, wnd, 256); String scn; scn.SetLength(256); ListView_GetItemText(wsMap, sel, 1, scn, 256); // Delete it SendMessage(wsMap, LVM_DELETEITEM, sel, 0); // Add it below LVITEM lv1; lv1.mask = LVIF_TEXT; lv1.iItem = sel + 1; lv1.iSubItem = 0; lv1.pszText = wnd; LVITEM lv2; lv2.mask = LVIF_TEXT; lv2.iItem = sel + 1; lv2.iSubItem = 1; lv2.pszText = scn; SendMessage(wsMap, LVM_INSERTITEM, sel + 1, (LPARAM) &lv1); SendMessage(wsMap, LVM_SETITEM, sel + 1, (LPARAM) &lv2); // Update the selection mark SendMessage(wsMap, LVM_SETSELECTIONMARK, 0, sel + 1); SetChangedSettings(pChange = true); return TRUE; } break; } case IDADD: { HWND wsMap = GetDlgItem(hwnd, IDC_WSMAP); HWND appList = GetDlgItem(hwnd, IDC_APPLIST); HWND scnList = GetDlgItem(hwnd, IDC_MAINSCN); String wnd = GetEditText(appList); // First column LVITEM lv1; lv1.mask = LVIF_TEXT; lv1.iItem = 0; lv1.iSubItem = 0; lv1.pszText = wnd; // Second column String scn = GetCBText(scnList, CB_ERR); LVITEM lv2; lv2.mask = LVIF_TEXT; lv2.iItem = 0; lv2.iSubItem = 1; lv2.pszText = scn; // Add first column then set second SendMessage(wsMap, LVM_INSERTITEM, 0, (LPARAM)&lv1); SendMessage(wsMap, LVM_SETITEM, 0, (LPARAM)&lv2); SetChangedSettings(pChange = true); return TRUE; } break; case IDREM: { // Remove the item HWND wsMap = GetDlgItem(hwnd, IDC_WSMAP); const int sel = SendMessage(wsMap, LVM_GETSELECTIONMARK, 0, 0); if (sel > -1) SendMessage(wsMap, LVM_DELETEITEM, sel, 0); SetChangedSettings(pChange = true); return TRUE; } break; case IDC_ALTSWITCH: case IDC_ALTNOSWITCH: if (code == BN_CLICKED) { HWND swButton = GetDlgItem(hwnd, IDC_ALTSWITCH); HWND altCombo = GetDlgItem(hwnd, IDC_ALTSCN); const bool swChecked = (SendMessage(swButton, BM_GETSTATE, 0, 0) & BST_CHECKED) != 0; EnableWindow(altCombo, swChecked); pChange = pChange || (swChecked != thePlugin->IsAltDoSwitch()); SetChangedSettings(pChange); return TRUE; } break; case IDC_STARTAUTO: { HWND control = GetDlgItem(hwnd, IDC_STARTAUTO); bool newState = (SendMessage(control, BM_GETSTATE, 0, 0) & BST_CHECKED) != 0; pChange = pChange || (newState != thePlugin->IsStartAuto()); SetChangedSettings(pChange); return TRUE; } break; case IDC_TOGGLEHOTKEY: if (code == EN_CHANGE) { SetChangedSettings(pChange = true); return TRUE; } break; case IDC_FREQ: if(code == EN_CHANGE) { DWORD newFreq = GetDlgItemInt(hwnd, IDC_FREQ, NULL, FALSE); DWORD oldFreq = thePlugin->GettimeToSleep(); pChange = pChange || newFreq != oldFreq; SetChangedSettings(pChange); return TRUE; } break; case IDC_APPLIST: case IDC_MAINSCN: if (code == CBN_SELCHANGE || code == CBN_EDITCHANGE) { EditItem(code == CBN_SELCHANGE && controlId == IDC_APPLIST); return TRUE; } break; case IDC_ALTSCN: if (code == CBN_SELCHANGE) { SetChangedSettings(pChange = true); return TRUE; } break; } return FALSE; }
void ConfigDialog::OnApplyAndExit( wxCommandEvent& event ) { ApplyConfig(); EndModal( wxID_APPLY ); }
void ConfigDialog::OnApply( wxCommandEvent& event ) { ApplyConfig(); ((MyFrame*)GetParent())->ReapplyConfig(); }
string osl_ExecuteSystemFunction(vector<OSL_LEXEM>* list) { string _result; _result.resize(0); #ifdef _DEBUG_OSL WriteToLog(DEFAULT_OSL_LOG_NAME, "Executing system function..."); #endif unsigned int param_count = 1; for(vector<OSL_LEXEM>::iterator it = list->begin(); it != list->end(); it++) { OSL_LEXEM lx = *it; if(osl_IsComma(lx.token)) param_count++; } vector<OSL_LEXEM>::iterator i_first = list->begin(); OSL_LEXEM first = *i_first; if(first.token == "echo") { vector<OSL_LEXEM>::iterator i_second = list->begin()+2; OSL_LEXEM second = *i_second; char* message = new char[second.token.length()+1]; strcpy(message, (char*)second.token.data()); message = osl_RemoveQuotesChr(message); DoEcho(message); } else if(first.token == "load") { vector<OSL_LEXEM>::iterator i_second = list->begin()+2; OSL_LEXEM second = *i_second; bool ok = DoLoad(osl_RemoveQuotesStr(second.token)); ok == true ? _result = OSL_EXEC_OK : _result = OSL_EXEC_FAIL; } else if(first.token == "exit") { DoExit(); } else if(first.token == "init") { vector<OSL_LEXEM>::iterator i_second = list->begin()+2; OSL_LEXEM second = *i_second; if(second.token == "gui") { if(!gui) { gui = new GUI(); _result = OSL_EXEC_OK; } else { osl_Error("GUI already initialized"); _result = OSL_EXEC_FAIL; } } else { osl_Error("init(): unknown parameter"); _result = OSL_EXEC_FAIL; } } else if(first.token == "loadconfig") { vector<OSL_LEXEM>::iterator i_second = list->begin()+2; OSL_LEXEM second = *i_second; if(osl_IsStrConstant(second.token)) { char* file = new char[second.token.length()+1]; strcpy(file, (char*)second.token.data()); file = osl_RemoveQuotesChr(file); bool ok = LoadConfig(file, &cfg); if(ok) { ApplyConfig(&cfg); _result = OSL_EXEC_OK; } else _result = OSL_EXEC_FAIL; } else osl_Error("LoadConfig(): Invalid argument"); } else if(first.token == "loadfontfromfile") { WriteToLog(DEFAULT_OSL_LOG_NAME, "Trying to load font from file..."); if(param_count == 3) { vector<OSL_LEXEM>::iterator i_second = list->begin()+2; OSL_LEXEM second = *i_second; vector<OSL_LEXEM>::iterator i_third = list->begin()+4; OSL_LEXEM third = *i_third; vector<OSL_LEXEM>::iterator i_fourth = list->begin()+6; OSL_LEXEM fourth = *i_fourth; if(osl_IsIntConstant(third.token) && osl_IsIntConstant(fourth.token)) { try { if(LoadFontFromFile((char*)osl_RemoveQuotesStr(second.token).c_str(), osl_StrToInt(third.token), osl_StrToInt(fourth.token))) { WriteToLog(DEFAULT_OSL_LOG_NAME, "LoadFontFromFile OK"); _result = OSL_EXEC_OK; } else { WriteToLog(DEFAULT_OSL_LOG_NAME, "LoadFontFromFile FAILED"); _result = OSL_EXEC_FAIL; } } catch(...) { osl_Error("Exception in try block: LoadFontFromFile"); _result = OSL_EXEC_FAIL; } } else { osl_Error("LoadFontFromFile() error: incompatible types"); _result = OSL_EXEC_FAIL; } } else { osl_Error("LoadFontFromFile() error: function require one parameter"); _result = OSL_EXEC_FAIL; } } else if(first.token == "loadfont") { WriteToLog(DEFAULT_OSL_LOG_NAME, "Trying to load font..."); if(param_count == 4) { vector<OSL_LEXEM>::iterator i_second = list->begin()+2; OSL_LEXEM second = *i_second; vector<OSL_LEXEM>::iterator i_third = list->begin()+4; OSL_LEXEM third = *i_third; vector<OSL_LEXEM>::iterator i_fourth = list->begin()+6; OSL_LEXEM fourth = *i_fourth; vector<OSL_LEXEM>::iterator i_fifth = list->begin()+8; OSL_LEXEM fifth = *i_fifth; try { bool ok = LoadFont((char*)osl_RemoveQuotesStr(second.token).c_str(), osl_StrToInt(third.token), osl_StrToInt(fourth.token), (char*)osl_RemoveQuotesStr(fifth.token).c_str()); ok == true ? _result = OSL_EXEC_OK : _result = OSL_EXEC_FAIL; } catch(...) { osl_Error("Exception in try block: LoadFont"); _result = OSL_EXEC_FAIL; } WriteToLog(DEFAULT_OSL_LOG_NAME, "LoadFont OK"); } else { osl_Error("LoadFont() error: function requires two parametres"); _result = OSL_EXEC_FAIL; } } else if(first.token == "loadtexture") { WriteToLog(DEFAULT_OSL_LOG_NAME, "Trying to load texture..."); if(param_count == 1) { vector<OSL_LEXEM>::iterator i_second = list->begin()+2; OSL_LEXEM second = *i_second; try { string s = osl_RemoveQuotesStr(second.token); char* n = new char[strlen(s.data())+1]; sprintf(n, "%s\0", s.data()); if(!LoadTexture(n)) { osl_Error("LoadTexture() failed"); _result = OSL_EXEC_FAIL; } else _result = OSL_EXEC_OK; delete[] n; } catch(...) { osl_Error("Exception in try block: LoadTexture"); _result = OSL_EXEC_FAIL; } WriteToLog(DEFAULT_OSL_LOG_NAME, "LoadTexture OK"); } else { osl_Error("LoadTexture() error: function requires one parameter"); _result = OSL_EXEC_FAIL; } } else if(first.token == "newguielem") { if(param_count == 2) { vector<OSL_LEXEM>::iterator i_second = list->begin()+2; OSL_LEXEM second = *i_second; vector<OSL_LEXEM>::iterator i_third = list->begin()+4; OSL_LEXEM third = *i_third; NewGUIElem(osl_RemoveQuotesStr(second.token), osl_RemoveQuotesStr(third.token)); } else osl_Error("NewGUIElem() error: function requires two parametres"); } else if(first.token == "setguielem") { if(param_count == 3) { vector<OSL_LEXEM>::iterator i_second = list->begin()+2; OSL_LEXEM second = *i_second; vector<OSL_LEXEM>::iterator i_third = list->begin()+4; OSL_LEXEM third = *i_third; vector<OSL_LEXEM>::iterator i_fourth = list->begin()+6; OSL_LEXEM fourth = *i_fourth; SetGUIElem(osl_RemoveQuotesStr(second.token), osl_RemoveQuotesStr(third.token), osl_RemoveQuotesStr(fourth.token)); } else if(param_count == 5) { vector<OSL_LEXEM>::iterator i_second = list->begin()+2; OSL_LEXEM second = *i_second; vector<OSL_LEXEM>::iterator i_third = list->begin()+4; OSL_LEXEM third = *i_third; vector<OSL_LEXEM>::iterator i_fourth = list->begin()+6; OSL_LEXEM fourth = *i_fourth; vector<OSL_LEXEM>::iterator i_fifth = list->begin()+8; OSL_LEXEM fifth = *i_fifth; vector<OSL_LEXEM>::iterator i_sixth = list->begin()+10; OSL_LEXEM sixth = *i_sixth; SetGUIElem(osl_RemoveQuotesStr(second.token), osl_RemoveQuotesStr(third.token), osl_RemoveQuotesStr(fourth.token), osl_RemoveQuotesStr(fifth.token), osl_RemoveQuotesStr(sixth.token)); } else if(param_count == 6) { vector<OSL_LEXEM>::iterator i_second = list->begin()+2; OSL_LEXEM second = *i_second; vector<OSL_LEXEM>::iterator i_third = list->begin()+4; OSL_LEXEM third = *i_third; vector<OSL_LEXEM>::iterator i_fourth = list->begin()+6; OSL_LEXEM fourth = *i_fourth; vector<OSL_LEXEM>::iterator i_fifth = list->begin()+8; OSL_LEXEM fifth = *i_fifth; vector<OSL_LEXEM>::iterator i_sixth = list->begin()+10; OSL_LEXEM sixth = *i_sixth; vector<OSL_LEXEM>::iterator i_seventh = list->begin()+12; OSL_LEXEM seventh = *i_seventh; SetGUIElem(osl_RemoveQuotesStr(second.token), osl_RemoveQuotesStr(third.token), osl_RemoveQuotesStr(fourth.token), osl_RemoveQuotesStr(fifth.token), osl_RemoveQuotesStr(sixth.token), osl_RemoveQuotesStr(seventh.token)); } else osl_Error("NewGUIElem() error: incorrect number of parametres"); } else if(first.token == "createplayer") { if(param_count == 28) { vector<OSL_LEXEM>::iterator p1 = list->begin()+2; vector<OSL_LEXEM>::iterator p2 = list->begin()+4; vector<OSL_LEXEM>::iterator p3 = list->begin()+6; vector<OSL_LEXEM>::iterator p4 = list->begin()+8; vector<OSL_LEXEM>::iterator p5 = list->begin()+10; vector<OSL_LEXEM>::iterator p6 = list->begin()+12; vector<OSL_LEXEM>::iterator p7 = list->begin()+14; vector<OSL_LEXEM>::iterator p8 = list->begin()+16; vector<OSL_LEXEM>::iterator p9 = list->begin()+18; vector<OSL_LEXEM>::iterator p10 = list->begin()+20; vector<OSL_LEXEM>::iterator p11 = list->begin()+22; vector<OSL_LEXEM>::iterator p12 = list->begin()+24; vector<OSL_LEXEM>::iterator p13 = list->begin()+26; vector<OSL_LEXEM>::iterator p14 = list->begin()+28; vector<OSL_LEXEM>::iterator p15 = list->begin()+30; vector<OSL_LEXEM>::iterator p16 = list->begin()+32; vector<OSL_LEXEM>::iterator p17 = list->begin()+34; vector<OSL_LEXEM>::iterator p18 = list->begin()+36; vector<OSL_LEXEM>::iterator p19 = list->begin()+38; vector<OSL_LEXEM>::iterator p20 = list->begin()+40; vector<OSL_LEXEM>::iterator p21 = list->begin()+42; vector<OSL_LEXEM>::iterator p22 = list->begin()+44; vector<OSL_LEXEM>::iterator p23 = list->begin()+46; vector<OSL_LEXEM>::iterator p24 = list->begin()+48; vector<OSL_LEXEM>::iterator p25 = list->begin()+50; vector<OSL_LEXEM>::iterator p26 = list->begin()+52; vector<OSL_LEXEM>::iterator p27 = list->begin()+54; vector<OSL_LEXEM>::iterator p28 = list->begin()+56; CreatePlayer((*p1).token, (*p2).token, (*p3).token, (*p4).token, (*p5).token, (*p6).token, (*p7).token, (*p8).token, (*p9).token, (*p10).token, (*p11).token, (*p12).token, (*p13).token, (*p14).token, (*p15).token, (*p16).token, (*p17).token, (*p18).token, (*p19).token, (*p20).token, (*p21).token, (*p22).token, (*p23).token, (*p24).token, (*p25).token, (*p26).token, (*p27).token, (*p28).token); } else osl_Error("CreatePlayer() error: incorrect number of parametres"); } else if(first.token == "createpowerup") { if(param_count == 4) { vector<OSL_LEXEM>::iterator p1 = list->begin()+2; vector<OSL_LEXEM>::iterator p2 = list->begin()+4; vector<OSL_LEXEM>::iterator p3 = list->begin()+6; vector<OSL_LEXEM>::iterator p4 = list->begin()+8; CreatePowerup((*p1).token, (*p2).token, (*p3).token, (*p4).token); } else osl_Error("CreatePowerup() error: incorrect number of parametres"); } else if(first.token == "createenemy") { if(param_count == 3) { vector<OSL_LEXEM>::iterator p1 = list->begin()+2; vector<OSL_LEXEM>::iterator p2 = list->begin()+4; vector<OSL_LEXEM>::iterator p3 = list->begin()+6; CreateEnemy((*p1).token, (*p2).token, (*p3).token); } else osl_Error("CreateEnemy() error: incorrect number of parametres"); } else osl_Error("Command is not implemented yet"); return _result; }