Visuals - Screen Management - Hide UI Elements - Max Speed

This commit is contained in:
FrogAi 2024-05-11 15:40:24 -07:00
parent 998b15405c
commit 5ec20771b5
3 changed files with 106 additions and 102 deletions

View File

@ -749,6 +749,7 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) {
QString speedStr = QString::number(std::nearbyint(speed));
QString setSpeedStr = is_cruise_set ? QString::number(std::nearbyint(setSpeed - cruiseAdjustment)) : "";
if (!scene.hide_max_speed) {
// Draw outer box + border to contain set speed and speed limit
const int sign_margin = 12;
const int us_sign_height = 186;
@ -862,6 +863,7 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) {
}
p.restore();
}
}
// current speed
if (!(scene.hide_speed || bigMapOpen)) {

View File

@ -412,6 +412,7 @@ void ui_update_frogpilot_params(UIState *s) {
bool hide_ui_elements = screen_management && params.getBool("HideUIElements");
scene.hide_alerts = hide_ui_elements && params.getBool("HideAlerts");
scene.hide_map_icon = hide_ui_elements && params.getBool("HideMapIcon");
scene.hide_max_speed = hide_ui_elements && params.getBool("HideMaxSpeed");
scene.speed_limit_controller = scene.longitudinal_control && params.getBool("SpeedLimitController");
scene.show_slc_offset = scene.speed_limit_controller && params.getBool("ShowSLCOffset");

View File

@ -212,6 +212,7 @@ typedef struct UIScene {
bool hide_alerts;
bool hide_lead_marker;
bool hide_map_icon;
bool hide_max_speed;
bool hide_speed;
bool hide_speed_ui;
bool holiday_themes;