WtTestNewickVectorApplication(const Wt::WEnvironment& env) : Wt::WApplication(env) { this->useStyleSheet("wt.css"); this->setTitle("TestNewick"); ShowMain(); }
bool CUIMMShniaga::OnKeyboard(int dik, EUIMessages keyboard_action){ if (WINDOW_KEY_PRESSED == keyboard_action){ switch (dik){ case DIK_UP: if (m_selected_btn > 0) SelectBtn(m_selected_btn - 1); return true; case DIK_DOWN: if (m_selected_btn < BtnCount() - 1) SelectBtn(m_selected_btn + 1); return true; case DIK_RETURN: OnBtnClick(); return true; case DIK_ESCAPE: if (1 == m_page) ShowMain(); return true; } } return CUIWindow::OnKeyboard(dik, keyboard_action); }
void CUIMMShniaga::OnBtnClick(){ if (0 == xr_strcmp("btn_new_game", m_selected->WindowName())) ShowNewGame(); else if (0 == xr_strcmp("btn_new_back", m_selected->WindowName())) ShowMain(); else GetMessageTarget()->SendMessage(m_selected, BUTTON_CLICKED); }
// Primary initialization function. Sets everything up and takes care of the program char *Start(int run_vegastrike) { InitGraphics(); DATA.name = NewString(""); DATA.author = NewString(""); DATA.description = NewString(""); DATA.briefing = NewString(""); DATA.path = NewString(""); DATA.numplayers = NewString(""); ShowMain(1); gtk_main(); return DATA.path; }
void CUIMMShniaga::InitShniaga(CUIXml& xml_doc, LPCSTR path) { string256 _path; CUIXmlInit::InitWindow(xml_doc, path, 0, this); strconcat (sizeof(_path),_path,path,":shniaga:magnifire"); CUIXmlInit::InitStatic(xml_doc, _path,0,m_magnifier); m_mag_pos = m_magnifier->GetWndPos().x; strconcat (sizeof(_path),_path,path,":shniaga"); CUIXmlInit::InitStatic(xml_doc, _path,0,m_shniaga); strconcat (sizeof(_path),_path,path,":buttons_region"); CUIXmlInit::InitScrollView(xml_doc, _path,0,m_view); strconcat (sizeof(_path),_path,path,":shniaga:magnifire:y_offset"); m_offset = xml_doc.ReadFlt(_path,0,0); if (!g_pGameLevel || !g_pGameLevel->bReady) { if (!*g_last_saved_game || !CSavedGameWrapper::valid_saved_game(g_last_saved_game)) CreateList (m_buttons, xml_doc, "menu_main"); else CreateList (m_buttons, xml_doc, "menu_main_last_save"); CreateList (m_buttons_new, xml_doc, "menu_new_game"); } else { if (GameID() == eGameIDSingle) { VERIFY (Actor()); if (Actor() && !Actor()->g_Alive()) CreateList (m_buttons, xml_doc, "menu_main_single_dead"); else CreateList (m_buttons, xml_doc, "menu_main_single"); } else CreateList (m_buttons, xml_doc, "menu_main_mm"); } ShowMain (); m_sound->Init(xml_doc, "menu_sound"); m_sound->music_Play(); }