aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/dockableWindows/dockableWindows.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-03-17 02:20:56 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-03-17 02:20:56 +0100
commitcc19139a50fcea74c6a9e0f330e84039b335ab73 (patch)
tree1432ad0a0d2b492a413c674e5f8d9aa063c65d8f /Samples/dockableWindows/dockableWindows.cs
parent41c27de43fee49b33ad1194c3f99ef929e66e800 (diff)
improve dragNdrop, debug docking
Diffstat (limited to 'Samples/dockableWindows/dockableWindows.cs')
-rw-r--r--Samples/dockableWindows/dockableWindows.cs27
1 files changed, 25 insertions, 2 deletions
diff --git a/Samples/dockableWindows/dockableWindows.cs b/Samples/dockableWindows/dockableWindows.cs
index 4b5a0e11..27a9612a 100644
--- a/Samples/dockableWindows/dockableWindows.cs
+++ b/Samples/dockableWindows/dockableWindows.cs
@@ -1,4 +1,5 @@
using Crow;
+using Glfw;
namespace tests
{
@@ -11,6 +12,17 @@ namespace tests
}
}
+ Color[] colors =
+ {
+ Colors.Blue,
+ Colors.Red,
+ Colors.Green,
+ Colors.Yellow,
+ Colors.Grey,
+ Colors.Onyx,
+ Colors.Cyan,
+ Colors.Chartreuse,
+ };
protected override void OnInitialized () {
Load ("#ui.test.crow").DataSource = this;
AddWidget (new DockWindow (this) { Background = Colors.Blue, Left = 10, Top = 110, Resizable = true });
@@ -23,6 +35,17 @@ namespace tests
NotifyValueChanged ("GraphicTree", (object)null);
NotifyValueChanged ("GraphicTree", GraphicTree);
}
-
- }
+ int colorIdx = 0;
+ public override bool OnKeyDown (Key key) {
+ if (colorIdx >= colors.Length)
+ colorIdx = 0;
+ switch (key) {
+ case Key.F6:
+ AddWidget (new DockWindow (this) { Background = colors[colorIdx++], Left = 90, Top = 190, Resizable = true });
+ return true;
+ default:
+ return base.OnKeyDown (key);
+ }
+ }
+ }
}