diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-21 08:30:08 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-21 08:30:09 +0200 |
| commit | f662d49464e2b8326522aad67761ffdcb8a5e5f6 (patch) | |
| tree | f767f75977721299da029518ec938bfa0366597b /src/GraphicObjects/GraphicObject.cs | |
| parent | db3a636d9c4de1e4ee1d4e79e6dfeae738daac8d (diff) | |
* BmpPicture.cs:
allow unscalled picture
* GraphicObject.cs:
background image path, problems with repaint of background
* Group.cs:
background image
* HorizontalStack.cs:
clean code
* Label.cs:
debug
* TemplatedContainer.cs:
fix dataSource==null to clear binding successfully
* Window.cs:
resizable or not
* OpenTKGameWindow.cs:
RenderCustomTextureOnUIQuad (usefull for cached content)
* Picture.cs:
Scale boolean
* ListBox.cs:
remove debug loading time
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index a78273ec..807ad95b 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -62,6 +62,7 @@ namespace go Size _minimumSize;
Picture _backgroundImage;
+ string _backgroundImagePath;
string _template;
#endregion
@@ -289,6 +290,24 @@ namespace go false :
true; } }
[XmlAttributeAttribute()][DefaultValue(null)]
+ public virtual string BackgroundImagePath {
+ get { return _backgroundImagePath; }
+ set {
+ _backgroundImagePath = value;
+ if (string.IsNullOrEmpty(_backgroundImagePath))
+ return;
+
+ if (_backgroundImagePath.EndsWith (".svg", true, System.Globalization.CultureInfo.InvariantCulture))
+ _backgroundImage = new SvgPicture ();
+ else
+ _backgroundImage = new BmpPicture ();
+
+ _backgroundImage.LoadImage (_backgroundImagePath);
+ //_backgroundImage.Scale = false;
+ registerForGraphicUpdate ();
+ }
+ }
+ [XmlAttributeAttribute()]
public virtual Picture BackgroundImage {
get { return _backgroundImage; }
set {
@@ -692,8 +711,9 @@ namespace go }
internal virtual void checkHoverWidget(MouseMoveEventArgs e)
{
- if (TopContainer.hoverWidget != this) {
- TopContainer.hoverWidget = this;
+ IGOLibHost glh = TopContainer;
+ if (glh.hoverWidget != this) {
+ glh.hoverWidget = this;
onMouseEnter (this, e);
}
|