Dashboard:updates

This commit is contained in:
Sidi Liang 2020-08-02 11:19:50 +08:00
parent 6fa8569b98
commit 63c6b3809e
No known key found for this signature in database
GPG Key ID: 79F0A6B20B72F42F
9 changed files with 35 additions and 1 deletions

BIN
Models/Interior/404Design/dashboard.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 KiB

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

View File

@ -24,8 +24,9 @@ var SmartInstruments = {
m.infoImagePath = ["Aircraft/followme_e-tron/Models/Interior/Instruments/Smart/dashboard1.png",
"Aircraft/followme_e-tron/Models/Interior/Instruments/Smart/dashboard2.png",
"Aircraft/followme_e-tron/Models/Interior/Instruments/Smart/dashboard3.png"];
m.infoImageIndex = 0;
m.infoImage = m.group.createChild("image")
.setFile(m.infoImagePath[0])
.setFile(m.infoImagePath[m.infoImageIndex])
.setTranslation(0, 0)
.setSize(1509, 736);
# Create a text element and set some values(Self test)
@ -90,6 +91,19 @@ var SmartInstruments = {
return m;
},
initialized: 0,
nextCenterScreen: func(){
if(me.infoImageIndex < 2) me.infoImageIndex += 1;
else if(me.infoImageIndex >= 2) me.infoImageIndex = 0;
me.infoImage.setFile(me.infoImagePath[me.infoImageIndex]);
return me.infoImageIndex;
},
previousCenterScreen: func(){
if(me.infoImageIndex > 0) me.infoImageIndex -= 1;
else if(me.infoImageIndex == 0) me.infoImageIndex = 2;
me.infoImage.setFile(me.infoImagePath[me.infoImageIndex]);
return me.infoImageIndex;
},
update: func(){
var currentSpeed = props.getNode("/", 1).getValue("sim/multiplay/generic/float[15]");
var currentSpeedKMH = sprintf("%i", currentSpeed*1.852);

View File

@ -395,6 +395,26 @@
</binding>
</mod-up>
</key>
<key n="105">
<name>i</name>
<desc>next_center_screen</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>smartInstruments.smartInstruments.nextCenterScreen();</script>
<value type="double">1</value>
</binding>
</key>
<key n="73">
<name>I</name>
<desc>previous_center_screen</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>smartInstruments.smartInstruments.previousCenterScreen();</script>
<value type="double">1</value>
</binding>
</key>
<key n="66">
<name>B</name>
<desc>handbrake</desc>