diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/GraphicObjects/IGOLibHost.cs | 1 | ||||
| -rw-r--r-- | src/GraphicObjects/Window.cs | 6 | ||||
| -rwxr-xr-x | src/OpenTKGameWindow.cs | 8 |
3 files changed, 12 insertions, 3 deletions
diff --git a/src/GraphicObjects/IGOLibHost.cs b/src/GraphicObjects/IGOLibHost.cs index 7a422877..a76500c7 100644 --- a/src/GraphicObjects/IGOLibHost.cs +++ b/src/GraphicObjects/IGOLibHost.cs @@ -12,6 +12,7 @@ namespace go GraphicObject FocusedWidget { get; set; } void AddWidget (GraphicObject g); void DeleteWidget(GraphicObject g); + void Quit (); } } diff --git a/src/GraphicObjects/Window.cs b/src/GraphicObjects/Window.cs index 61d6fd1f..aae75a54 100644 --- a/src/GraphicObjects/Window.cs +++ b/src/GraphicObjects/Window.cs @@ -47,12 +47,16 @@ namespace go protected override void loadTemplate(GraphicObject template = null) { base.loadTemplate (template); - _contentContainer = this.child.FindByName ("Content") as Container; _title = this.child.FindByName ("Title") as Label; _icon = this.child.FindByName ("Icon") as Image; } + void butQuitPress (object sender, MouseButtonEventArgs e) + { + TopContainer.Quit (); + } + } } diff --git a/src/OpenTKGameWindow.cs b/src/OpenTKGameWindow.cs index 7299e858..38d230f7 100755 --- a/src/OpenTKGameWindow.cs +++ b/src/OpenTKGameWindow.cs @@ -87,6 +87,11 @@ namespace go GraphicObjects.Remove (g);
}
+ public void Quit ()
+ {
+ this.Exit ();
+ }
+
#region Events
//those events are raised only if mouse isn't in a graphic object
public event EventHandler<MouseWheelEventArgs> MouseWheelChanged;
@@ -97,7 +102,6 @@ namespace go #endregion
#region focus
-
GraphicObject _activeWidget; //button is pressed on widget
GraphicObject _hoverWidget; //mouse is over
GraphicObject _focusedWidget; //has keyboard (or other perif) focus
@@ -246,7 +250,7 @@ namespace go lock (redrawClip) {
if (redrawClip.count > 0) {
// #if DEBUG_CLIP_RECTANGLE
- redrawClip.stroke (ctx, new Color(1.0,0,0,0.3));
+// redrawClip.stroke (ctx, new Color(1.0,0,0,0.3));
// #endif
redrawClip.clearAndClip (ctx);//rajouté après, tester si utile
|