aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/SampleBase.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-01-14 08:07:43 +0100
committerj-p <jp_bruyere@hotmail.com>2021-02-06 20:28:02 +0100
commit2ab44f600bd0ecab04d03ba08fdc17ea195babf2 (patch)
tree916e61f3a6776ea97f73d77ea8b601684c2ad5f2 /Samples/common/SampleBase.cs
parent0f08742ef206f006db97a8d2bc67b1c4cae34deb (diff)
label, cached line width in pixel in LineSpan struct, use stackalloc for a single utf8 conversion for size and print, perfs and samplebase
Diffstat (limited to 'Samples/common/SampleBase.cs')
-rw-r--r--Samples/common/SampleBase.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/Samples/common/SampleBase.cs b/Samples/common/SampleBase.cs
index 65345be7..bdc6608b 100644
--- a/Samples/common/SampleBase.cs
+++ b/Samples/common/SampleBase.cs
@@ -8,6 +8,7 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
using Crow;
+using Glfw;
namespace Crow
{
@@ -261,5 +262,25 @@ namespace Crow
base.OnInitialized ();
}
+ public override bool OnKeyDown (Key key) {
+
+ switch (key) {
+ case Key.F5:
+ Load ("Interfaces/Divers/testFileDialog.crow").DataSource = this;
+ return true;
+ case Key.F6:
+ Load ("Interfaces/Divers/0.crow").DataSource = this;
+ return true;
+ case Key.F7:
+ Load ("Interfaces/Divers/perfMeasures.crow").DataSource = this;
+ return true;
+ case Key.F2:
+ if (IsKeyDown (Key.LeftShift))
+ DbgLogger.Reset ();
+ DbgLogger.Save (this);
+ return true;
+ }
+ return base.OnKeyDown (key);
+ }
}
} \ No newline at end of file