summaryrefslogtreecommitdiff
path: root/Native/EmuKeyboardDesigner
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2012-05-07 15:27:00 +0000
committerIan C <ianc@noddybox.co.uk>2012-05-07 15:27:00 +0000
commit8c98cdabb836dcc48c6b379203399c5b29e38383 (patch)
tree536314b758d255cf7bd8e8867d16d4177a08e2f6 /Native/EmuKeyboardDesigner
parent02bec4f3037c470b6840b6f7418d64aab9bdf4b0 (diff)
Dodgy wedge to allow me to do programmatic changes in the editor.
Diffstat (limited to 'Native/EmuKeyboardDesigner')
-rw-r--r--Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suobin50176 -> 50176 bytes
-rw-r--r--Native/EmuKeyboardDesigner/Program.cs40
2 files changed, 40 insertions, 0 deletions
diff --git a/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo b/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo
index 6a93ec2..3805178 100644
--- a/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo
+++ b/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo
Binary files differ
diff --git a/Native/EmuKeyboardDesigner/Program.cs b/Native/EmuKeyboardDesigner/Program.cs
index 4cb9cc9..84e048d 100644
--- a/Native/EmuKeyboardDesigner/Program.cs
+++ b/Native/EmuKeyboardDesigner/Program.cs
@@ -19,6 +19,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
+using System.IO;
+using Noddybox.Emulation.Keyboard.Schema;
namespace EmuKeyboardDesigner
{
@@ -30,9 +32,47 @@ namespace EmuKeyboardDesigner
[STAThread]
static void Main()
{
+ //Wedge();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
+
+ private static void Wedge()
+ {
+ KeyboardDefinition def;
+
+ using (BinaryReader r = new BinaryReader(File.OpenRead(@"E:\Src\WindowsMobile\wpspec\wpspec\wpspec\Resources\Spectrum.keyboard")))
+ {
+ def = KeyboardDefinition.Load(r);
+ }
+
+ int x = 0;
+ int y = 0;
+
+ foreach (KeyboardKey k in def.Definitions)
+ {
+ if (k.KeySymbol == "KeyShiftLock")
+ {
+ k.KeySymbol = "KeyCapsShift";
+ }
+
+ k.Width = 48;
+ k.Height = 48;
+ k.X = x * k.Width;
+ k.Y = y * k.Height;
+
+ if (++x == 10)
+ {
+ y++;
+ x = 0;
+ }
+ }
+
+ using (BinaryWriter w = new BinaryWriter(File.OpenWrite(@"E:\Src\WindowsMobile\wpspec\wpspec\wpspec\Resources\Spectrum.keyboard")))
+ {
+ def.Save(w);
+ }
+ }
}
}