武侠-右键下拉菜单实现

一 右键点击目标头像界面,首先分析是NPC,其他玩家,玩家自己头像。然后判断状态,根据状态,发送不同的命令给lua脚本

 

VOID CGameInterface::Object_ShowContexMenu(INT idObj,BOOL showMyself)
{
    CObject
* pObject = (CObject*)CObjectManager::GetMe()->FindServerObject(idObj);
    
if(!pObject) return;

    CHAR szObjId[
32]; _snprintf(szObjId, 32"%d", pObject->GetID());

    
// 得到鼠标位置
    POINT ptMouse = CInputSystem::GetMe()->MouseGetPos();

    CHAR szXPos[
32]; _snprintf(szXPos, 32"%d", ptMouse.x);
    CHAR szYPos[
32]; _snprintf(szYPos, 32"%d", ptMouse.y);
    
    std::vector
< STRING > vParam;


    
// 根据不同物体产生不同右键事件

    
// 主角自身
    if(g_theKernel.IsKindOf(pObject->GetClass(), GETCLASS(CObject_PlayerMySelf)))
    {
        
if(showMyself)
        {
            
// 如果自己已经在队伍中了
            if( CUIDataPool::GetMe()->IsInTeam())
            {
                vParam.push_back(
"player_in_team");
                vParam.push_back(szObjId);
                vParam.push_back(szXPos);
                vParam.push_back(szYPos);
                CEventSystem::GetMe()
->PushEvent(GE_SHOW_CONTEXMENU, vParam);
                
                
return;
            }

            
// 自己没有组队
            vParam.push_back("player");
            vParam.push_back(szObjId);
            vParam.push_back(szXPos);
            vParam.push_back(szYPos);
            CEventSystem::GetMe()
->PushEvent(GE_SHOW_CONTEXMENU, vParam);
        }
    }
    
// 其他玩家
    else if(g_theKernel.IsKindOf(pObject->GetClass(), GETCLASS(CObject_PlayerOther)))
    {
        CObject_PlayerOther
* pOtherObject = (CObject_PlayerOther*)pObject;


        
// 是否有帮会
        if( INVALID_ID != CObjectManager::GetMe()->GetMySelf()->GetCharacterData()->Get_Guild() )
        {
            
            
// 根据策划的需求再进行修改: 是否判断其他玩家已经入帮了    GetCharacterData()->Get_Guild


            INT tt 
= CDataPool::GetMe()->Guild_GetCurPosition();

            
// 自己是帮主或副帮主, 点击其他玩家
            if( ( CDataPool::GetMe()->Guild_GetCurPosition() == GUILD_POSITION_CHIEFTAIN ) ||
                ( CDataPool::GetMe()
->Guild_GetCurPosition() == GUILD_POSITION_ASS_CHIEFTAIN ))
            {

                
// 自己有队伍, 对方有队伍
                if( (pOtherObject->GetCharacterData()->Get_HaveTeamFlag())&&( CUIDataPool::GetMe()->IsInTeam()) )
                {
                    vParam.push_back(
"guild_other_team_member");
                    vParam.push_back(szObjId);
                    vParam.push_back(szXPos);
                    vParam.push_back(szYPos);
                    CEventSystem::GetMe()
->PushEvent(GE_SHOW_CONTEXMENU, vParam);
                    
                    
return;
                }
                
// 其他玩家没有队伍
                if((!pOtherObject->GetCharacterData()->Get_HaveTeamFlag()))
                {
                    vParam.push_back(
"guild_other_not_team_member");
                    vParam.push_back(szObjId);
                    vParam.push_back(szXPos);
                    vParam.push_back(szYPos);
                    CEventSystem::GetMe()
->PushEvent(GE_SHOW_CONTEXMENU, vParam);
                    
                    
return;
                }
                
// 自己没队伍, 其他玩家有队伍
                if((pOtherObject->GetCharacterData()->Get_HaveTeamFlag())&&!CUIDataPool::GetMe()->IsInTeam()))
                {
                    vParam.push_back(
"guild_other_team_member_me_not_teamer");
                    vParam.push_back(szObjId);
                    vParam.push_back(szXPos);
                    vParam.push_back(szYPos);
                    CEventSystem::GetMe()
->PushEvent(GE_SHOW_CONTEXMENU, vParam);
                    
                    
return;
                }

                vParam.push_back(
"guild_other_player");
                vParam.push_back(szObjId);
                vParam.push_back(szXPos);
                vParam.push_back(szYPos);
                CEventSystem::GetMe()
->PushEvent( GE_SHOW_CONTEXMENU, vParam );

                
return ;
            }

            
// 自己有帮会(帮主), 对方已加帮
                    
// 自己有队伍, 对方有队伍
                    
// 其他玩家没有队伍
                    
// 自己没队伍, 其他玩家有队伍

            
// 自己有帮会(帮主), 对方没加帮
            
        }


        
// 自己有队伍, 点击的其他玩家也有队伍
        if((pOtherObject->GetCharacterData()->Get_HaveTeamFlag())&&( CUIDataPool::GetMe()->IsInTeam()))
        {
            vParam.push_back(
"other_team_member");
            vParam.push_back(szObjId);
            vParam.push_back(szXPos);
            vParam.push_back(szYPos);
            CEventSystem::GetMe()
->PushEvent(GE_SHOW_CONTEXMENU, vParam);
            
            
return;
        }

        
// 点击其他玩家没有队伍
        if((!pOtherObject->GetCharacterData()->Get_HaveTeamFlag()))
        {
            vParam.push_back(
"other_not_team_member");
            vParam.push_back(szObjId);
            vParam.push_back(szXPos);
            vParam.push_back(szYPos);
            CEventSystem::GetMe()
->PushEvent(GE_SHOW_CONTEXMENU, vParam);
            
            
return;
        }

        
        
// 自己没队伍, 点击其他玩家有队伍
        if((pOtherObject->GetCharacterData()->Get_HaveTeamFlag())&&!CUIDataPool::GetMe()->IsInTeam()))
        {
            vParam.push_back(
"other_team_member_me_not_teamer");
            vParam.push_back(szObjId);
            vParam.push_back(szXPos);
            vParam.push_back(szYPos);
            CEventSystem::GetMe()
->PushEvent(GE_SHOW_CONTEXMENU, vParam);
            
            
return;
        }


        vParam.push_back(
"other_player");
        vParam.push_back(szObjId);
        vParam.push_back(szXPos);
        vParam.push_back(szYPos);
        CEventSystem::GetMe()
->PushEvent(GE_SHOW_CONTEXMENU, vParam);
    }
    
// NPC 
    else if(g_theKernel.IsKindOf(pObject->GetClass(), GETCLASS(CObject_PlayerNPC)))
    {
        
//PET_GUID_t pg = CObjectManager::GetMe()->GetMySelf()->GetCharacterData()->Get_CurrentPetGUID();

        
// 自己的宠物
        /*if(!(pg.IsNull()) && CDataPool::GetMe()->Pet_GetPet(pg) && CDataPool::GetMe()->Pet_GetPet(pg)->m_idServer == pObject->GetServerID())
        {
            vParam.push_back("my_pet");
            vParam.push_back(szObjId);
            vParam.push_back(szXPos);
            vParam.push_back(szYPos);
            CEventSystem::GetMe()->PushEvent(GE_SHOW_CONTEXMENU, vParam);
            
            return;
        }
*/

        
//CObject_PlayerNPC* pNpcObject = (CObject_PlayerNPC*)pObject;
        
// 其他宠物
        
//if(pNpcObject->GetNpcType() == NPC_TYPE_PET)
        
//{
        
//    if(INVALID_UID != pNpcObject->GetCharacterData()->Get_OwnerID())
        
//    {
        
//        // 有归属的宠物才显示菜单
        
//        vParam.push_back("other_pet");
        
//        vParam.push_back(szObjId);
        
//        vParam.push_back(szXPos);
        
//        vParam.push_back(szYPos);
        
//        CEventSystem::GetMe()->PushEvent(GE_SHOW_CONTEXMENU, vParam);
        
//    }

        
//    return;
        
//}

        vParam.push_back(
"npc");
        vParam.push_back(szObjId);
        vParam.push_back(szXPos);
        vParam.push_back(szYPos);
        CEventSystem::GetMe()
->PushEvent(GE_SHOW_CONTEXMENU, vParam);
    }
    
else 
        
return;

}

 

二 lua判断C++传来的参数

 

        --------------------------------------------------------------------------------------------------------------------------
        
--
        
-- 如果是其他队员打开的菜单.
        
--
        
if(arg0 == "Team_Member") then
            
this:Show();
            
--关心NPC
            objCared 
= tonumber(arg1);
            
this:CareObject(objCared, 1"ContexMenu");

            

            
if( Player:InTeamFollowMode() ) then
                ContexMenu_TeamFollowMember:SetPopMenuPos(arg2, arg3);
                ContexMenu_TeamFollowMember:Show();
            
else
                ContexMenu_TeamMember:SetPopMenuPos(arg2, arg3);
                ContexMenu_TeamMember:Show();
            end
            currentSelectMember 
= arg4;
            
return;
        end;

        
--------------------------------------------------------------------------------------------------------------------------
        
--
        
-- 打开自己队伍界面
        
--
        
if(arg0 == "player") then
            
this:Show();
            
--关心NPC
            objCared 
= tonumber(arg1);
            
this:CareObject(objCared, 1"ContexMenu");

            ContexMenu_Self:Show();
            ContexMenu_Self:SetPopMenuPos(arg2, arg3);
            
return;
        end;
        
        
if(arg0 == "ModifyPKMode") then
            
this:Show();
            
--关心NPC
            objCared 
= tonumber(arg1);
            
this:CareObject(objCared, 1"ContexMenu");
            ContexMenu_Self_pk:SetPopMenuPos(arg2, arg3);
            ContexMenu_Self_pk:Show();
            
            PKModeItem[currentPKMode]:SetProperty(
"Text""#c00ff00"..PKModeName[currentPKMode]);
            
return;
        end;
        
        
        
if(arg0 == "ModifyAlloCationMode") then
            
this:Show();
            
--关心NPC
            objCared 
= tonumber(arg1);
            
this:CareObject(objCared, 1"ContexMenu");
            
 
    
--[[ local pos = ContexMenuFrame:GetProperty("Position");

     local pos11, pos12 
= string.find( pos, "x" );
     local pos13, pos14 
= string.find( pos, "y" );
      
      local PosX1 
= string.sub( pos, pos12 + 2, pos13 - 2 );
      local PosY1 
= string.sub( pos, pos14 + 2);
      
      
      local width  
=  ContexMenu_Self_In_Team:GetProperty("Width");
      local Height 
=  ContexMenu_Self_In_Team:GetProperty("Height");
      
      
     
        local newPosX 
= tonumber(PosX1)+tonumber(width);
        local newPosY 
= tonumber(PosY1)+tonumber(Height);
              
        ContexMenu_Item_fenpei:SetPopMenuPos(newPosX, newPosY);]]
--
        
        
            
            ContexMenu_Item_fenpei:SetPopMenuPos(arg2, arg3);
            
            ContexMenu_Item_fenpei:Show();
        
            currentAlloCationMode  
= Player:GetTeamAllocationMode();     
            
for i= 0 ,3 do
                AlloCationModeItem[i]:SetProperty(
"Text""#W"..AlloCationModeName[i]);    
            end
            
            AxTrace(
0,0,"物品是拾取模式是 "..tostring(currentAlloCationMode));
            
--这句的作用是队长选择分配模式时绿色显示原先的分配模式
            AlloCationModeItem[currentAlloCationMode]:SetProperty(
"Text""#c00ff00"..AlloCationModeName[currentAlloCationMode]);    
            
            
              isLeader
=    DataPool:GetMyTeamLeaderFlag();
            
            
if(isLeader ==1)then
                          
for i =0 ,3 do

                              AlloCationModeItem[i]    :SetProperty( 
"Visible""True" );
        
                      end
            elseif(isLeader 
==0)then
                  
for i =0 ,3 do
                                  AlloCationModeItem[i]    :SetProperty( 
"Visible""False" );
                             
                  end
            AlloCationModeItem[currentAlloCationMode]    :SetProperty( 
"Visible""True" );
        
            end; 
            
            
return;
        end;

        
      
--------------------------------------------------------------------------------------------------------------------------
        
--
        
-- 自己有队伍, 只打开摆摊按钮界面
        
--
        
if(arg0 == "player_in_team") then
            
this:Show();
            
--关心NPC
            objCared 
= tonumber(arg1);
            
this:CareObject(objCared, 1"ContexMenu");

            ContexMenu_Self_In_Team:Show();
            ContexMenu_Self_In_Team:SetPopMenuPos(arg2, arg3);
            isLeader 
= DataPool:GetMyTeamLeaderFlag();
            
            currentAlloCationMode  
= Player:GetTeamAllocationMode();
            
if(isLeader ==1)then
                        item_fenpei:SetProperty( 
"Text""物品分配模式" );
                        item_fenpei:SetProperty( 
"Clicked","True");
            
            elseif(isLeader 
==0)then
            
                    item_fenpei:SetProperty( 
"Text""#G物品分配模式:"..AlloCationModeName[currentAlloCationMode] );
                    item_fenpei:SetProperty( 
"Clicked","False");
            
            end
--            AxTrace( 0,0"addleader = "..tostring( isLeader ) );
            
            
return;
        end;
        
      
--------------------------------------------------------------------------------------------------------------------------
        
--

        
-- 自己是帮主或副帮主, 自己有队伍, 对方有队伍
        
if(arg0 == "guild_other_team_member") then
                
this:Show();
                objCared 
= tonumber(arg1);
                
this:CareObject(objCared, 1"ContexMenu");
            
                Guild_ContexMenu_Model_Open_Other:Show();
                Guild_ContexMenu_Model_Open_Other:SetPopMenuPos(arg2, arg3);
                
return;
        end
        
-- 自己是帮主或副帮主, 其他玩家没有队伍
        
if(arg0 == "guild_other_not_team_member") then
                
this:Show();
                objCared 
= tonumber(arg1);
                
this:CareObject(objCared, 1"ContexMenu");
            
                Guild_ContexMenu_Model_Open_Other_Not_teammer:Show();
                Guild_ContexMenu_Model_Open_Other_Not_teammer:SetPopMenuPos(arg2, arg3);
                
return;
        end
        
-- 自己是帮主或副帮主, 自己没队伍, 其他玩家有队伍
        
if(arg0 == "guild_other_team_member_me_not_teamer") then
                
this:Show();
                objCared 
= tonumber(arg1);
                
this:CareObject(objCared, 1"ContexMenu");
            
                Guild_ContexMenu_Model_Open_Other_teammer_me_not_teammer:Show();
                Guild_ContexMenu_Model_Open_Other_teammer_me_not_teammer:SetPopMenuPos(arg2, arg3);
                
return;
        end
        
-- 自己是帮主或副帮主, 点击其他玩家
        
if(arg0 == "guild_other_player") then
                
this:Show();
                objCared 
= tonumber(arg1);
                
this:CareObject(objCared, 1"ContexMenu");
            
                ContexMenu_GuildMenu:Show();
                ContexMenu_GuildMenu:SetPopMenuPos(arg2, arg3);
                
return;
        end

        
        
--------------------------------------------------------------------------------------------------------------------------
        
--
        
-- 点击其他队友模型, 弹出的对话框
        
--
        
if(arg0 == "other_team_member") then
            
this:Show();
            
--关心NPC
            objCared 
= tonumber(arg1);
            
this:CareObject(objCared, 1"ContexMenu");

            ContexMenu_Model_Open_Other:Show();
            ContexMenu_Model_Open_Other:SetPopMenuPos(arg2, arg3);
            
return;
        end;
        
        
--------------------------------------------------------------------------------------------------------------------------
        
--
        
-- 点击非组队玩家弹出来的界面
        
--
        
if(arg0 == "other_not_team_member") then
            
this:Show();
            
--关心NPC
            objCared 
= tonumber(arg1);
            
this:CareObject(objCared, 1"ContexMenu");

            ContexMenu_Model_Open_Other_Not_teammer:Show();
            ContexMenu_Model_Open_Other_Not_teammer:SetPopMenuPos(arg2, arg3);
            
return;
        end;
        
        
--------------------------------------------------------------------------------------------------------------------------
        
--
        
-- 非组队玩家, 点击组队玩家, 弹出的菜单
        
--
        
if(arg0 == "other_team_member_me_not_teamer") then
            
this:Show();
            
--关心NPC
            objCared 
= tonumber(arg1);
            
this:CareObject(objCared, 1"ContexMenu");

            ContexMenu_Model_Open_Other_teammer_me_not_teammer:Show();
            ContexMenu_Model_Open_Other_teammer_me_not_teammer:SetPopMenuPos(arg2, arg3);
            
return;
        end;
        
        
--------------------------------------------------------------------------------------------------------------------------
        
--
        
-- 点击聊天里的人物名, 弹出的菜单
        
--        
        
if(arg0 == "chat_private") then
            
this:Show();
            
--关心NPC
            objCared 
= tonumber(arg1);
            
this:CareObject(objCared, 1"ContexMenu");

            ContexMenu_ChatBoard:Show();
            ContexMenu_ChatBoard:SetPopMenuPos(arg2,arg3);
            
            ChatBoardName 
= arg4;
            ChatBoardData 
= arg5;
            
return;
        end;
        
--------------------------------------------------------------------------------------------------------------------------
        
--
        
-- 右键点击好友或黑名单列表或仇人名单
        
--
        
if( arg0 == "friendmenu" ) then
            currentSelectChannal 
= arg2;
            currentIndex 
= arg3;
            
this:Show();
            
--关心NPC
            objCared 
= tonumber(arg1);
            
this:CareObject(objCared, 1"ContexMenu");

            
if( tonumber( arg2 ) == 6 ) then
                AxTrace( 
0,0"show black list menu" );
                ContexMenu_BlackListMenu:Show();
                ContexMenu_BlackListMenu:SetPopMenuPos(arg4,arg5);
            elseif( tonumber( arg2 )
== 7 ) then
                AxTrace( 
0,0"show enemy list menu" );
                ContexMenu_EnemyListMenu:Show();
                ContexMenu_EnemyListMenu:SetPopMenuPos(arg4,arg5);
            elseif( tonumber( arg2 )
== 9 ) then
                AxTrace( 
0,0"show temp list menu" );
                ContexMenu_TempFriendMenu:Show();
                ContexMenu_TempFriendMenu:SetPopMenuPos(arg4,arg5);
            
else
                AxTrace( 
0,0"show friend list menu" );
                ContexMenu_FriendMenu:Show();
                ContexMenu_FriendMenu:SetPopMenuPos(arg4,arg5);
            end
            
return;
        end

--------------------------------------------------------------------------------------------------------------------------
        
--
        
-- 右键点击临时好友列表
        
--
        
if( arg0 == "groupingmenu" ) then
            AxTrace( 
0,0"show groping menu" );
            currentSelectChannal 
= arg2;
            currentIndex 
= arg3;
            
this:Show();
            
--关心NPC
            objCared 
= tonumber(arg1);
            
this:CareObject(objCared, 1"ContexMenu");

            ContexMenu_GroupingMenu:Show();
            ContexMenu_GroupingMenu:SetPopMenuPos(arg4,arg5);
            
return;
        end
--------------------------------------------------------------------------------------------------------------------------
        
--
        
-- 地图上自己宠物的菜单
        
--
        
if( arg0 == "my_pet" ) then
            
this:Show();
            
--关心NPC
            objCared 
= tonumber(arg1);
            
this:CareObject(objCared, 1"ContexMenu");

            ContexMenu_MyPetMenu:Show();
            ContexMenu_MyPetMenu:SetPopMenuPos(arg2,arg3);
            
return;
        end

--------------------------------------------------------------------------------------------------------------------------
        
--
        
-- 地图上其他宠物的菜单
        
--
        
if( arg0 == "other_pet" ) then
            
this:Show();
            
--关心NPC
            objCared 
= tonumber(arg1);
            
this:CareObject(objCared, 1"ContexMenu");

            ContexMenu_OtherPetMenu:Show();
            ContexMenu_OtherPetMenu:SetPopMenuPos(arg2,arg3);
            
return;
        end        


    
--------------------------------------------------------------------------------------------------------------------------
        
--
        
-- 点击帮会申请管理列表
        
--
        
if( arg0 == "GuildJoinMenu" ) then
            TraineesObj 
= tonumber(arg2);
            
this:Show();
            
            ContexMenu_GuildJoinMenu:Show();
            ContexMenu_GuildJoinMenu:SetPopMenuPos( arg3, arg4 );
        end
        
    
--------------------------------------------------------------------------------------------------------------------------
        
--
        
-- 帮会转移操作
        
--
        
if( arg0 == "GuildTransferMenu" ) then
            iMemberId 
= tonumber(arg2);
            
this:Show();
            ContexMenu_TransferMemberMenu:Show();
            ContexMenu_TransferMemberMenu:SetPopMenuPos( arg3, arg4 );

--[[            
            
-- 动态添加菜单
            local str;
            local i 
= 0;
--            local iBaseCount = 6;

            
while i < tonumber(arg5) do
                str 
= arg6;
                ContexMenu_TransferMemberMenu:CreateChildWindow( 
"WoWLook/MenuItem", str );
                ContexMenu_TransferMemberMenu:SetProperty( 
"Text""x:0.250293 y:0.050442", str );
                ContexMenu_TransferMemberMenu:SetProperty( 
"Size""w:0.106319 h:1", str );
                    
                PopupMenu:
            end
]]
--

        end

 

三 cegui预先创建各种菜单

 

        <Window Type="WoWLook/PopupMenu" Name="ContexMenu_OtherPlayer">
            
<Property Name="Position" Value="x:0.25 y:0.1" />
            
<Property Name="Size" Value="w:0.4 h:0.3" />
            
<Property Name="AutoResizeEnabled" Value="True" />

            
<Window Type="WoWLook/MenuItem" Name="OtherPlayer_Siliao">
                
<Property Name="TextOriginal" Value="#{SILIAO}" />
                
<Event Name="Clicked" Function="ContexMenu_OtherPlayer_Clicked(&quot;siliao&quot;);" />
            
</Window>
            
<Window Type="WoWLook/MenuItem" Name="OtherPlayer_Follow">
                
<Property Name="Text" Value="跟随      "/>
                
<Event Name="Clicked" Function="ContexMenu_OtherPlayer_Follow_Clicked();" />
            
</Window>
            
<Window Type="WoWLook/MenuItem" Name="OtherPlayer_ZuDui">
                
<Property Name="TextOriginal" Value="#{ZUDUI}" />
                
<Event Name="Clicked" Function="ContexMenu_OtherPlayer_Clicked(&quot;zudui&quot;);" />
            
</Window>
            
<Window Type="WoWLook/MenuItem" Name="OtherPlayer_TiaoZhan">
                
<Property Name="TextOriginal" Value="#{TIAOZHAN}" />
                
<Event Name="Clicked" Function="ContexMenu_OtherPlayer_Clicked(&quot;tiaozhan&quot;);" />
            
</Window>
            
<Window Type="WoWLook/MenuItem" Name="OtherPlayer_JiaoYi">
                
<Property Name="TextOriginal" Value="交易" />
                
<Event Name="Clicked" Function="ContexMenu_Exchange_Clicked();" />
            
</Window>
            
<Window Type="WoWLook/MenuItem" Name="Apply_Join_Team">
                
<Property Name="Text" Value="申请加入队伍    "/>
                
<Event Name="Clicked" Function="ContexMenu_OtherPlayer_Apply_Clicked();" />
            
</Window>
            
<Window Type="WoWLook/MenuItem" Name="OtherPlayer_Invite">
                
<Property Name="Text" Value="邀请加入队伍    "/>
                
<Event Name="Clicked" Function="ContexMenu_OtherPlayer_Clicked(&quot;zudui&quot;);" />
            
</Window>

        
</Window>


        
<Window Type="WoWLook/PopupMenu" Name="ContexMenu_NPC">
            
<Property Name="Position" Value="x:0.27 y:0.25" />
            
<Property Name="Size" Value="w:0.4 h:0.5" />
            
<Property Name="AutoResizeEnabled" Value="True" />

            
<Window Type="WoWLook/MenuItem" Name="NPC_Siliao">
                
<Property Name="TextOriginal" Value="#{SILIAO}" />
            
</Window>
            
<Window Type="WoWLook/MenuItem" Name="NPC_ZuDui">
                
<Property Name="TextOriginal" Value="#{ZUDUI}" />
            
</Window>
            
<Window Type="WoWLook/MenuItem" Name="NPC_TiaoZhan">
                
<Property Name="TextOriginal" Value="#{TIAOZHAN}" />
            
</Window>
        
</Window>

        
<!--
          普通队员弹出的菜单
        
-->

        
<Window Type="WoWLook/PopupMenu" Name="ContexMenu_TeamMember">
            
<Property Name="Position" Value="x:0.25 y:0.25" />
            
<Property Name="Size" Value="w:0.4 h:0.5" />
            
<Property Name="AutoResizeEnabled" Value="True" />
<!--
            
<Window Type="WoWLook/MenuItem" Name="Member_Leave">
                
<Property Name="Text" Value="离开队伍    "/>
                
<Event Name="Clicked" Function="ContexMenu_LeaveTeam_Clicked();" />
            
</Window>
-->            
            
<Window Type="WoWLook/MenuItem" Name="Member_MakeFriend">
                
<Property Name="Text" Value="加为好友    "/>
                
<Event Name="Clicked" Function="ContexMenu_AddFriend();" />            
            
</Window>
                
<Window Type="WoWLook/MenuItem" Name="Member_JiaoYi">
                
<Property Name="Text" Value="交易    "/>
                
<Event Name="Clicked" Function="ContexMenu_Exchange_Clicked();" />            
            
</Window>

        
</Window>


        
<!--
          普通队员跟随状态弹出的菜单
        
-->

        
<Window Type="WoWLook/PopupMenu" Name="ContexMenu_TeamFollowMember">
            
<Property Name="Position" Value="x:0.25 y:0.25" />
            
<Property Name="Size" Value="w:0.4 h:0.5" />
            
<Property Name="AutoResizeEnabled" Value="True" />
<!--
            
<Window Type="WoWLook/MenuItem">
                
<Property Name="Text" Value="离开队伍    "/>
                
<Event Name="Clicked" Function="ContexMenu_LeaveTeam_Clicked();" />
            
</Window>
-->            
            
<Window Type="WoWLook/MenuItem">
                
<Property Name="Text" Value="加为好友    "/>
                
<Event Name="Clicked" Function="ContexMenu_AddFriendTeamate();" />            
            
</Window>
            
<Window Type="WoWLook/MenuItem" Name="Member_StopFollow">
                
<Property Name="Text" Value="停止跟随    "/>
                
<Event Name="Clicked" Function="ContexMenu_StopFollow_Clicked();" />
            
</Window>

        
</Window>

            
<!--
          队长弹出的菜单
            
-->


        
<Window Type="WoWLook/PopupMenu" Name="ContexMenu_TeamLeader">
            
<Property Name="Position" Value="x:0.25 y:0.25" />
            
<Property Name="Size" Value="w:0.4 h:0.3" />
            
<Property Name="AutoResizeEnabled" Value="True" />
            
<Window Type="WoWLook/MenuItem" Name="Leader_MakeFriend">
                
<Property Name="Text" Value="加为好友        "/>
                
<Event Name="Clicked" Function="ContexMenu_AddFriendTeamate();" />            
            
</Window>
            
<Window Type="WoWLook/MenuItem" Name="Leader_JiaoYi">
                
<Property Name="Text" Value="交易    "/>
                
<Event Name="Clicked" Function="ContexMenu_Exchange_Clicked();" />            
            
</Window>
            
<Window Type="WoWLook/MenuItem" Name="Leader_RiseToLeader">
                
<Property Name="Text" Value="提升为队长     "/>
                
<Event Name="Clicked" Function="ContexMenu_AppointLeader_Clicked();" />
            
</Window>
            
<Window Type="WoWLook/MenuItem" Name="Leader_DelMember">
                
<Property Name="Text" Value="踢人            "/>
                
<Event Name="Clicked" Function="ContexMenu_KickTeamMember_Clicked();" />
            
</Window>
            
<Window Type="WoWLook/MenuItem" Name="Leader_Dismiss">
                
<Property Name="Text" Value="解散队伍        "/>
                
<Event Name="Clicked" Function="ContexMenu_DismissTeam_Clicked();" />
            
</Window>
        
</Window>

 

转载于:https://www.cnblogs.com/lancidie/archive/2011/08/09/2131795.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值