Skip to content

Commit 4eb1a45

Browse files
committed
🎮 New mod type: '.dashboard'
Usual modcache treatment: recorded in cache file 'mods.cache', viewable/searchable in SelectorUI, can have preview image. Removed cvar 'gfx_speedo_digital', made digital/analog separate .dashboard files For examples, see files 'default_*.dashboard' (truck digital/analog, boat), added to 'dashboards.zip'. Note: in the Selector UI, preview images for dashboards are only shrunk if needed but not enlarged so players see actual in-game size ~ suggested by Mark. 2 new cvars were added: 'ui_default_truck_dash', 'ui_default_boat_dash' (string) - these store the names of default dashboards, you can change them via Settings (tab UI). Custom fonts are supported via .resource files (XML, same syntax as MyGui_FontsDash.xml in 'dashboards.zip').
1 parent 6428a1d commit 4eb1a45

29 files changed

+1263
-1125
lines changed
89.7 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
; A dashboard mod MUST contain a '.dashboard' file, even if just empty.
2+
; Recognized parameters:
3+
; * dashboard_name <string>
4+
; * dashboard_description <string>
5+
; * dashboard_author <string: credit> <int: forum ID> <string: name> <string: email>
6+
; * dashboard_category <int: 200=Generic, 201=Truck, 202=Boat>
7+
;
8+
; Custom fonts are supported via .resource files (XML, same syntax as MyGui_FontsDash.xml in 'dashboards.zip').
9+
;
10+
; All layout+resource files must start the same as the .dashboard file.
11+
; For example: foo.dashboard -> foo_dashboard.layout, foo_dashboard.resource
12+
; Optional layout filename tags:
13+
; * '_Nrpm' ~ N is the redline RPM
14+
; * '_Xph' ~ X is units (k=Kilometers | m=Miles)
15+
; ----------------------------------------------------------------------------------
16+
17+
dashboard_name "Default - Boat"
18+
dashboard_description "Default dashboard for boats"
19+
dashboard_category 202
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<MyGUI type="Layout" version="3.2.0">
3-
<Widget type="ImageBox" skin="ImageBox" position="0 114 1024 795" align="Strech" layer="Back" name="_Main">
4-
<Widget type="ImageBox" skin="ImageBox" position="770 544 250 250" align="Right Bottom" layer="Back" name="SpeedoGauge">
5-
<Property key="ImageTexture" value="speedo_boat.png"/>
6-
<UserString key="link" value="water_speed"/>
7-
<Widget type="TextBox" skin="TextBox" position="89 175 72 27" name="textdepth">
8-
<Property key="TextColour" value="1 1 1"/>
9-
<Property key="TextAlign" value="Right VCenter"/>
10-
<Property key="FontHeight" value="18"/>
11-
<Property key="Caption" value="123"/>
12-
<Property key="FontName" value="Digital-7-18"/>
13-
<UserString key="link" value="water_depth"/>
14-
<UserString key="anim" value="textformat"/>
15-
<UserString key="format" value="%2.1f"/>
16-
</Widget>
17-
<Widget type="ImageBox" skin="ImageBox" position="156 107 35 35" name="ign">
18-
<Property key="ImageTexture" value="ign_v2-off.png"/>
19-
<UserString key="anim" value="lamp"/>
20-
<UserString key="texture" value="ign_v2"/>
21-
<UserString key="link" value="engine_ignition"/>
22-
</Widget>
23-
<Widget type="ImageBox" skin="ImageBox" position="108 76 35 35" name="lightsBattery">
24-
<Property key="ImageTexture" value="batt_v2-off.png"/>
25-
<UserString key="anim" value="lamp"/>
26-
<UserString key="texture" value="batt_v2"/>
27-
<UserString key="link" value="engine_battery"/>
28-
</Widget>
29-
<Widget type="ImageBox" skin="ImageBox" position="147 78 25 25" name="lightsLocked">
30-
<Property key="ImageTexture" value="secured_v2-off.png"/>
31-
<UserString key="anim" value="lamp"/>
32-
<UserString key="texture" value="secured_v2"/>
33-
<UserString key="link" value="locked"/>
34-
</Widget>
35-
<Widget type="ImageBox" skin="ImageBox" position="74 77 28 28" name="lightsTies">
36-
<Property key="ImageTexture" value="locked_v2-0.png"/>
37-
<UserString key="texture" value="locked_v2"/>
38-
<UserString key="link" value="ties_mode"/>
39-
<UserString key="anim" value="series"/>
40-
</Widget>
41-
<Widget type="ImageBox" skin="ImageBox" position="55 107 35 35" name="lightsFrontLights">
42-
<Property key="ImageTexture" value="lights_v2-off.png"/>
43-
<UserString key="anim" value="lamp"/>
44-
<UserString key="link" value="lights"/>
45-
<UserString key="texture" value="lights_v2"/>
46-
</Widget>
47-
</Widget>
48-
<Widget type="ImageBox" skin="RotatingSkin" style="Overlapped" position="769 538 258 258" align="Right Bottom" layer="Middle" name="SpeedoNeedle">
49-
<Property key="ImageTexture" value="redneedle_v2.png"/>
50-
<UserString key="anim" value="rotate"/>
51-
<UserString key="link" value="water_speed"/>
52-
<UserString key="vmax" value="60"/>
53-
<UserString key="vmin" value="-60"/>
54-
<UserString key="min" value="-135"/>
55-
<UserString key="max" value="135"/>
56-
<Widget type="ImageBox" skin="ImageBox" position="113 113 32 32">
57-
<Property key="ImageTexture" value="needle_prt2.png"/>
58-
</Widget>
59-
</Widget>
60-
<Widget type="ImageBox" skin="RotatingSkin" position="461 644 150 150" align="HCenter Bottom" name="steerrudder">
61-
<Property key="ImageTexture" value="shipsteer.dds"/>
62-
<UserString key="anim" value="rotate"/>
63-
<UserString key="max" value="360"/>
64-
<UserString key="min" value="-360"/>
65-
<UserString key="link" value="screw_steer_0"/>
66-
<UserString key="vmax" value="-1"/>
67-
<UserString key="vmin" value="1"/>
68-
</Widget>
69-
</Widget>
70-
</MyGUI>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<MyGUI type="Layout" version="3.2.0">
3+
<Widget type="ImageBox" skin="ImageBox" position="0 114 1024 795" align="Strech" layer="Back" name="_Main">
4+
<Widget type="ImageBox" skin="ImageBox" position="770 544 250 250" align="Right Bottom" layer="Back" name="SpeedoGauge">
5+
<Property key="ImageTexture" value="speedo_boat.png"/>
6+
<UserString key="link" value="water_speed"/>
7+
<Widget type="TextBox" skin="TextBox" position="89 175 72 27" name="textdepth">
8+
<Property key="TextColour" value="1 1 1"/>
9+
<Property key="TextAlign" value="Right VCenter"/>
10+
<Property key="FontHeight" value="18"/>
11+
<Property key="Caption" value="123"/>
12+
<Property key="FontName" value="Digital-7-18"/>
13+
<UserString key="link" value="water_depth"/>
14+
<UserString key="anim" value="textformat"/>
15+
<UserString key="format" value="%2.1f"/>
16+
</Widget>
17+
<Widget type="ImageBox" skin="ImageBox" position="156 107 35 35" name="ign">
18+
<Property key="ImageTexture" value="ign_v2-off.png"/>
19+
<UserString key="anim" value="lamp"/>
20+
<UserString key="texture" value="ign_v2"/>
21+
<UserString key="link" value="engine_ignition"/>
22+
</Widget>
23+
<Widget type="ImageBox" skin="ImageBox" position="108 76 35 35" name="lightsBattery">
24+
<Property key="ImageTexture" value="batt_v2-off.png"/>
25+
<UserString key="anim" value="lamp"/>
26+
<UserString key="texture" value="batt_v2"/>
27+
<UserString key="link" value="engine_battery"/>
28+
</Widget>
29+
<Widget type="ImageBox" skin="ImageBox" position="147 78 25 25" name="lightsLocked">
30+
<Property key="ImageTexture" value="secured_v2-off.png"/>
31+
<UserString key="anim" value="lamp"/>
32+
<UserString key="texture" value="secured_v2"/>
33+
<UserString key="link" value="locked"/>
34+
</Widget>
35+
<Widget type="ImageBox" skin="ImageBox" position="74 77 28 28" name="lightsTies">
36+
<Property key="ImageTexture" value="locked_v2-0.png"/>
37+
<UserString key="texture" value="locked_v2"/>
38+
<UserString key="link" value="ties_mode"/>
39+
<UserString key="anim" value="series"/>
40+
</Widget>
41+
<Widget type="ImageBox" skin="ImageBox" position="55 107 35 35" name="lightsFrontLights">
42+
<Property key="ImageTexture" value="lights_v2-off.png"/>
43+
<UserString key="anim" value="lamp"/>
44+
<UserString key="link" value="lights"/>
45+
<UserString key="texture" value="lights_v2"/>
46+
</Widget>
47+
</Widget>
48+
<Widget type="ImageBox" skin="RotatingSkin" style="Overlapped" position="769 538 258 258" align="Right Bottom" layer="Middle" name="SpeedoNeedle">
49+
<Property key="ImageTexture" value="redneedle_v2.png"/>
50+
<UserString key="anim" value="rotate"/>
51+
<UserString key="link" value="water_speed"/>
52+
<UserString key="vmax" value="60"/>
53+
<UserString key="vmin" value="-60"/>
54+
<UserString key="min" value="-135"/>
55+
<UserString key="max" value="135"/>
56+
<Widget type="ImageBox" skin="ImageBox" position="113 113 32 32">
57+
<Property key="ImageTexture" value="needle_prt2.png"/>
58+
</Widget>
59+
</Widget>
60+
<Widget type="ImageBox" skin="RotatingSkin" position="461 644 150 150" align="HCenter Bottom" name="steerrudder">
61+
<Property key="ImageTexture" value="shipsteer.dds"/>
62+
<UserString key="anim" value="rotate"/>
63+
<UserString key="max" value="360"/>
64+
<UserString key="min" value="-360"/>
65+
<UserString key="link" value="screw_steer_0"/>
66+
<UserString key="vmax" value="-1"/>
67+
<UserString key="vmin" value="1"/>
68+
</Widget>
69+
</Widget>
70+
</MyGUI>

resources/dashboards/default_dashboard.layout

-128
This file was deleted.
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
; A dashboard mod MUST contain a '.dashboard' file, even if just empty.
2+
; Recognized parameters:
3+
; * dashboard_name <string>
4+
; * dashboard_description <string>
5+
; * dashboard_author <string: credit> <int: forum ID> <string: name> <string: email>
6+
; * dashboard_category <int: 200=Generic, 201=Truck, 202=Boat>
7+
;
8+
; Custom fonts are supported via .resource files (XML, same syntax as MyGui_FontsDash.xml in 'dashboards.zip').
9+
;
10+
; All layout+resource files must start the same as the .dashboard file.
11+
; For example: foo.dashboard -> foo_dashboard.layout, foo_dashboard.resource
12+
; Optional layout filename tags:
13+
; * '_Nrpm' ~ N is the redline RPM
14+
; * '_Xph' ~ X is units (k=Kilometers | m=Miles)
15+
; ----------------------------------------------------------------------------------
16+
17+
dashboard_name "Default - Truck analog"
18+
dashboard_description "Default dashboard with analog speedometer"
19+
dashboard_author "7000 RPM tacho" -1 "Klink"
20+
dashboard_category 201

0 commit comments

Comments
 (0)