Пример #1
0
        public static void OutOfFocus()
        {
            if (current != null)
                current.InFocus = false;

            current = null;
        }
Пример #2
0
        public static void SetFocusComponent(FocusComponent componenet)
        {
            if (current == componenet)
                return;

            if (current != null)
                current.InFocus = false;
            current = componenet;

            current.InFocus = true;
        }
Пример #3
0
        public ScreenEntity()
        {
            x = y = 0;
            clipWidth = clipHeight = 60;
            iComponent = new InteractionComponent();
            iComponent.Width = clipWidth;
            iComponent.Height = clipHeight;

            fComponent = new FocusComponent();
            fComponent.InFocus = false;

            iComponent.Dragable = true;
            iComponent.OnClick += IEntity_Click;
            iComponent.OnDrag += IEntity_Drag;
        }