Removed UI App Files

UI App files deprecated due to simpler use of using input key "E" to refill.
This commit is contained in:
BuilderSky 2022-06-25 07:38:53 -05:00 committed by Deer McDurr
parent 74606130c0
commit 68ef64d846
4 changed files with 0 additions and 172 deletions

View File

@ -1,95 +0,0 @@
<div ng-controller="fuelstation" id="fuelstation" class="fuelstation" ng-style="{'width': '100%', 'height': '100%'}" ng-init="init()" style="display: none">
<style id="applicationStylesheet" type="text/css">
.FuelBackground {
position: absolute;
overflow: visible;
width: 470px;
height: 309px;
left: 0px;
top: 0px;
}
#Gallon {
position: absolute;
left: 38px;
top: 46px;
overflow: visible;
width: 143px;
white-space: nowrap;
text-align: left;
font-family: Segoe UI;
font-style: normal;
font-weight: normal;
font-size: 50px;
color: rgba(255,255,255,1);
}
#Price {
position: absolute;
left: 38px;
top: 140px;
overflow: visible;
width: 108px;
white-space: nowrap;
text-align: left;
font-family: Segoe UI;
font-style: normal;
font-weight: normal;
font-size: 50px;
color: rgba(255,255,255,1);
}
#Fuel_served_at_5_degrees {
position: absolute;
left: 145px;
top: 227px;
overflow: visible;
width: 151px;
white-space: nowrap;
text-align: left;
font-family: Segoe UI;
font-style: normal;
font-weight: normal;
font-size: 14px;
color: rgba(255,255,255,1);
}
#AddFuel {
position: absolute;
right: -40px;
bottom: 130px;
overflow: visible;
width: 151px;
white-space: nowrap;
text-align: left;
font-family: Segoe UI;
font-style: normal;
font-weight: normal;
font-size: 14px;
color: rgba(255,255,255,1);
}
input.fuelStationNumberValue {
width: 250px;
right: -270px;
position: absolute;
}
button#ActionButton {
font-size: 30px;
}
</style>
<svg class="FuelBackground">
<rect fill="rgba(113,113,113,1)" stroke="rgba(255,255,255,1)" stroke-width="1px" stroke-linejoin="miter" stroke-linecap="butt" stroke-miterlimit="4" shape-rendering="auto" id="Background" rx="26" ry="26" x="0" y="0" width="470" height="309">
</rect>
</svg>
<div id="Gallon">
<span id="GasNote">Gallon</span>
<span id="EVNote">p/Kw</span>
<input type="number" name="" value="2.73" class="fuelStationNumberValue" disabled>
</div>
<div id="Price">
<span>Price</span>
<input type="number" name="" value="0.0" class="fuelStationNumberValue" style="right: -305px;" disabled id="FuelValueIncreasedBy">
</div>
<div id="Fuel_served_at_5_degrees">
<span id="FuelNote">Fuel served at 5 degrees</span>
</div>
<div id="AddFuel">
<button id="ActionButton" type="button" ng-mousedown='addFuel()' ng-mouseup="stopAddFuel()">Fuel</button>
</div>
</div>

View File

@ -1,63 +0,0 @@
var app = angular.module('beamng.apps');
app.directive('fuelstation', ['UiUnits', function (UiUnits) {
return {
templateUrl: 'modules/apps/FuelStation/app.html',
replace: true,
restrict: 'EA',
scope: true
}
}]);
app.controller("fuelstation", ['$scope', 'bngApi', '$interval', function ($scope, bngApi, $interval) {
$scope.init = function() {
};
$scope.reset = function() {
$scope.init();
};
$scope.select = function() {
bngApi.engineLua('setCEFFocus(true)');
};
var promise;
$scope.addFuel = function() {
if(promise){
$interval.cancel(promise);
}
promise = $interval(function () {
var v = document.querySelector('#FuelValueIncreasedBy').value;
document.querySelector('#FuelValueIncreasedBy').value = parseFloat(v) + 0.1;
bngApi.engineLua('fuelStations.addFuel(true)');
}, 100);
};
$scope.stopAddFuel = function () {
$interval.cancel(promise);
promise = null;
};
}]);
function fuelUIShowHide(b, t) {
//console.log("fuelUIShowHide("+b+")")
if (b == "true") {
if (document.querySelector('#fuelstation').style.display == "none") {
document.querySelector('#fuelstation').style.display = "block";
document.querySelector('#FuelValueIncreasedBy').value = 0.0;
if (t == "EV") {
document.querySelector('#EVNote').style.display = "";
document.querySelector('#GasNote').style.display = "none";
document.querySelector('#FuelNote').style.display = "none";
document.querySelector('#ActionButton').innerHTML = "Charge";
} else {
document.querySelector('#GasNote').style.display = "";
document.querySelector('#EVNote').style.display = "none";
document.querySelector('#FuelNote').style.display = "";
document.querySelector('#ActionButton').innerHTML = "Fuel";
}
}
} else if (b == "false") {
document.querySelector('#fuelstation').style.display = "none";
}
}

View File

@ -1,14 +0,0 @@
{
"name": "Fuel Station UI",
"author": "Titch2000",
"version": "0.2",
"description": "Fuel Station UI",
"directive": "fuelstation",
"domElement": "<fuelstation></fuelstation>",
"css": {
"left": "180px",
"bottom": "0px",
"width": "471px",
"height": "309px"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB