Working on new touch screen keyboard
Added tabs to text object 3d
|
|
@ -67,8 +67,6 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public static bool EnableNetworkTraffic { get; set; } = true;
|
||||
|
||||
public static MiniTouchScreen MiniTouchScreen { get; set; } = new MiniTouchScreen();
|
||||
|
||||
public static SystemWindow LoadRootWindow(int width, int height)
|
||||
{
|
||||
timer = Stopwatch.StartNew();
|
||||
|
|
|
|||
|
|
@ -183,18 +183,33 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
}
|
||||
else
|
||||
{
|
||||
var letterObject = new Object3D()
|
||||
{
|
||||
Mesh = VertexSourceToMesh.Extrude(scaledLetterPrinter, this.Height.Value(this)),
|
||||
Matrix = Matrix4X4.CreateTranslation(offset.X, 0, 0),
|
||||
Name = leterNumber.ToString("000") + " - '" + letter.ToString() + "'"
|
||||
};
|
||||
if (letterObject.Mesh.Faces.Count > 0)
|
||||
Object3D letterObject = null;
|
||||
switch (letter)
|
||||
{
|
||||
case ' ':
|
||||
offset.X += letterPrinter.GetSize(" ").X * pointsToMm;
|
||||
break;
|
||||
|
||||
case '\t':
|
||||
offset.X += letterPrinter.GetSize(" ").X * pointsToMm;
|
||||
break;
|
||||
|
||||
default:
|
||||
letterObject = new Object3D()
|
||||
{
|
||||
Mesh = VertexSourceToMesh.Extrude(scaledLetterPrinter, this.Height.Value(this)),
|
||||
Matrix = Matrix4X4.CreateTranslation(offset.X, 0, 0),
|
||||
Name = leterNumber.ToString("000") + " - '" + letter.ToString() + "'"
|
||||
};
|
||||
offset.X += letterPrinter.GetSize(letter.ToString()).X * pointsToMm;
|
||||
break;
|
||||
}
|
||||
|
||||
if (letterObject?.Mesh.Faces.Count > 0)
|
||||
{
|
||||
lineObject.Children.Add(letterObject);
|
||||
leterNumber++;
|
||||
}
|
||||
offset.X += letterPrinter.GetSize(letter.ToString()).X * pointsToMm;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,12 +90,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
if (Application.MiniTouchScreen.Enabled)
|
||||
{
|
||||
var miniTouchScreen = new SystemWindow(800, 480);
|
||||
|
||||
miniTouchScreen.ShowAsSystemWindow();
|
||||
}
|
||||
|
||||
base.OnLoad(args);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -233,8 +233,6 @@ namespace MatterHackers.MatterControl
|
|||
Slicer.RunInProcess = config.GetValue<bool>("MatterControl:Slicer:Debug");
|
||||
Application.EnableF5Collect = config.GetValue<bool>("MatterControl:Application:EnableF5Collect");
|
||||
Application.EnableNetworkTraffic = config.GetValue("MatterControl:Application:EnableNetworkTraffic", true);
|
||||
Application.MiniTouchScreen.Make = config.GetValue("MatterControl:MiniTouchScreen:Make", "");
|
||||
Application.MiniTouchScreen.Model = config.GetValue("MatterControl:MiniTouchScreen:Model", "");
|
||||
|
||||
// Make sure we have the right working directory as we assume everything relative to the executable.
|
||||
Directory.SetCurrentDirectory(Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location));
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 12 KiB |
282
StaticData/TouchKeyboard.json
Normal file
|
|
@ -0,0 +1,282 @@
|
|||
{
|
||||
"Layout": [
|
||||
{
|
||||
"Name": "QWERTY",
|
||||
"Rows": [
|
||||
{
|
||||
"Keys": [
|
||||
{
|
||||
"Default": "Esc"
|
||||
},
|
||||
{
|
||||
"Default": "'",
|
||||
"Shifted": "~"
|
||||
},
|
||||
{
|
||||
"Default": "1",
|
||||
"Shifted": "!"
|
||||
},
|
||||
{
|
||||
"Default": "2",
|
||||
"Shifted": "@"
|
||||
},
|
||||
{
|
||||
"Default": "3",
|
||||
"Shifted": "#"
|
||||
},
|
||||
{
|
||||
"Default": "4",
|
||||
"Shifted": "$"
|
||||
},
|
||||
{
|
||||
"Default": "5",
|
||||
"Shifted": "%"
|
||||
},
|
||||
{
|
||||
"Default": "6",
|
||||
"Shifted": "^"
|
||||
},
|
||||
{
|
||||
"Default": "7",
|
||||
"Shifted": "&"
|
||||
},
|
||||
{
|
||||
"Default": "8",
|
||||
"Shifted": "*"
|
||||
},
|
||||
{
|
||||
"Default": "9",
|
||||
"Shifted": "("
|
||||
},
|
||||
{
|
||||
"Default": "0",
|
||||
"Shifted": "("
|
||||
},
|
||||
{
|
||||
"Default": "-",
|
||||
"Shifted": "_"
|
||||
},
|
||||
{
|
||||
"Default": "=",
|
||||
"Shifted": "+"
|
||||
},
|
||||
{
|
||||
"Default": "BackSpace",
|
||||
"Size": 1.5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Keys": [
|
||||
{
|
||||
"Default": "Tab",
|
||||
"Size": 1.5
|
||||
},
|
||||
{
|
||||
"Default": "q",
|
||||
"Shifted": "Q"
|
||||
},
|
||||
{
|
||||
"Default": "w",
|
||||
"Shifted": "W"
|
||||
},
|
||||
{
|
||||
"Default": "e",
|
||||
"Shifted": "E"
|
||||
},
|
||||
{
|
||||
"Default": "r",
|
||||
"Shifted": "R"
|
||||
},
|
||||
{
|
||||
"Default": "t",
|
||||
"Shifted": "T"
|
||||
},
|
||||
{
|
||||
"Default": "y",
|
||||
"Shifted": "Y"
|
||||
},
|
||||
{
|
||||
"Default": "u",
|
||||
"Shifted": "U"
|
||||
},
|
||||
{
|
||||
"Default": "i",
|
||||
"Shifted": "I"
|
||||
},
|
||||
{
|
||||
"Default": "o",
|
||||
"Shifted": "O"
|
||||
},
|
||||
{
|
||||
"Default": "p",
|
||||
"Shifted": "P"
|
||||
},
|
||||
{
|
||||
"Default": "[",
|
||||
"Shifted": "{"
|
||||
},
|
||||
{
|
||||
"Default": "]",
|
||||
"Shifted": "}"
|
||||
},
|
||||
{
|
||||
"Default": "\\",
|
||||
"Shifted": "|"
|
||||
},
|
||||
{
|
||||
"Default": "Del"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Keys": [
|
||||
{
|
||||
"Default": "Caps",
|
||||
"Size": 2
|
||||
},
|
||||
{
|
||||
"Default": "a",
|
||||
"Shifted": "A"
|
||||
},
|
||||
{
|
||||
"Default": "s",
|
||||
"Shifted": "S"
|
||||
},
|
||||
{
|
||||
"Default": "d",
|
||||
"Shifted": "D"
|
||||
},
|
||||
{
|
||||
"Default": "f",
|
||||
"Shifted": "F"
|
||||
},
|
||||
{
|
||||
"Default": "g",
|
||||
"Shifted": "g"
|
||||
},
|
||||
{
|
||||
"Default": "h",
|
||||
"Shifted": "H"
|
||||
},
|
||||
{
|
||||
"Default": "j",
|
||||
"Shifted": "J"
|
||||
},
|
||||
{
|
||||
"Default": "k",
|
||||
"Shifted": "K"
|
||||
},
|
||||
{
|
||||
"Default": "l",
|
||||
"Shifted": "L"
|
||||
},
|
||||
{
|
||||
"Default": ";",
|
||||
"Shifted": ":"
|
||||
},
|
||||
{
|
||||
"Default": "\"",
|
||||
"Shifted": "'"
|
||||
},
|
||||
{
|
||||
"Default": "Enter",
|
||||
"Size": 2.5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Keys": [
|
||||
{
|
||||
"Default": "Shift",
|
||||
"Size": 2.5
|
||||
},
|
||||
{
|
||||
"Default": "z",
|
||||
"Shifted": "Z"
|
||||
},
|
||||
{
|
||||
"Default": "x",
|
||||
"Shifted": "X"
|
||||
},
|
||||
{
|
||||
"Default": "c",
|
||||
"Shifted": "C"
|
||||
},
|
||||
{
|
||||
"Default": "v",
|
||||
"Shifted": "V"
|
||||
},
|
||||
{
|
||||
"Default": "b",
|
||||
"Shifted": "B"
|
||||
},
|
||||
{
|
||||
"Default": "n",
|
||||
"Shifted": "N"
|
||||
},
|
||||
{
|
||||
"Default": "m",
|
||||
"Shifted": "M"
|
||||
},
|
||||
{
|
||||
"Default": ",",
|
||||
"Shifted": "<"
|
||||
},
|
||||
{
|
||||
"Default": ".",
|
||||
"Shifted": ">"
|
||||
},
|
||||
{
|
||||
"Default": "/",
|
||||
"Shifted": "?"
|
||||
},
|
||||
{
|
||||
"Default": "UpArrow"
|
||||
},
|
||||
{
|
||||
"Default": "Shift",
|
||||
"Size": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Keys": [
|
||||
{
|
||||
"Default": "Ctrl"
|
||||
},
|
||||
{
|
||||
"Default": "Windows"
|
||||
},
|
||||
{
|
||||
"Default": "Alt"
|
||||
},
|
||||
{
|
||||
"Default": "Space",
|
||||
"Size": 7
|
||||
},
|
||||
{
|
||||
"Default": "Alt"
|
||||
},
|
||||
{
|
||||
"Default": "Ctrl"
|
||||
},
|
||||
{
|
||||
"Default": "LeftArrow"
|
||||
},
|
||||
{
|
||||
"Default": "DownArrow"
|
||||
},
|
||||
{
|
||||
"Default": "RightArrow"
|
||||
},
|
||||
{
|
||||
"Default": "Empty",
|
||||
"Siz": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 90f586219ed8743e2e3a93e061a61fbd7cd33207
|
||||
Subproject commit b307efd64007c2bf6ed9d1d1b7b2605e0c80eb38
|
||||