Visuals - Model UI - 'Unlimited' Road UI Length
Extend the display of the path, lane lines, and road edges out as far as the model can see.
This commit is contained in:
parent
4eb3e3e94b
commit
1ab138a38e
|
@ -88,7 +88,8 @@ void update_model(UIState *s,
|
|||
if (plan_position.getX().size() < model.getPosition().getX().size()) {
|
||||
plan_position = model.getPosition();
|
||||
}
|
||||
float max_distance = std::clamp(*(plan_position.getX().end() - 1),
|
||||
float max_distance = scene.unlimited_road_ui_length ? *(plan_position.getX().end() - 1) :
|
||||
std::clamp(*(plan_position.getX().end() - 1),
|
||||
MIN_DRAW_DISTANCE, MAX_DRAW_DISTANCE);
|
||||
|
||||
// update lane lines
|
||||
|
@ -410,6 +411,7 @@ void ui_update_frogpilot_params(UIState *s, Params ¶ms) {
|
|||
scene.path_edge_width = params.getInt("PathEdgeWidth");
|
||||
scene.path_width = params.getInt("PathWidth") / 10.0f * (scene.is_metric ? 1.0f : FOOT_TO_METER) / 2.0f;
|
||||
scene.road_edge_width = params.getInt("RoadEdgesWidth") * (scene.is_metric ? 1.0f : INCH_TO_CM) / 200.0f;
|
||||
scene.unlimited_road_ui_length = scene.model_ui && params.getBool("UnlimitedLength");
|
||||
|
||||
bool quality_of_life_controls = params.getBool("QOLControls");
|
||||
scene.reverse_cruise = quality_of_life_controls && params.getBool("ReverseCruise");
|
||||
|
|
|
@ -191,6 +191,7 @@ typedef struct UIScene {
|
|||
bool traffic_mode_active;
|
||||
bool turn_signal_left;
|
||||
bool turn_signal_right;
|
||||
bool unlimited_road_ui_length;
|
||||
bool use_kaofui_icons;
|
||||
bool use_si;
|
||||
bool use_vienna_slc_sign;
|
||||
|
|
Loading…
Reference in New Issue