diff options
Diffstat (limited to 'Native/EmuKeyboardDesigner')
-rw-r--r-- | Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo | bin | 50176 -> 50176 bytes | |||
-rw-r--r-- | Native/EmuKeyboardDesigner/Program.cs | 40 |
2 files changed, 40 insertions, 0 deletions
diff --git a/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo b/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo Binary files differindex 6a93ec2..3805178 100644 --- a/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo +++ b/Native/EmuKeyboardDesigner/EmuKeyboardDesigner.suo 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);
+ }
+ }
}
}
|