本文整理汇总了C++中CGUI::CreateGUIMultiColumnList方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUI::CreateGUIMultiColumnList方法的具体用法?C++ CGUI::CreateGUIMultiColumnList怎么用?C++ CGUI::CreateGUIMultiColumnList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUI
的用法示例。
在下文中一共展示了CGUI::CreateGUIMultiColumnList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CMasterListQuery
CServerBrowser::CServerBrowser(void)
{
assert(!m_pSingleton);
// Set our singleton
m_pSingleton = this;
// Create the master list query instance and set its handler
m_pMasterListQuery = new CMasterListQuery(MASTERLIST_ADDRESS, MASTERLIST_VERSION);
m_pMasterListQuery->SetMasterListQueryHandler(MasterListQueryHandler);
// Create the server query instance and set its handler
m_pServerQuery = new CServerQuery();
m_pServerQuery->SetServerQueryHandler(ServerQueryHandler);
// Setup the GUI
CGUI * pGUI = g_pClient->GetGUI();
float fWidth = (float)pGUI->GetDisplayWidth();
float fHeight = (float)pGUI->GetDisplayHeight();
m_GUIElements.pWindow = pGUI->CreateGUIFrameWindow();
m_GUIElements.pWindow->setText("Server Browser");
m_GUIElements.pWindow->setSize(CEGUI::UVector2(CEGUI::UDim(0, 900.0f), CEGUI::UDim(0, 500.0f)));
m_GUIElements.pWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, fWidth/2-450.0f), CEGUI::UDim(0, fHeight/2-250.0f)));
m_GUIElements.pWindow->subscribeEvent(CEGUI::FrameWindow::EventCloseClicked, CEGUI::Event::Subscriber(&CServerBrowser::OnCloseClick, this));
m_GUIElements.pWindow->setVisible(false);
m_GUIElements.pServerMultiColumnList = pGUI->CreateGUIMultiColumnList(m_GUIElements.pWindow);
m_GUIElements.pServerMultiColumnList->setText("Server Browser");
m_GUIElements.pServerMultiColumnList->setSize(CEGUI::UVector2(CEGUI::UDim(0.950f, 0), CEGUI::UDim(0.8250f, 0)));
m_GUIElements.pServerMultiColumnList->setPosition(CEGUI::UVector2(CEGUI::UDim(0.0250f, 0), CEGUI::UDim(0.0250f, 0)));
m_GUIElements.pServerMultiColumnList->setProperty("ColumnHeader", "text:Name width:{0.5,0} id:0");
m_GUIElements.pServerMultiColumnList->setProperty("ColumnHeader", "text:Host width:{0.2,0} id:1");
m_GUIElements.pServerMultiColumnList->setProperty("ColumnHeader", "text:Players width:{0.1,0} id:2");
m_GUIElements.pServerMultiColumnList->setProperty("ColumnHeader", "text:Ping width:{0.1,0} id:3");
m_GUIElements.pServerMultiColumnList->setProperty("ColumnHeader", "text:Locked width:{0.09,0} id:4");
m_GUIElements.pServerMultiColumnList->setFont(pGUI->GetFont("tahoma-bold", 10));
m_GUIElements.pServerMultiColumnList->subscribeEvent(CEGUI::Window::EventMouseClick, CEGUI::Event::Subscriber(&CServerBrowser::OnRowClick, this));
m_GUIElements.pRefreshButton = pGUI->CreateGUIButton(m_GUIElements.pWindow);
m_GUIElements.pRefreshButton->setText("Refresh");
m_GUIElements.pRefreshButton->setSize(CEGUI::UVector2(CEGUI::UDim(0.20f, 0), CEGUI::UDim(0.10f, 0)));
m_GUIElements.pRefreshButton->setPosition(CEGUI::UVector2(CEGUI::UDim(0.550f, 0), CEGUI::UDim(0.8750f, 0)));
m_GUIElements.pRefreshButton->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&CServerBrowser::OnRefreshButtonClick, this));
m_GUIElements.pConnectButton = pGUI->CreateGUIButton(m_GUIElements.pWindow);
m_GUIElements.pConnectButton->setText("Connect");
m_GUIElements.pConnectButton->setSize(CEGUI::UVector2(CEGUI::UDim(0.20f, 0), CEGUI::UDim(0.10f, 0)));
m_GUIElements.pConnectButton->setPosition(CEGUI::UVector2(CEGUI::UDim(0.7750f, 0), CEGUI::UDim(0.8750f, 0)));
m_GUIElements.pConnectButton->setEnabled(false);
m_GUIElements.pConnectButton->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&CServerBrowser::OnConnectButtonClick, this));
m_bVisible = false;
}