本文整理汇总了C++中CGuiLayout::removeWidget方法的典型用法代码示例。如果您正苦于以下问题:C++ CGuiLayout::removeWidget方法的具体用法?C++ CGuiLayout::removeWidget怎么用?C++ CGuiLayout::removeWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGuiLayout
的用法示例。
在下文中一共展示了CGuiLayout::removeWidget方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Menu_Net_NETFrame
//.........这里部分代码省略.........
addr = "";
int result = cInternet.SendMessage(mi_ServerList, LVS_GETCURSINDEX, &addr, 0);
if(result && addr != "") {
SvrList_RemoveServer(addr);
// Re-Fill the server list
Menu_Net_NET_ServerList_Refresher();
}
}
break;
// Popup menu
case mi_PopupMenu:
switch( ev->iEventMsg ) {
// Delete the server
case MNU_USER+0:
SvrList_RemoveServer(szNetCurServer);
break;
// Refresh the server
case MNU_USER+1:
{
server_t::Ptr sv = SvrList_FindServerStr(szNetCurServer);
if(sv)
SvrList_RefreshServer(sv);
}
break;
// Join a server
case MNU_USER+2: {
// Save the list
SvrList_Save();
lv_subitem_t *sub = ((CListview *)cInternet.getWidget(mi_ServerList))->getCurSubitem(1);
if (sub)
Menu_Net_NETJoinServer(szNetCurServer,sub->sText);
}
return;
// Add server to favourites
case MNU_USER+3:
{
server_t::Ptr sv = SvrList_FindServerStr(szNetCurServer);
if (sv)
SvrList_AddFavourite(sv->szName,sv->szAddress);
}
break;
// Send a "wants to join" message
case MNU_USER+4:
{
server_t::Ptr sv = SvrList_FindServerStr(szNetCurServer);
std::string Nick;
cInternet.SendMessage(mi_PlayerSelection, CBS_GETCURNAME, &Nick, 0);
if (sv)
SvrList_WantsJoin(Nick, sv);
}
break;
// Copy the IP to clipboard
case MNU_USER+5:
{
copy_to_clipboard(szNetCurServer);
}
break;
// Show server details
case MNU_USER+6:
cInternet.removeWidget(mi_PopupMenu);
Menu_Net_NETShowServer(szNetCurServer);
break;
}
// Re-Fill the server list
Menu_Net_NET_ServerList_Refresher();
// Remove the menu widget
cInternet.SendMessage( mi_PopupMenu, MNM_REDRAWBUFFER, (DWORD)0, 0);
cInternet.removeWidget(mi_PopupMenu);
break;
// Update server list
case mi_UpdateList:
if(ev->iEventMsg == BTN_CLICKED) {
// Click!
PlaySoundSample(sfxGeneral.smpClick);
Menu_Net_NETUpdateList();
}
break;
}
}
// F5 updates the list
if (WasKeyboardEventHappening(SDLK_F5))
Menu_Net_NETUpdateList();
// Draw the mouse
DrawCursor(VideoPostProcessor::videoSurface());
}