keyboard keys for testing and more?
This commit is contained in:
parent
33cfcd5c91
commit
841cd6e2e6
1 changed files with 40 additions and 13 deletions
|
@ -19,15 +19,6 @@ public class Mono {
|
|||
Model model_room = Model.FromFile("room.glb");
|
||||
Mesh mesh_room = Mesh.Quad;
|
||||
|
||||
public class Character {
|
||||
public string character;
|
||||
public int[] dots;
|
||||
public Character(string character, int[] dots) {
|
||||
this.character = character;
|
||||
this.dots = dots;
|
||||
}
|
||||
}
|
||||
|
||||
// key:(char) value:(int[] dots)
|
||||
Dictionary<char, int[]> char_cell = new Dictionary<char, int[]> {
|
||||
{ ' ', new int[] {
|
||||
|
@ -247,9 +238,12 @@ public class Mono {
|
|||
// // Log.Info("thumb is out");
|
||||
// xi = 0;
|
||||
// }
|
||||
if (Input.Key(Key.Down).IsJustActive()) {
|
||||
monoNet.value = ' ';
|
||||
monoNet.send = true;
|
||||
for (int i = 0; i < keb_keys.Length-1; i++) {
|
||||
if (Input.Key(keb_keys[i].key).IsJustActive()) {
|
||||
txt += keb_keys[i].char_;
|
||||
monoNet.value = keb_keys[i].char_;
|
||||
monoNet.send = true;
|
||||
}
|
||||
}
|
||||
|
||||
Vec3 index_tip = keyboard_m4.Inverse * rig.hand_1.Get(FingerId.Index, JointId.Tip).position;
|
||||
|
@ -294,7 +288,6 @@ public class Mono {
|
|||
);
|
||||
|
||||
int index = y * 10 + x;
|
||||
// string text = characters[index].character;
|
||||
char keychar = KeyToChar(index);
|
||||
|
||||
Text.Add(
|
||||
|
@ -374,4 +367,38 @@ public class Mono {
|
|||
|
||||
mat.Run();
|
||||
}
|
||||
|
||||
KebKey[] keb_keys = new KebKey[] {
|
||||
new() { key = Key.Space, char_ = ' ' },
|
||||
new() { key = Key.A, char_ = 'a' },
|
||||
new() { key = Key.B, char_ = 'b' },
|
||||
new() { key = Key.C, char_ = 'c' },
|
||||
new() { key = Key.D, char_ = 'd' },
|
||||
new() { key = Key.E, char_ = 'e' },
|
||||
new() { key = Key.F, char_ = 'f' },
|
||||
new() { key = Key.G, char_ = 'g' },
|
||||
new() { key = Key.H, char_ = 'h' },
|
||||
new() { key = Key.I, char_ = 'i' },
|
||||
new() { key = Key.J, char_ = 'j' },
|
||||
new() { key = Key.K, char_ = 'k' },
|
||||
new() { key = Key.L, char_ = 'l' },
|
||||
new() { key = Key.M, char_ = 'm' },
|
||||
new() { key = Key.N, char_ = 'n' },
|
||||
new() { key = Key.O, char_ = 'o' },
|
||||
new() { key = Key.P, char_ = 'p' },
|
||||
new() { key = Key.Q, char_ = 'q' },
|
||||
new() { key = Key.R, char_ = 'r' },
|
||||
new() { key = Key.S, char_ = 's' },
|
||||
new() { key = Key.T, char_ = 't' },
|
||||
new() { key = Key.U, char_ = 'u' },
|
||||
new() { key = Key.V, char_ = 'v' },
|
||||
new() { key = Key.W, char_ = 'w' },
|
||||
new() { key = Key.X, char_ = 'x' },
|
||||
new() { key = Key.Y, char_ = 'y' },
|
||||
new() { key = Key.Z, char_ = 'z' },
|
||||
};
|
||||
public struct KebKey {
|
||||
public Key key;
|
||||
public char char_;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue