コード例 #1
0
 public static long TaskDialogIndirect(ref TaskDialogConfig taskConfig, out int button, out int radioButton,
                                       [MarshalAs(UnmanagedType.Bool)] out bool verificationFlagChecked)
 {
     if (taskDialogAction == null)
     {
         LoadTaskDialog();
     }
     return(taskDialogIndirectAction(ref taskConfig, out button, out radioButton, out verificationFlagChecked));
 }
コード例 #2
0
 private static long TaskDialogIndirect(ICore core, ref TaskDialogConfig taskConfig, out int button, out int radioButton,
                                        [MarshalAs(UnmanagedType.Bool)] out bool verificationFlagChecked)
 {
     if (_taskDialogIndirectAction == null)
     {
         LoadTaskDialog(core);
     }
     if (_taskDialogIndirectAction == null)
     {
         throw new Exception("Failed to load TaskDialogIndirect");
     }
     return(_taskDialogIndirectAction(ref taskConfig, out button, out radioButton, out verificationFlagChecked));
 }
コード例 #3
0
    public override void InitializeGUI()
    {
        if (base._mIsLoaded)
        {
            return;
        }
        base._mIsLoaded = true;


        this.GUILevel = 5;


        TaskDialogConfig taskTalksIDConfig = Globals.Instance.MDataTableManager.GetConfig <TaskDialogConfig>();

        taskTalksIDConfig.GeTTaskDialogDic(out taskTalksIDDic);

        Globals.Instance.MSceneManager.ChangeCameraActiveState(SceneManager.CameraActiveState.TASKCAMERA);

        PlayerData playerData = Globals.Instance.MGameDataManager.MActorData;

        mCharacterCustomizeOne.generageCharacterFormPlayerData(playerData);
//		NGUITools.SetActive(mCharacterCustomizeOne.gameObject,false);
        SetActive(mCharacterCustomizeOne, false);

        if (!GameDefines.Setting_ScreenQuality)
        {
            GameObject mainLight = GameObject.Find("Directional light Main");
            GameObject backLight = GameObject.Find("Directional light Back");
            if (mainLight != null)
            {
                //mainLight.SetActive(false);

                Light mL = mainLight.GetComponent <Light>();
                mL.shadows = LightShadows.None;
            }

            if (backLight != null)
            {
                //backLight.SetActive(false);
            }
        }
    }
コード例 #4
0
        void TaskDialog_ButtonClicked(ITaskDialog sender, ButtonClickedArgs args)
        {
            Console.WriteLine("Button clicked: {0}", args.Id);
            switch (args.Id)
            {
            case 2000: {
                args.PreventClosing = true;
                TaskDialogConfig config = new TaskDialogConfig();
                config.CommonButtons   = CommonButtons.Ok;
                config.WindowTitle     = "Another page";
                config.MainInstruction = "You just navigated to another page.";
                sender.NavigatePage(config);
            }
            break;

            case 2001:
                args.PreventClosing = true;
                ResetCallbackTimer  = true;
                break;
            }
        }
コード例 #5
0
 public static extern IntPtr TaskDialogIndirect(ref TaskDialogConfig pTaskConfig,
     out int pnButton, out int pnRadioButton, out bool pfVerificationFlagChecked);
コード例 #6
0
 public static extern IntPtr TaskDialogIndirect(ref TaskDialogConfig pTaskConfig,
                                                out int pnButton, out int pnRadioButton, out bool pfVerificationFlagChecked);
コード例 #7
0
 private static void DisposeConfig(ref TaskDialogConfig config)
 {
     if (config.pButtons != IntPtr.Zero)
     {
         FreeButtons(config.pButtons, config.cButtons);
         config.pButtons = IntPtr.Zero;
         config.cButtons = 0;
     }
     if (config.pRadioButtons != IntPtr.Zero)
     {
         FreeButtons(config.pRadioButtons, config.cRadioButtons);
         config.pRadioButtons = IntPtr.Zero;
         config.cRadioButtons = 0;
     }
 }
コード例 #8
0
        private void CreateConfig(out TaskDialogConfig config)
        {
            config = new TaskDialogConfig()
            {
                cbSize = Marshal.SizeOf<TaskDialogConfig>(),
                hwndParent = currentOwnerHwnd.Value,
                pszWindowTitle = Title,
                pszMainInstruction = MainInstruction,
                pszContent = Content,
                pszFooter = Footer,
                dwCommonButtons = CommonButtons,
                hMainIcon = (IntPtr)MainIcon,
                dwFlags = Flags,
                hFooterIcon = (IntPtr)FooterIcon,
                pszVerificationText = VerificationText,
                pszExpandedInformation = ExpandedInformation,
                pszExpandedControlText = ExpandedControlText,
                pszCollapsedControlText = CollapsedControlText,
                nDefaultButton = (DefaultCustomButton as CustomButton)?.ButtonID ?? (int)DefaultCommonButton,
                nDefaultRadioButton = (DefaultRadioButton as RadioButton)?.ButtonID ?? 0,
                pfCallback = ptrCallbackProcDelegate
            };

            if (currentCustomButtons?.Count > 0)
            {
                TaskDialogButtonStruct[] structs = currentCustomButtons.Values.Select(e =>
                    new TaskDialogButtonStruct(e.ButtonID.Value, e.Text)).ToArray();
                config.pButtons = AllocateAndMarshalButtons(structs);
                config.cButtons = structs.Length;
            }
            if (currentRadioButtons?.Count > 0)
            {
                TaskDialogButtonStruct[] structs = currentRadioButtons.Values.Select(e =>
                    new TaskDialogButtonStruct(e.ButtonID.Value, e.Text)).ToArray();
                config.pRadioButtons = AllocateAndMarshalButtons(structs);
                config.cRadioButtons = structs.Length;
            }
        }
コード例 #9
0
 public static IntPtr TaskDialogIndirect(ref TaskDialogConfig pTaskConfig,
                                         out int pnButton, out int pnRadioButton, out bool pfVerificationFlagChecked)
 {
     return(MTaskDialogIndirect(ref pTaskConfig, out pnButton, out pnRadioButton, out pfVerificationFlagChecked));
 }
コード例 #10
0
 public static extern long SendMessage(IntPtr hWnd, TaskDialogMessages Msg, IntPtr wParam, ref TaskDialogConfig lParam);