Skip to content

Commit 6a66aad

Browse files
committed
Add first parts of a touch screen MFD
Issue #288
1 parent d643a19 commit 6a66aad

File tree

8 files changed

+1410
-0
lines changed

8 files changed

+1410
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
//MAS_LUA
2+
//{
3+
// name = MAS IFMS scripts
4+
5+
// script = MOARdVPlus/MAS_KFS_Flapjack/MFD/KFS_MFD_Scripts.lua
6+
//}
7+
8+
PROP
9+
{
10+
name = MAS_MFD_Touch1
11+
12+
MODEL
13+
{
14+
model = MOARdV/Props/SquareMonitorTypeA/SquareMonitorTypeB
15+
}
16+
MODEL
17+
{
18+
model = ASET/ASET_Props/Control/Push_Button_Modular/models/pb_Collider
19+
scale = 2.880, 0.5, 2.880
20+
}
21+
22+
MODULE
23+
{
24+
name = MASComponent
25+
26+
// "touch screen" collider
27+
COLLIDER_ADVANCED
28+
{
29+
name = TouchScreen Collider
30+
collider = pb_Collider
31+
monitorID = MFD_TS_%PROPID%
32+
clickX = 1024 - (%X% * 1024)
33+
clickY = %Z% * 1024
34+
//clickX = 512 - (%X% * 512)
35+
//clickY = %Z% * 512
36+
sound = ASET/ASET_Props/Sounds/pb_Push02
37+
volume = 1
38+
//logHits = true
39+
}
40+
}
41+
42+
MODULE
43+
{
44+
name = MASMonitor
45+
46+
screenTransform = MonitorScreen02 // Transform for the monitor
47+
textureLayerID = _Emissive // Name of texture layer to work with on the screen surface.
48+
screenSize = 1024, 1024
49+
//screenSize = 512, 512
50+
fontSize = 16, 32 // Fixed font dimensions
51+
// 64 x 32 character display @ 1024
52+
// 32 x 16 character display @ 512
53+
font = InconsolataGo
54+
style = Bold
55+
textColor = COLOR_MFD2_TEXT // Default color of text
56+
backgroundColor = 4, 4, 8, 255 // Background color
57+
monitorID = MFD_TS_%PROPID%
58+
59+
//startupScript = TouchScreen1_MFD_Init("%AUTOID%")
60+
//startupScript = fc.InitializePersistent("MFD_TS_%PROPID%-Back", "MAS_TS1_Standby")
61+
62+
page = MAS_TS1_Standby
63+
page = MAS_TS1_Display
64+
page = MAS_TS1_Config
65+
page = MAS_TS1_FlightDisplay
66+
page = MAS_TS1_FlightConfig
67+
page = MAS_TS1_OrbitDisplay
68+
}
69+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Display Selection page
2+
MAS_PAGE
3+
{
4+
name = MAS_TS1_Config
5+
6+
hitbox
7+
{
8+
name = rewind button
9+
position = 8, 976
10+
size = 48, 48
11+
onClick = fc.SetPersistent("MFD_TS_%PROPID%", "MAS_TS1_Standby")
12+
}
13+
hitbox
14+
{
15+
name = back button
16+
position = 72, 976
17+
size = 48, 48
18+
onClick = fc.SetPersistent("MFD_TS_%PROPID%", "MAS_TS1_Standby")
19+
}
20+
hitbox
21+
{
22+
name = mode button
23+
position = 392, 976
24+
size = 112, 48
25+
onClick = fc.SetPersistent("MFD_TS_%PROPID%", "MAS_TS1_Display")
26+
}
27+
hitbox
28+
{
29+
name = flight
30+
position = 56, 312
31+
size = 112, 48
32+
onClick = fc.SetPersistent("MFD_TS_%PROPID%", "MAS_TS1_FlightConfig")
33+
}
34+
SUB_PAGE
35+
{
36+
name = TouchScreen Nav Footer
37+
}
38+
TEXT
39+
{
40+
name = page ID
41+
position = 8.5, 30.5
42+
text = CONFIG SELECT
43+
}
44+
TEXT
45+
{
46+
name = page ID
47+
position = 25, 30.5
48+
fontSize = 14,32
49+
text = DISPLAY
50+
textColor = COLOR_MFD2_TEXT_HIGHLIGHT
51+
}
52+
53+
SUB_PAGE
54+
{
55+
name = TouchScreen Footer
56+
}
57+
58+
SUB_PAGE
59+
{
60+
name = TouchScreen Page Select
61+
}
62+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// Display Selection page
2+
MAS_PAGE
3+
{
4+
name = MAS_TS1_Display
5+
6+
hitbox
7+
{
8+
name = rewind button
9+
position = 8, 976
10+
size = 48, 48
11+
onClick = fc.SetPersistent("MFD_TS_%PROPID%", "MAS_TS1_Standby")
12+
}
13+
hitbox
14+
{
15+
name = back button
16+
position = 72, 976
17+
size = 48, 48
18+
onClick = fc.SetPersistent("MFD_TS_%PROPID%", "MAS_TS1_Standby")
19+
}
20+
hitbox
21+
{
22+
name = mode button
23+
position = 392, 976
24+
size = 112, 48
25+
onClick = fc.SetPersistent("MFD_TS_%PROPID%", "MAS_TS1_Config")
26+
}
27+
hitbox
28+
{
29+
name = flight
30+
position = 56, 312
31+
size = 112, 48
32+
onClick = fc.SetPersistent("MFD_TS_%PROPID%", "MAS_TS1_FlightDisplay")
33+
}
34+
hitbox
35+
{
36+
name = orbit
37+
position = 56, 504
38+
size = 112, 48
39+
onClick = fc.SetPersistent("MFD_TS_%PROPID%", "MAS_TS1_OrbitDisplay")
40+
}
41+
SUB_PAGE
42+
{
43+
name = TouchScreen Nav Footer
44+
}
45+
TEXT
46+
{
47+
name = page ID
48+
position = 8.5, 30.5
49+
text = DISPLAY SELECT
50+
}
51+
TEXT
52+
{
53+
name = page ID
54+
position = 25, 30.5
55+
text = CONFIG
56+
textColor = COLOR_MFD2_TEXT_HIGHLIGHT
57+
}
58+
59+
SUB_PAGE
60+
{
61+
name = TouchScreen Footer
62+
}
63+
64+
SUB_PAGE
65+
{
66+
name = TouchScreen Page Select
67+
}
68+
}
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
// Flight Config
2+
MAS_PAGE
3+
{
4+
name = MAS_TS1_FlightConfig
5+
6+
7+
hitbox
8+
{
9+
name = rewind button
10+
position = 8, 976
11+
size = 48, 48
12+
onClick = fc.SetPersistent("MFD_TS_%PROPID%", "MAS_TS1_Standby")
13+
}
14+
hitbox
15+
{
16+
name = back button
17+
position = 72, 976
18+
size = 48, 48
19+
onClick = fc.SetPersistent("MFD_TS_%PROPID%", "MAS_TS1_Config")
20+
}
21+
hitbox
22+
{
23+
name = mode button
24+
position = 392, 976
25+
size = 112, 48
26+
onClick = fc.SetPersistent("MFD_TS_%PROPID%", "MAS_TS1_FlightDisplay")
27+
}
28+
29+
//--- AHI Select
30+
TEXT
31+
{
32+
name = FDAI/AHI select caption
33+
text = Attitude Indicator Mode
34+
position = 2, 5
35+
}
36+
37+
hitbox
38+
{
39+
name = FDAI/AHI hit 1
40+
position = 8, 216
41+
size = 48, 48
42+
onClick = fc.SetPersistent("MAS_TS1-Flight-AHI-Select", 0)
43+
}
44+
IMAGE
45+
{
46+
name = FDAI/AHI checkbox 1
47+
position = 8, 216
48+
texture = MOARdV/MFD/framefill2ch48x48
49+
passiveColor = COLOR_MFD2_TEXT_GREEN
50+
}
51+
TEXT
52+
{
53+
name = FDAI/AHI check 1
54+
text = X
55+
position = 1.5, 7
56+
textColor = COLOR_MFD2_TEXT_HIGHLIGHT
57+
variable = fc.GetPersistentAsNumber("MAS_TS1-Flight-AHI-Select") == 0
58+
}
59+
TEXT
60+
{
61+
name = FDAI/AHI caption 1
62+
text = (AHI) Artificial Horizon Indicator
63+
position = 4, 7
64+
}
65+
hitbox
66+
{
67+
name = FDAI/AHI hit 2
68+
position = 8, 280
69+
size = 48, 48
70+
onClick = fc.SetPersistent("MAS_TS1-Flight-AHI-Select", 1)
71+
}
72+
IMAGE
73+
{
74+
name = FDAI/AHI checkbox 2
75+
position = 8, 280
76+
texture = MOARdV/MFD/framefill2ch48x48
77+
passiveColor = COLOR_MFD2_TEXT_GREEN
78+
}
79+
TEXT
80+
{
81+
name = FDAI/AHI check 2
82+
text = X
83+
position = 1.5, 9
84+
textColor = COLOR_MFD2_TEXT_HIGHLIGHT
85+
variable = fc.GetPersistentAsNumber("MAS_TS1-Flight-AHI-Select") == 1
86+
}
87+
TEXT
88+
{
89+
name = FDAI/AHI caption 2
90+
text = (FDAI) Navball
91+
position = 4, 9
92+
}
93+
94+
//--- Altimeter select
95+
TEXT
96+
{
97+
name = Altimeter select caption
98+
text = Altimeter Mode
99+
position = 2, 12
100+
}
101+
102+
hitbox
103+
{
104+
name = Altimeter hit 1
105+
position = 8, 440
106+
size = 48, 48
107+
onClick = fc.SetPersistent("MAS_TS1-Flight-Altitude-Select", 0)
108+
}
109+
IMAGE
110+
{
111+
name = Altimeter checkbox 1
112+
position = 8, 440
113+
texture = MOARdV/MFD/framefill2ch48x48
114+
passiveColor = COLOR_MFD2_TEXT_GREEN
115+
}
116+
TEXT
117+
{
118+
name = Altimeter check 1
119+
text = X
120+
position = 1.5, 14
121+
textColor = COLOR_MFD2_TEXT_HIGHLIGHT
122+
variable = fc.GetPersistentAsNumber("MAS_TS1-Flight-Altitude-Select") == 0
123+
}
124+
TEXT
125+
{
126+
name = Altimeter caption 1
127+
text = Digital Gauges
128+
position = 4, 14
129+
}
130+
hitbox
131+
{
132+
name = Altimeter hit 2
133+
position = 8, 504
134+
size = 48, 48
135+
onClick = fc.SetPersistent("MAS_TS1-Flight-Altitude-Select", 1)
136+
}
137+
IMAGE
138+
{
139+
name = Altimeter checkbox 2
140+
position = 8, 504
141+
texture = MOARdV/MFD/framefill2ch48x48
142+
passiveColor = COLOR_MFD2_TEXT_GREEN
143+
}
144+
TEXT
145+
{
146+
name = Altimeter check 2
147+
text = X
148+
position = 1.5, 16
149+
textColor = COLOR_MFD2_TEXT_HIGHLIGHT
150+
variable = fc.GetPersistentAsNumber("MAS_TS1-Flight-Altitude-Select") == 1
151+
}
152+
TEXT
153+
{
154+
name = Altimeter caption 2
155+
text = Ladder
156+
position = 4, 16
157+
}
158+
159+
SUB_PAGE
160+
{
161+
name = TouchScreen Nav Footer
162+
}
163+
TEXT
164+
{
165+
name = page ID
166+
position = 8.5, 30.5
167+
text = FLIGHT CONFIG
168+
}
169+
TEXT
170+
{
171+
name = page ID
172+
position = 25, 30.5
173+
fontSize = 14,32
174+
text = DISPLAY
175+
textColor = COLOR_MFD2_TEXT_HIGHLIGHT
176+
}
177+
178+
SUB_PAGE
179+
{
180+
name = TouchScreen Footer
181+
}
182+
}

0 commit comments

Comments
 (0)