예제 #1
0
 public override void SetMouseHover(bool value)
 {
     base.SetMouseHover(value);
     if (value)
     {
         _stand.SetVisible(true);
     }
     else
     {
         _stand.SetVisible(false);
     }
 }
예제 #2
0
        public override void InitElements()
        {
            base.InitElements();

            _image.IsFocusable = false;
            _image.KeepAspectRatio(true);
            _image.SetMargin(3, 3, 3, 3);

            AddItems(_image, _underline);

            EventMouseHover += (sender, args) =>
            {
                _underline.SetVisible(true);
            };
            EventMouseLeave += (sender, args) =>
            {
                _underline.SetVisible(false);
            };
        }
예제 #3
0
        public static SpaceVIL.Rectangle GetUnderline()
        {
            SpaceVIL.Rectangle line = new SpaceVIL.Rectangle();
            line.SetSizePolicy(SizePolicy.Expand, SizePolicy.Fixed);
            line.SetHeight(3);
            line.SetBackground(Palette.Underline);
            line.SetAlignment(ItemAlignment.Bottom, ItemAlignment.HCenter);
            line.SetVisible(false);

            return(line);
        }
예제 #4
0
 public override void InitElements()
 {
     base.InitElements();
     _stand = new SpaceVIL.Rectangle();
     _stand.SetBackground(Color.White);
     _stand.SetHeight(3);
     _stand.SetSizePolicy(SizePolicy.Expand, SizePolicy.Fixed);
     _stand.SetAlignment(ItemAlignment.Bottom | ItemAlignment.HCenter);
     _stand.SetVisible(false);
     AddItem(_stand);
 }