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();
|
||||
Vec3 index_pos = Vec3.Zero;
|
||||
int index_i = 0;
|
||||
int last_index_i = 0;
|
||||
|
||||
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_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) {
|
||||
Log.Info($"index_i: {index_i}");
|
||||
monoNet.value = index_i;
|
||||
monoNet.send = true;
|
||||
// send haptic input for input confirmation
|
||||
txt += KeyToChar(index_i);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue