Raylib stuff

This commit is contained in:
firestar5683
2026-07-13 22:18:15 -05:00
parent fb031a3c57
commit ca74743eac
5 changed files with 8 additions and 10 deletions
@@ -473,7 +473,7 @@ class StarPilotAppearanceLayout(_SettingsPage):
self._dev_rows = [
SettingRow("DeveloperSidebar", "toggle", tr_noop("Developer Sidebar"),
subtitle=tr_noop("Driving metrics panel on the right"),
get_state=lambda: bool(self._params.get("DeveloperSidebar") or False),
get_state=lambda: self._params.get_bool("DeveloperSidebar"),
set_state=lambda s: self._set_developer_sidebar(s)),
SettingRow("LeadDetectionThreshold", "value", tr_noop("Lead Detection Threshold"),
subtitle="",
@@ -1292,7 +1292,7 @@ class StarPilotLongitudinalLayout(_SettingsPage):
def on_key(res, text):
if res == DialogResult.CONFIRM:
self._params.put("WeatherAPIKey", text)
self._params.put("WeatherToken", text)
self._keyboard.reset(min_text_size=1)
self._keyboard.set_title(tr_noop("Weather API Key"), "")
@@ -1303,7 +1303,7 @@ class StarPilotLongitudinalLayout(_SettingsPage):
def on_confirm(res):
if res == DialogResult.CONFIRM:
self._params.remove("WeatherAPIKey")
self._params.remove("WeatherToken")
gui_app.push_widget(ConfirmDialog(tr_noop("Remove API Key?"), tr_noop("Confirm"), callback=on_confirm))
@@ -1,6 +1,5 @@
from __future__ import annotations
from dataclasses import replace
import json
import os
import re
import shutil
@@ -260,8 +259,8 @@ class SystemSettingsManagerView(PanelManagerView):
{
"title": tr("Show FPS"),
"subtitle": "",
"get_state": lambda: self._controller._params.get_bool("ShowFPS"),
"set_state": lambda v: self._controller._params.put_bool("ShowFPS", v),
"get_state": lambda: self._controller._params.get_bool("FPSCounter"),
"set_state": lambda v: self._controller._params.put_bool("FPSCounter", v),
},
{
"title": tr("Disable Uploads"),
@@ -1226,7 +1225,7 @@ class StarPilotSystemLayout(_SettingsPage):
def on_discord(res2, username):
if res2 == DialogResult.CONFIRM and username:
self._params.put("DiscordUsername", username)
report = json.dumps({"DiscordUser": username, "Issue": dialog.selection})
report = {"DiscordUser": username, "Issue": dialog.selection}
self._params_memory.put("IssueReported", report)
gui_app.push_widget(alert_dialog(tr("Issue reported. Thank you!")))
self._keyboard.reset(min_text_size=1)
@@ -144,7 +144,7 @@ class DeveloperSidebar:
# ---- PC REPLAY FALLBACK (remove the next line when replay gets toggle bridge) ----
# self._visible = ui_state.starpilot_toggles.get("developer_sidebar", False)
# ---- replace the line below with the one above ---->
self._visible = self._params.get("DeveloperSidebar") or False or ui_state.starpilot_toggles.get("developer_sidebar", False)
self._visible = self._params.get_bool("DeveloperSidebar") or ui_state.starpilot_toggles.get("developer_sidebar", False)
if not self._visible:
return
@@ -247,7 +247,7 @@ class StarPilotOnroadView(AugmentedRoadView):
super()._handle_mouse_press(mouse_pos)
def _render_developer_metrics(self):
if not self._params.get_bool("ShowFPS"):
if not self._params.get_bool("FPSCounter"):
return
# Track FPS
@@ -417,4 +417,3 @@ class StarPilotOnroadView(AugmentedRoadView):
from openpilot.selfdrive.ui.onroad.starpilot.pedal_icons import render_pedal_icons
render_pedal_icons(start_x, start_y, self._font_bold)