basic txt entry
This commit is contained in:
parent
d21cb6c9d3
commit
6cc49f3a40
1 changed files with 21 additions and 0 deletions
|
@ -215,6 +215,8 @@ public class Mono {
|
|||
Vec3 index_pos = Vec3.Zero;
|
||||
int index_i = 0;
|
||||
|
||||
string txt = "hello ";
|
||||
|
||||
public void Init() {
|
||||
rig.Init();
|
||||
|
||||
|
@ -223,6 +225,8 @@ public class Mono {
|
|||
|
||||
mat_room.SetTexture("diffuse", Tex.FromFile("bake.png"));
|
||||
mesh_room = model_room.Nodes.First(n => n.Name == "Room").Mesh;
|
||||
|
||||
keyboard_btn.held = true;
|
||||
}
|
||||
|
||||
public void Run() {
|
||||
|
@ -264,8 +268,12 @@ public class Mono {
|
|||
Log.Info($"index_i: {index_i}");
|
||||
monoNet.value = index_i;
|
||||
monoNet.send = true;
|
||||
txt += KeyToChar(index_i);
|
||||
}
|
||||
|
||||
|
||||
// RENDER RENDER RENDER
|
||||
|
||||
// keyboard
|
||||
Hierarchy.Push(keyboard_m4);
|
||||
// 3 rows of 10 keys
|
||||
|
@ -323,6 +331,19 @@ public class Mono {
|
|||
keyboard_btn.held ? Color.Hex(0x00000090) : Color.Hex(0x80808090)
|
||||
);
|
||||
|
||||
// text
|
||||
// show over the keyboard
|
||||
Text.Add(
|
||||
txt,
|
||||
Matrix.TS(
|
||||
V.XYZ(0, -1, 0),
|
||||
V.XYZ(-1, -1, 0) * 20.0f
|
||||
) * keyboard_m4,
|
||||
TextAlign.CenterLeft,
|
||||
TextAlign.CenterLeft,
|
||||
0, 0, 0
|
||||
);
|
||||
|
||||
// WORLD
|
||||
mesh_room.Draw(
|
||||
mat_room,
|
||||
|
|
Loading…
Add table
Reference in a new issue