Visuals - Screen Management - Hide UI Elements - Alerts
Hide non-critical alerts on the onroad screen.
This commit is contained in:
parent
537b1124d0
commit
3a7a0310a2
@ -451,6 +451,11 @@ void OnroadAlerts::paintEvent(QPaintEvent *event) {
|
|||||||
if (alert.size == cereal::ControlsState::AlertSize::NONE) {
|
if (alert.size == cereal::ControlsState::AlertSize::NONE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (scene.hide_alerts && alert.status == cereal::ControlsState::AlertStatus::NORMAL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
static std::map<cereal::ControlsState::AlertSize, const int> alert_heights = {
|
static std::map<cereal::ControlsState::AlertSize, const int> alert_heights = {
|
||||||
{cereal::ControlsState::AlertSize::SMALL, 271},
|
{cereal::ControlsState::AlertSize::SMALL, 271},
|
||||||
{cereal::ControlsState::AlertSize::MID, 420},
|
{cereal::ControlsState::AlertSize::MID, 420},
|
||||||
|
@ -408,6 +408,10 @@ void ui_update_frogpilot_params(UIState *s) {
|
|||||||
scene.map_style = quality_of_life_visuals ? params.getInt("MapStyle") : 0;
|
scene.map_style = quality_of_life_visuals ? params.getInt("MapStyle") : 0;
|
||||||
scene.wheel_speed = quality_of_life_visuals && params.getBool("WheelSpeed");
|
scene.wheel_speed = quality_of_life_visuals && params.getBool("WheelSpeed");
|
||||||
|
|
||||||
|
bool screen_management = params.getBool("ScreenManagement");
|
||||||
|
bool hide_ui_elements = screen_management && params.getBool("HideUIElements");
|
||||||
|
scene.hide_alerts = hide_ui_elements && params.getBool("HideAlerts");
|
||||||
|
|
||||||
scene.speed_limit_controller = scene.longitudinal_control && params.getBool("SpeedLimitController");
|
scene.speed_limit_controller = scene.longitudinal_control && params.getBool("SpeedLimitController");
|
||||||
scene.show_slc_offset = scene.speed_limit_controller && params.getBool("ShowSLCOffset");
|
scene.show_slc_offset = scene.speed_limit_controller && params.getBool("ShowSLCOffset");
|
||||||
scene.show_slc_offset_ui = scene.speed_limit_controller && params.getBool("ShowSLCOffsetUI");
|
scene.show_slc_offset_ui = scene.speed_limit_controller && params.getBool("ShowSLCOffsetUI");
|
||||||
|
@ -209,6 +209,7 @@ typedef struct UIScene {
|
|||||||
bool fps_counter;
|
bool fps_counter;
|
||||||
bool full_map;
|
bool full_map;
|
||||||
bool has_auto_tune;
|
bool has_auto_tune;
|
||||||
|
bool hide_alerts;
|
||||||
bool hide_lead_marker;
|
bool hide_lead_marker;
|
||||||
bool hide_speed;
|
bool hide_speed;
|
||||||
bool hide_speed_ui;
|
bool hide_speed_ui;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user