Ejemplo n.º 1
0
        protected override void RegisterTouchEvent()
        {
            m_BtnLabel.onClick.AddListener(() =>
            {
                mMenuGroup.SetActive(true);
            });

            m_BtnSelect.onClick.AddListener(() =>
            {
                mMenuGroup.SetActive(false);
                DialogFactory.CreateFieldDialog <FieldDropdownDialog>(mField);
            });

            m_BtnRename.onClick.AddListener(() =>
            {
                mMenuGroup.SetActive(false);
                //pop a rename panel
                VariableNameDialog dialog = DialogFactory.CreateDialog("variable_name") as VariableNameDialog;
                dialog.Rename(m_Label.text);
            });

            m_BtnDelete.onClick.AddListener(() =>
            {
                mMenuGroup.SetActive(false);
                mField.SourceBlock.Workspace.DeleteVariable(m_Label.text);
            });
        }
Ejemplo n.º 2
0
 protected override void RegisterTouchEvent()
 {
     m_Button.onClick.AddListener(() =>
     {
         //open corresponding settings dialog
         DialogFactory.CreateFieldDialog(mField);
     });
 }