Esempio n. 1
0
    /// <summary>
    /// 处理删除角色热键回调
    /// </summary>
    /// <param name="callbackContext"></param>
    private void OnDeleteHotkeyCallback(HotkeyCallback callbackContext)
    {
        if (callbackContext.performed)
        {
            WwiseUtil.PlaySound((int)WwiseMusic.Music_deleteRole_Over, false, null);
            OpenParameter openParameter = new OpenParameter();
            openParameter.Title   = TableUtil.GetLanguageString("common_text_id_1018");
            openParameter.Content = string.Format(TableUtil.GetLanguageString("common_text_id_1017"),
                                                  m_ServerListProxy.GetCurrentCharacterVO().Name, m_ServerListProxy.GetCurrentCharacterVO().Level);
            openParameter.backgroundColor = BackgroundColor.Error;

            HotKeyButton HotKeyQuit = new HotKeyButton();
            HotKeyQuit.actionName = HotKeyID.FuncX;
            HotKeyQuit.showText   = TableUtil.GetLanguageString("common_hotkey_id_1001");
            HotKeyQuit.onEvent    = OnSubmitDeleteCharacter;

            HotKeyButton HotKeyCancel = new HotKeyButton();
            HotKeyCancel.actionName = HotKeyID.FuncB;
            HotKeyCancel.showText   = TableUtil.GetLanguageString("common_hotkey_id_1002");
            HotKeyCancel.onEvent    = OnCancelDeleteCharacter;

            openParameter.HotkeyArray = new HotKeyButton[] { HotKeyQuit, HotKeyCancel };
            UIManager.Instance.OpenPanel(UIPanel.ConfirmPanel, openParameter);
            WwiseUtil.PlaySound((int)WwiseMusic.Music_Panel_PopupPanel_Open, false, null);
        }
    }
Esempio n. 2
0
 /// <summary>
 /// 设置hotKey
 /// </summary>
 /// <param name="hotkeyArray">热键组</param>
 private void SetHotKeys(HotKeyButton[] hotkeyArray)
 {
     if (hotkeyArray == null || hotkeyArray.Length == 0)
     {
         return;
     }
     for (int i = 0; i < hotkeyArray.Length; i++)
     {
         HotKeyButton hotBtn = hotkeyArray[i];
         AddHotKey(hotBtn.actionName, hotBtn.onEvent, m_HotKeyRoot, hotBtn.showText);
     }
     PanelHotkeyArray = hotkeyArray;
 }
Esempio n. 3
0
    /// <summary>
    /// 背包格子不足提示
    /// </summary>
    private void OpenPackageError()
    {
        OpenParameter openParameter = new OpenParameter();

        openParameter.Title           = TableUtil.GetLanguageString("common_hotkey_id_1001");
        openParameter.Content         = TableUtil.GetLanguageString("mailbox_text_id_1017");
        openParameter.backgroundColor = BackgroundColor.Normal;
        HotKeyButton HotKeyConfirm = new HotKeyButton();

        HotKeyConfirm.actionName  = HotKeyID.FuncA;
        HotKeyConfirm.showText    = TableUtil.GetLanguageString("common_hotkey_id_1001");
        HotKeyConfirm.onEvent     = ConfirmPanelClose;
        openParameter.HotkeyArray = new HotKeyButton[] { HotKeyConfirm };
        UIManager.Instance.OpenPanel(UIPanel.ConfirmPanel, openParameter);
    }
Esempio n. 4
0
    /// <summary>
    /// 确认退出
    /// </summary>
    private void OnConfirmExit()
    {
        OpenParameter openParameter = new OpenParameter();

        openParameter.Title           = TableUtil.GetLanguageString("common_text_id_1018");
        openParameter.Content         = TableUtil.GetLanguageString("common_text_id_1016");
        openParameter.backgroundColor = BackgroundColor.Normal;
        HotKeyButton HotKeyCancel = new HotKeyButton();

        HotKeyCancel.actionName = HotKeyID.FuncB;
        HotKeyCancel.showText   = TableUtil.GetLanguageString("common_hotkey_id_1002");
        HotKeyCancel.onEvent    = ConfirmPanelClose;
        HotKeyButton HotKeyQuit = new HotKeyButton();

        HotKeyQuit.actionName     = HotKeyID.FuncX;
        HotKeyQuit.showText       = TableUtil.GetLanguageString("common_hotkey_id_1001");
        HotKeyQuit.onEvent        = ConfirmExitGame;
        openParameter.HotkeyArray = new HotKeyButton[] { HotKeyQuit, HotKeyCancel };      //esc  退出游戏,取消
        UIManager.Instance.OpenPanel(UIPanel.ConfirmPanel, openParameter);
    }