本文整理汇总了C++中rocket::core::ElementDocument::SetTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ ElementDocument::SetTitle方法的具体用法?C++ ElementDocument::SetTitle怎么用?C++ ElementDocument::SetTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rocket::core::ElementDocument
的用法示例。
在下文中一共展示了ElementDocument::SetTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LevelFileDataSource
void Phobos::Game::Gui::LevelSelector::Open()
{
m_fCloseRequested = false;
m_upDataSource.reset( PH_NEW LevelFileDataSource(m_lstLevelPaths));
m_upDataGridController.reset(PH_NEW(DataGridController));
m_spGuiContext = Engine::Gui::Manager::GetInstance().CreateContext("LevelSelector");
Rocket::Core::ElementDocument* cursor = m_spGuiContext->LoadMouseCursor("resources/gui/LevelSelector/cursor.rml");
if (cursor)
cursor->RemoveReference();
Rocket::Core::ElementDocument* document = m_spGuiContext->LoadDocument("resources/gui/LevelSelector/main.rml");
if (document)
{
document->SetTitle(Rocket::Core::String("Select Level"));
document->Show();
document->RemoveReference();
Rocket::Controls::ElementDataGrid *dataGrid = dynamic_cast<Rocket::Controls::ElementDataGrid*>(document->GetElementById("datagrid"));
int numRows = dataGrid->GetNumRows();
dataGrid->AddEventListener("rowadd", m_upDataGridController.get());
dataGrid->AddEventListener("keydown", m_upDataGridController.get());
document->GetElementById("loadForm")->AddEventListener("submit", &clLevelSelectorEventListener_gl);
document->GetElementById("quitForm")->AddEventListener("submit", &clLevelSelectorEventListener_gl);
}
}