From: jpbruyere Date: Sat, 13 Jun 2015 13:48:05 +0000 (+0200) Subject: -window, icons X-Git-Tag: 0.2~78 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=746f5cfb60c9a798825e31c2e362cfc817e59d44;p=jp%2Fcrow.git -window, icons --- diff --git a/GOLib.csproj b/GOLib.csproj index 77bce975..ddf23415 100644 --- a/GOLib.csproj +++ b/GOLib.csproj @@ -173,5 +173,7 @@ + + diff --git a/Images/Icons/exit.svg b/Images/Icons/exit.svg new file mode 100644 index 00000000..3d688cc7 --- /dev/null +++ b/Images/Icons/exit.svg @@ -0,0 +1,72 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/Images/Icons/tetra.png b/Images/Icons/tetra.png new file mode 100644 index 00000000..b0c855aa Binary files /dev/null and b/Images/Icons/tetra.png differ diff --git a/README.md b/README.md index 096b579c..4dcf1202 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,16 @@ Graphic Object Library: custom widget library c# version. #####GOLib in action +![GOLib in action](/screenshot1.png?raw=true "golib") + ![GOLib in action](/screenshot2.png?raw=true "golib") ![GOLib in action](/magic3d.png?raw=true "Magic3d") RoadMap: - - TreeView, templated of course... - Menu, Popper, Combobox, PangoLayouting controls, Improved editor + - TreeView (templated) + Menu, Combobox, PangoLayouting controls, Improved editor - Monodevelop addin - improve inline delegates to handle all conversion and graphic tree parsing with directory navigation syntax - Make an easyly compilable example of complete application (3d mesh editor for example) diff --git a/Templates/Window.goml b/Templates/Window.goml index c7c48b80..5964d023 100755 --- a/Templates/Window.goml +++ b/Templates/Window.goml @@ -3,9 +3,11 @@ - - - diff --git a/Tests/GOLIBTest_Window.cs b/Tests/GOLIBTest_Window.cs index 542b3606..cb9daa49 100644 --- a/Tests/GOLIBTest_Window.cs +++ b/Tests/GOLIBTest_Window.cs @@ -76,6 +76,11 @@ namespace test { base.OnLoad (e); LoadInterface("Interfaces/testWindow.goml", out g); + LoadInterface("Interfaces/testWindow.goml", out g); + LoadInterface("Interfaces/testWindow.goml", out g); + LoadInterface("Interfaces/testWindow.goml", out g); + LoadInterface("Interfaces/testWindow.goml", out g); + LoadInterface("Interfaces/testWindow.goml", out g); } protected override void OnRenderFrame (FrameEventArgs e) diff --git a/Tests/Interfaces/testWindow.goml b/Tests/Interfaces/testWindow.goml index 524ff06c..68759d9e 100755 --- a/Tests/Interfaces/testWindow.goml +++ b/Tests/Interfaces/testWindow.goml @@ -1,11 +1,19 @@  - + diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 57e19ad4..9ca28ed0 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -8,7 +8,7 @@ Exe Tests Tests - test.GOLIBTest_4 + test.GOLIBTest_Window v4.5 ..\bin\$(configuration) obj\$(configuration) diff --git a/screenshot1.png b/screenshot1.png new file mode 100644 index 00000000..0fe4cabb Binary files /dev/null and b/screenshot1.png differ 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 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