update braille on hover
This commit is contained in:
parent
6cc49f3a40
commit
0acf823ebe
1 changed files with 9 additions and 3 deletions
|
@ -214,6 +214,7 @@ public class Mono {
|
||||||
Rig.Btn keyboard_btn = new();
|
Rig.Btn keyboard_btn = new();
|
||||||
Vec3 index_pos = Vec3.Zero;
|
Vec3 index_pos = Vec3.Zero;
|
||||||
int index_i = 0;
|
int index_i = 0;
|
||||||
|
int last_index_i = 0;
|
||||||
|
|
||||||
string txt = "hello ";
|
string txt = "hello ";
|
||||||
|
|
||||||
|
@ -262,12 +263,17 @@ public class Mono {
|
||||||
index_pos.y = (float)Math.Clamp(Math.Round(index_tip.y), 0, 3-1);
|
index_pos.y = (float)Math.Clamp(Math.Round(index_tip.y), 0, 3-1);
|
||||||
|
|
||||||
index_i = (int)(index_pos.y * 10 + index_pos.x);
|
index_i = (int)(index_pos.y * 10 + index_pos.x);
|
||||||
|
|
||||||
|
if (index_i != last_index_i) {
|
||||||
|
last_index_i = index_i;
|
||||||
|
// Log.Info($"index_i: {index_i}");
|
||||||
|
monoNet.value = index_i;
|
||||||
|
monoNet.send = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyboard_btn.frameDown) {
|
if (keyboard_btn.frameDown) {
|
||||||
Log.Info($"index_i: {index_i}");
|
// send haptic input for input confirmation
|
||||||
monoNet.value = index_i;
|
|
||||||
monoNet.send = true;
|
|
||||||
txt += KeyToChar(index_i);
|
txt += KeyToChar(index_i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue