-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
63 lines (49 loc) · 1.48 KB
/
Program.cs
File metadata and controls
63 lines (49 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using MyPiUI.Drawing;
using MyPiUI.Input;
using MyPiUI.Primitives;
using MyPiUI.Sample.Scenes;
namespace MyPiUI.Sample;
class Program
{
static void Main()
{
Console.WriteLine("Initializing MyPiUI Engine..");
var engine = new MyEngine(new MyEngineOptions()
{
FrameBufferDevice = "/dev/fb0",
TouchDevice = InputDeviceEnumerator.AutoDetectTouchDevice(),
SwapTouchXAndY = true,
InvertTouchX = true,
InvertTouchY = false,
HideConsoleCaret = true,
ShowMetrics = true,
ShowDebugUI = true,
BackgroundColor = Color.Black,
ForegroundColor = Color.White,
RenderMode = RenderMode.Raylib,
RenderWidth = 480,
RenderHeight = 320,
HotReload = true,
SkipTouchCalibration = false
});
engine.Initialize();
Console.WriteLine("Loading TestScene..");
engine.SceneManager.Push(new TestScene()
{
UI = "TestScene.xml"
});
bool isRunning = true;
Console.CancelKeyPress += (_, e) =>
{
e.Cancel = true;
isRunning = false;
Console.Clear();
};
while (isRunning)
{
engine.Update();
engine.Draw();
}
//engine.Dispose();
}
}