Exemplo n.º 1
0
        private void BtnTextPressLeft(G_Button btn)
        {
            if (btn_Arrow.pressed)
            {
                CloseList();
            }
            else
            {
                int index;
                if (enumValue == null)
                {
                    index = 0;
                }
                else
                {
                    index = (int)Convert.ChangeType(enumValue, typeof(int));
                    index++;
                    if (index >= Enum.GetValues(enumType).Length)
                    {
                        index = 0;
                    }
                }
                enumValue = (Enum)Enum.GetValues(enumType).GetValue(index);

                if (ValueChanged != null)
                {
                    ValueChanged(enumValue);
                }
            }
        }
Exemplo n.º 2
0
        private void BtnPressLeft(G_Button obj)
        {
            if (btn.pressed)
            {
                //action

                SetCatchUpdate(Update);
                rectOld = (M_Rectangle)rect.Clone();
            }
        }
Exemplo n.º 3
0
        public void PressLeft(G_Button btn)
        {
            //if (btn.pressed)
            //    Brush.SelectObjs(true);
            //else
            //{
            //    this.btn.text = Brush.selectedObjs.Count.ToString();

            //    if (ValueChanged != null)
            //        ValueChanged(Brush.selectedObjs);
            //    Brush.SelectObjs(false);
            //}
        }
Exemplo n.º 4
0
        private void BtnListPress(G_Button btn)
        {
            int index = btn_Enums.IndexOf(btn);

            enumValue = (Enum)Enum.GetValues(enumType).GetValue(index);

            if (ValueChanged != null)
            {
                ValueChanged(enumValue);
            }

            CloseList();
        }
Exemplo n.º 5
0
        private void BtnArrowPressLeft(G_Button btn)
        {
            if (btn.pressed)
            {
                SetCatchUpdate(Update);
            }
            else
            {
                CloseList();
            }

            //Game1.mouseCatched = MouseCatched.ObjEditor;
            //Game1.mbCatched = MBCatched.Static;
        }
Exemplo n.º 6
0
 private void BtnPressRight(G_Button btn)
 {
     if (!color.HasValue)
     {
         color = Color.Red;
     }
     else
     {
         color = Calculate.GetPrevColor(color.Value);
     }
     if (ValueChanged != null)
     {
         ValueChanged(color.Value);
     }
 }
Exemplo n.º 7
0
        private void BtnPressRight(G_Button btn)
        {
            if (value == null)
            {
                value = 0;
            }
            else
            {
                value -= increment;
            }
            MinMax();

            if (ValueChanged != null)
            {
                ValueChanged(value);
            }
        }
Exemplo n.º 8
0
        public G_Button CloneChild(GuiElement parent)
        {
            G_Button clone = (G_Button)base.Clone(parent);

            //clone.PressLeft = null;
            //clone.PressRight = null;
            //clone.PressMiddle = null;
            if (PressLeft != null)
            {
                clone.PressLeft = (Action <G_Button>)PressLeft.Clone();
            }
            if (PressRight != null)
            {
                clone.PressRight = (Action <G_Button>)PressRight.Clone();
            }
            if (PressMiddle != null)
            {
                clone.PressMiddle = (Action <G_Button>)PressMiddle.Clone();
            }
            return(clone);
        }