aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/Button.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GraphicObjects/Button.cs')
-rwxr-xr-xsrc/GraphicObjects/Button.cs23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/GraphicObjects/Button.cs b/src/GraphicObjects/Button.cs
index e4987fda..fcbdecd8 100755
--- a/src/GraphicObjects/Button.cs
+++ b/src/GraphicObjects/Button.cs
@@ -18,10 +18,10 @@ namespace go
#region CTOR
public Button() : base()
{
- MouseEnter += delegate { Background = Color.Lion;};
- MouseLeave += delegate { Background = Color.Gray;};
- MouseButtonDown += delegate { Background = Color.Red;};
- MouseButtonUp += delegate { Background = Color.Gray;};
+ //MouseEnter += delegate { Background = Color.RedDevil;};
+ //MouseLeave += delegate { Background = Color.Transparent;};
+ MouseButtonDown += delegate { BackImgSub = "pressed"; registerForGraphicUpdate();};
+ MouseButtonUp += delegate { BackImgSub = "normal";registerForGraphicUpdate();};
}
#endregion
@@ -36,7 +36,7 @@ namespace go
get { return base.Height; }
set { base.Height = value; }
}
- [XmlAttributeAttribute()][DefaultValue("Gray")]
+ [XmlAttributeAttribute()][DefaultValue("Transparent")]
public override Color Background {
get { return base.Background; }
set { base.Background = value; }
@@ -46,8 +46,17 @@ namespace go
{
get { return base.Focusable; }
set { base.Focusable = value; }
- }
-
+ }
+ [XmlAttributeAttribute()][DefaultValue("#go.Images.Icons.buttest4.svg")]
+ public override Picture BackgroundImage {
+ get {
+ return base.BackgroundImage;
+ }
+ set {
+ base.BackgroundImage = value;
+ BackImgSub = "normal";
+ }
+ }
#endregion
[XmlAttributeAttribute][DefaultValue("Button")]