GUI
This commit is contained in:
@@ -172,6 +172,14 @@
|
||||
<button class="act-btn subtle full" onclick="setImuNorth()">Aktuelle Richtung als Norden setzen</button>
|
||||
<button class="act-btn subtle full" onclick="setImuLevel()">Aktuelle Neigung als Null setzen</button>
|
||||
</div>
|
||||
<div class="sr">
|
||||
<span class="sr-led led-off"></span>
|
||||
<span class="sr-key">HUD-Farbe</span>
|
||||
<span class="sr-val" style="display:flex;align-items:center;gap:6px;">
|
||||
<input type="color" id="hud_color_picker" value="#00ff91" style="width:32px;height:22px;border:none;background:none;cursor:pointer;padding:0;" oninput="applyHudColorFromAdmin(this.value)" onchange="applyHudColorFromAdmin(this.value)">
|
||||
<button class="act-btn subtle" style="padding:2px 8px;font-size:11px;" onclick="resetHudColor()">Reset</button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="sr">
|
||||
<span class="sr-led led-off"></span>
|
||||
<span class="sr-key">Hinweis</span>
|
||||
@@ -2820,6 +2828,27 @@
|
||||
}
|
||||
}
|
||||
|
||||
(function() {
|
||||
try {
|
||||
var h = localStorage.getItem('hudHexColor');
|
||||
if (h) {
|
||||
var el = document.getElementById('hud_color_picker');
|
||||
if (el) el.value = '#' + h;
|
||||
}
|
||||
} catch(e) {}
|
||||
})();
|
||||
|
||||
function applyHudColorFromAdmin(cssColor) {
|
||||
var hex = cssColor.replace('#', '');
|
||||
try { localStorage.setItem('hudHexColor', hex); } catch(e) {}
|
||||
}
|
||||
|
||||
function resetHudColor() {
|
||||
var el = document.getElementById('hud_color_picker');
|
||||
if (el) el.value = '#00ff91';
|
||||
applyHudColorFromAdmin('#00ff91');
|
||||
}
|
||||
|
||||
async function setImuNorth() {
|
||||
if (!window.confirm('Rover jetzt wirklich sauber nach Norden ausgerichtet?')) return;
|
||||
setAdminStatus('Speichere Nordrichtung...');
|
||||
|
||||
Reference in New Issue
Block a user