コード例 #1
0
        public void CreateButtonWindow()
        {
            BasicWindow bw = new BasicWindow("Selector");

            Action[] actions = new Action[3];
            actions[0] = () =>
            {
                for (int i = 0; i < selectedIndicesList.Count; i++)
                {
                    string msg = "";
                    for (int j = 0; j < selectedIndicesList[i].Length; j++)
                    {
                        msg += selectedIndicesList[i][j];
                        if (j != 0)
                        {
                            msg += ",";
                        }
                    }
                    Debug.Log("Selected " + i + ":" + msg);
                }
            };
            actions[1] = () =>
            {
                SetFromSelection();
            };
            actions[2] = () =>
            {
                RestoreSelectionOnList(null, true);
            };

            Action[] actions2 = new Action[2]
            {
                () =>
                {
                    //Delete For One Group
                    BasicFunc.DoDelete(RestoreSelectionOnList(), true);
                },
                () =>
                {
                    //Delete For Multi Group
                    DoForMultiSelection((list) => { BasicFunc.DoDelete(list); });
                }
            };

            bw.AddButtons(actions, new string[3] {
                "Print", "Refresh Select", "Restore Selection"
            });
            bw.AddButtons(actions2, new string[2] {
                "Delete Topo", "Delete Topo For Multi"
            });

            bw.Show();
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="args">order: windowName, lineIndex , buttonIndex</param>
        public override void doIt(MArgList args)
        {
            //Debug.Log("at least do it....");
            if (args.length != 3)
            {
                //Debug.Log("param count error:" + args.length);
                return;
            }
            string wName       = args.asString(0);
            int    lineIndex   = args.asInt(1);
            int    buttonIndex = args.asInt(2);

            //Debug.Log("name:" + wName + ",line:" + lineIndex + ",btn:" + buttonIndex);

            BasicWindow.ExcuteInDic(wName, lineIndex, buttonIndex);
        }
コード例 #3
0
        private static void BeautifulPoleWindow()
        {
            BasicWindow bw = new BasicWindow("Beautiful Pole");

            Action[] acts = new Action[8];
        }