void FlightSetupPanel::SetBallast() { const bool ballastable = polar_settings.glide_polar_task.IsBallastable(); SetRowVisible(Ballast, ballastable); if (ballastable) LoadValue(Ballast, polar_settings.glide_polar_task.GetBallastLitres()); const fixed wl = polar_settings.glide_polar_task.GetWingLoading(); SetRowVisible(WingLoading, positive(wl)); if (positive(wl)) LoadValue(WingLoading, wl); if (device_blackboard != NULL) { const Plane &plane = CommonInterface::GetComputerSettings().plane; if (positive(plane.dry_mass)) { fixed fraction = polar_settings.glide_polar_task.GetBallast(); fixed overload = (plane.dry_mass + fraction * plane.max_ballast) / plane.dry_mass; MessageOperationEnvironment env; device_blackboard->SetBallast(fraction, overload, env); } } }
void SymbolsConfigPanel::ShowTrailControls(bool show) { SetRowVisible(TRAIL_DRIFT, show); SetRowVisible(TRAIL_TYPE, show); SetRowVisible(TRAIL_WIDTH, show); }
void FlightSetupPanel::SetBallast() { const bool ballastable = polar_settings.glide_polar_task.IsBallastable(); SetRowVisible(Ballast, ballastable); if (ballastable) LoadValue(Ballast, polar_settings.glide_polar_task.GetBallastLitres()); const auto wl = polar_settings.glide_polar_task.GetWingLoading(); SetRowVisible(WingLoading, wl > 0); if (wl > 0) LoadValue(WingLoading, wl, UnitGroup::WING_LOADING); if (device_blackboard != NULL) { const Plane &plane = CommonInterface::GetComputerSettings().plane; if (plane.dry_mass > 0) { auto fraction = polar_settings.glide_polar_task.GetBallast(); auto overload = (plane.dry_mass + fraction * plane.max_ballast) / plane.dry_mass; MessageOperationEnvironment env; device_blackboard->SetBallast(fraction, overload, env); } } }
void SymbolsConfigPanel::ShowTrailControls(bool show) { SetRowVisible(TrailDrift, show); SetRowVisible(SnailType, show); SetRowVisible(SnailWidthScale, show); }
void WaypointDisplayConfigPanel::UpdateVisibilities() { bool visible = GetValueBoolean(AppUseSWLandablesRendering); SetRowVisible(AppLandableRenderingScale, visible); SetRowVisible(AppScaleRunwayLength, visible); }
void DeviceEditWidget::UpdateVisibilities() { const DeviceConfig::PortType type = GetPortType(GetDataField(Port)); const bool maybe_bluetooth = DeviceConfig::MaybeBluetooth(type, GetDataField(Port).GetAsString()); const bool k6bt = maybe_bluetooth && GetValueBoolean(K6Bt); const bool uses_speed = DeviceConfig::UsesSpeed(type) || k6bt; SetRowAvailable(BaudRate, uses_speed); SetRowAvailable(BulkBaudRate, uses_speed && DeviceConfig::UsesDriver(type)); SetRowVisible(BulkBaudRate, uses_speed && DeviceConfig::UsesDriver(type) && SupportsBulkBaudRate(GetDataField(Driver))); SetRowAvailable(IP_ADDRESS, DeviceConfig::UsesIPAddress(type)); SetRowAvailable(TCPPort, DeviceConfig::UsesTCPPort(type)); SetRowAvailable(I2CBus, DeviceConfig::UsesI2C(type)); SetRowAvailable(I2CAddr, DeviceConfig::UsesI2C(type) && type != DeviceConfig::PortType::NUNCHUCK); SetRowAvailable(PressureUsage, DeviceConfig::IsPressureSensor(type)); SetRowVisible(Driver, DeviceConfig::UsesDriver(type)); SetRowVisible(SyncFromDevice, DeviceConfig::UsesDriver(type) && CanReceiveSettings(GetDataField(Driver))); SetRowVisible(SyncToDevice, DeviceConfig::UsesDriver(type) && CanSendSettings(GetDataField(Driver))); SetRowAvailable(K6Bt, maybe_bluetooth); }
void AirspaceConfigPanel::ShowWarningControls(bool visible) { SetRowVisible(WarningDialog, visible); SetRowVisible(WarningTime, visible); SetRowVisible(RepetitiveSound, visible); SetRowVisible(AcknowledgeTime, visible); }
void AirspaceConfigPanel::ShowDisplayControls(AirspaceDisplayMode mode) { SetRowVisible(ClipAltitude, mode == AirspaceDisplayMode::CLIP); SetRowVisible(AltWarningMargin, mode == AirspaceDisplayMode::AUTO || mode == AirspaceDisplayMode::ALLBELOW); }
void TerrainDisplayConfigPanel::ShowTerrainControls() { bool show = terrain_settings.enable; SetRowVisible(TerrainColors, show); SetRowVisible(TerrainSlopeShading, show); SetRowVisible(TerrainContrast, show); SetRowVisible(TerrainBrightness, show); if (terrain != NULL) SetRowVisible(TerrainPreview, show); }
void TaskCalculatorPanel::Refresh() { const auto &calculated = CommonInterface::Calculated(); const TaskStats &task_stats = calculated.ordered_task_stats; TCHAR buffer[32]; if (target_button != nullptr) target_button->SetVisible(task_stats.has_targets); SetRowVisible(AAT_TIME, task_stats.has_targets); if (task_stats.has_targets) { FormatTimespanSmart(buffer, (int)protected_task_manager->GetOrderedTaskSettings().aat_min_time, 2); SetText(AAT_TIME, buffer); } FormatTimespanSmart(buffer, (int)task_stats.GetEstimatedTotalTime(), 2); SetText(AAT_ESTIMATED, buffer); fixed rPlanned = task_stats.total.solution_planned.IsDefined() ? task_stats.total.solution_planned.vector.distance : fixed(0); if (positive(rPlanned)) LoadValue(DISTANCE, rPlanned, UnitGroup::DISTANCE); else ClearValue(DISTANCE); LoadValue(MC, CommonInterface::GetComputerSettings().polar.glide_polar_task.GetMC(), UnitGroup::VERTICAL_SPEED); LoadValue(EFFECTIVE_MC, emc, UnitGroup::VERTICAL_SPEED); if (positive(rPlanned)) { fixed rMax = task_stats.distance_max; fixed rMin = task_stats.distance_min; if (rMin < rMax) { fixed range = Double((rPlanned - rMin) / (rMax - rMin)) - fixed(1); LoadValue(RANGE, range * 100); } else ClearValue(RANGE); } else ClearValue(RANGE); if (task_stats.total.remaining_effective.IsDefined()) LoadValue(SPEED_REMAINING, task_stats.total.remaining_effective.GetSpeed(), UnitGroup::TASK_SPEED); else ClearValue(SPEED_REMAINING); if (task_stats.total.travelled.IsDefined()) LoadValue(SPEED_ACHIEVED, task_stats.total.travelled.GetSpeed(), UnitGroup::TASK_SPEED); else ClearValue(SPEED_ACHIEVED); LoadValue(CRUISE_EFFICIENCY, task_stats.cruise_efficiency * 100); }
void GaugesConfigPanel::OnModified(DataField &df) { if (IsDataField(FinalGlideBarDisplayModeControl, df)) { const DataFieldEnum &dfe = (const DataFieldEnum &)df; FinalGlideBarDisplayMode fgbdm = (FinalGlideBarDisplayMode)dfe.GetValue(); SetRowVisible(EnableFinalGlideBarMC0, fgbdm != FinalGlideBarDisplayMode::OFF); } }
void MapDisplayConfigPanel::UpdateVisibilities() { auto orientation = (MapOrientation)GetValueInteger(OrientationCruise); SetRowVisible(MAP_SHIFT_BIAS, orientation == MapOrientation::NORTH_UP || orientation == MapOrientation::WIND_UP); }
void DeviceEditWidget::UpdateVisibilities() { const DeviceConfig::PortType type = GetPortType(GetDataField(Port)); SetRowAvailable(BaudRate, DeviceConfig::UsesSpeed(type)); SetRowAvailable(BulkBaudRate, DeviceConfig::UsesSpeed(type) && DeviceConfig::UsesDriver(type)); SetRowVisible(BulkBaudRate, DeviceConfig::UsesSpeed(type) && DeviceConfig::UsesDriver(type) && SupportsBulkBaudRate(GetDataField(Driver))); SetRowAvailable(TCPPort, DeviceConfig::UsesTCPPort(type)); SetRowVisible(Driver, DeviceConfig::UsesDriver(type)); SetRowVisible(SyncFromDevice, DeviceConfig::UsesDriver(type) && CanReceiveSettings(GetDataField(Driver))); SetRowVisible(SyncToDevice, DeviceConfig::UsesDriver(type) && CanSendSettings(GetDataField(Driver))); SetRowVisible(IgnoreCheckSum, DeviceConfig::UsesDriver(type)); }
void TaskStatusPanel::Refresh() { if (protected_task_manager == NULL) return; const DerivedInfo &calculated = CommonInterface::Calculated(); const TaskStats &task_stats = calculated.ordered_task_stats; TCHAR Temp[80]; SetRowVisible(TaskTime, task_stats.has_targets); if (task_stats.has_targets) { FormatSignedTimeHHMM(Temp, (int)protected_task_manager->GetOrderedTaskSettings().aat_min_time); SetText(TaskTime, Temp); } int ete_time(task_stats.GetEstimatedTotalTime()); FormatSignedTimeHHMM(Temp, ete_time); SetText(ETETime, Temp); FormatSignedTimeHHMM(Temp, (int)task_stats.total.time_remaining_now); SetText(RemainingTime, Temp); if (task_stats.total.planned.IsDefined()) { FormatUserDistanceSmart(task_stats.total.planned.GetDistance(), Temp, ARRAY_SIZE(Temp)); SetText(TaskDistance, Temp); } else SetText(TaskDistance, _T("")); if (task_stats.total.remaining.IsDefined()) { FormatUserDistanceSmart(task_stats.total.remaining.GetDistance(), Temp, ARRAY_SIZE(Temp)); SetText(RemainingDistance, Temp); } if (task_stats.total.planned.IsDefined()) { FormatUserTaskSpeed(task_stats.total.planned.GetSpeed(), Temp, ARRAY_SIZE(Temp)); SetText(EstimatedSpeed, Temp); } else SetText(EstimatedSpeed, _T("")); if (task_stats.total.travelled.IsDefined()) { FormatUserTaskSpeed(task_stats.total.travelled.GetSpeed(), Temp, ARRAY_SIZE(Temp)); SetText(AverageSpeed, Temp); } else SetText(AverageSpeed, _T("")); }
void WindSettingsPanel::UpdateVector() { if (!edit_manual_wind) return; const DerivedInfo &calculated = CommonInterface::Calculated(); const WindSettings &settings = CommonInterface::SetComputerSettings().wind; const TCHAR *source = nullptr; switch (manual_modified ? DerivedInfo::WindSource::MANUAL : calculated.wind_source) { case DerivedInfo::WindSource::NONE: source = _("None"); break; case DerivedInfo::WindSource::MANUAL: source = _("Manual"); break; case DerivedInfo::WindSource::CIRCLING: source = _("Circling"); break; case DerivedInfo::WindSource::EKF: source = _("ZigZag"); break; case DerivedInfo::WindSource::EXTERNAL: source = _("External"); break; } SetText(SOURCE, source); if (!manual_modified && !settings.manual_wind_available) { SpeedVector wind = CommonInterface::Calculated().GetWindOrZero(); LoadValue(Speed, Units::ToUserWindSpeed(wind.norm)); LoadValue(Direction, wind.bearing); } const bool visible = settings.manual_wind_available; if (clear_manual_button) SetRowVisible(CLEAR_MANUAL_BUTTON, visible); else if (clear_manual_window != nullptr) clear_manual_window->SetVisible(visible); }
void TaskCalculatorPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { assert(protected_task_manager != nullptr); instance = this; Add(new TextWidget()); SetRowVisible(WARNING, false); AddReadOnly(_("Assigned task time")); AddReadOnly(_("Estimated task time")); AddReadOnly(_("Task distance"), nullptr, _T("%.0f %s"), UnitGroup::DISTANCE, fixed(0)); AddFloat(_("Set MacCready"), _("Adjusts MC value used in the calculator. " "Use this to determine the effect on estimated task time due to changes in conditions. " "This value will not affect the main computer's setting if the dialog is exited with the Cancel button."), _T("%.1f %s"), _T("%.1f"), fixed(0), Units::ToUserVSpeed(fixed(5)), GetUserVerticalSpeedStep(), false, fixed(0), this); DataFieldFloat &mc_df = (DataFieldFloat &)GetDataField(MC); mc_df.SetFormat(GetUserVerticalSpeedFormat(false, false)); AddReadOnly(_("AAT range"), /* xgettext:no-c-format */ _("For AAT tasks, this value tells you how far based on the targets of your task you will fly relative to the minimum and maximum possible tasks. -100% indicates the minimum AAT distance. 0% is the nominal AAT distance. +100% is maximum AAT distance."), _T("%.0f %%"), fixed(0)); AddReadOnly(_("Speed remaining"), nullptr, _T("%.0f %s"), UnitGroup::TASK_SPEED, fixed(0)); AddReadOnly(_("Achieved MacCready"), nullptr, _T("%.1f %s"), UnitGroup::VERTICAL_SPEED, fixed(0)); DataFieldFloat &emc_df = (DataFieldFloat &)GetDataField(EFFECTIVE_MC); emc_df.SetFormat(GetUserVerticalSpeedFormat(false, false)); AddReadOnly(_("Achieved speed"), nullptr, _T("%.0f %s"), UnitGroup::TASK_SPEED, fixed(0)); AddFloat(_("Cruise efficiency"), _("Efficiency of cruise. 100 indicates perfect MacCready performance, greater than 100 indicates better than MacCready performance is achieved through flying in streets. Less than 100 is appropriate if you fly considerably off-track. This value estimates your cruise efficiency according to the current flight history with the set MC value. Calculation begins after task is started."), _T("%.0f %%"), _T("%.0f"), fixed(0), fixed(100), fixed(1), false, fixed(0), this); }
void GaugesConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { const UISettings &ui_settings = CommonInterface::GetUISettings(); const MapSettings &map_settings = CommonInterface::GetMapSettings(); RowFormWidget::Prepare(parent, rc); AddBoolean(_("FLARM radar"), _("This enables the display of the FLARM radar gauge. The track bearing of the target relative to the track bearing of the aircraft is displayed as an arrow head, and a triangle pointing up or down shows the relative altitude of the target relative to you. In all modes, the color of the target indicates the threat level."), ui_settings.traffic.enable_gauge); AddBoolean(_("Auto close FLARM"), _("Setting this to \"On\" will automatically close the FLARM dialog if there is no traffic. \"Off\" will keep the dialog open even without current traffic."), ui_settings.traffic.auto_close_dialog); SetExpertRow(AutoCloseFlarmDialog); AddBoolean(_("Thermal assistant"), _("This enables the display of the thermal assistant gauge."), ui_settings.enable_thermal_assistant_gauge); AddBoolean(_("Thermal band"), _("This enables the display of the thermal profile (climb band) display on the map."), map_settings.show_thermal_profile); AddEnum(_("Final glide bar"), _("If set to \"On\" the final glide will always be shown, if set to \"Auto\" it will be shown when approaching the final glide possibility."), final_glide_bar_display_mode_list, (unsigned)map_settings.final_glide_bar_display_mode, this); SetExpertRow(FinalGlideBarDisplayModeControl); AddBoolean(_("Final glide bar MC0"), _("If set to ON the final glide bar will show a second arrow indicating the required height " "to reach the final waypoint at MC zero."), map_settings.final_glide_bar_mc0_enabled); SetExpertRow(EnableFinalGlideBarMC0); SetRowVisible(EnableFinalGlideBarMC0, map_settings.final_glide_bar_display_mode != FinalGlideBarDisplayMode::OFF); AddBoolean(_("Vario bar"), _("If set to ON the vario bar will be shown"), map_settings.vario_bar_enabled); SetExpertRow(EnableVarioBar); }
void PlanePolarWidget::UpdateInvalidLabel() { PolarShapeEditWidget &widget = GetShapeEditor(); bool changed = false; bool valid = widget.Save(changed) && widget.GetPolarShape().IsValid(); bool visible = !valid; SetRowVisible(INVALID, visible); if (visible) { TextWidget &widget = (TextWidget &)GetRowWidget(INVALID); widget.SetText(_("Invalid")); widget.SetColor(COLOR_RED); } }
void LayoutConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { const UISettings &ui_settings = CommonInterface::GetUISettings(); RowFormWidget::Prepare(parent, rc); AddEnum(_("Display orientation"), NULL, display_orientation_list, (unsigned)ui_settings.display.orientation); SetRowVisible(DisplayOrientation, Display::RotateSupported()); AddEnum(_("InfoBox geometry"), _("A list of possible InfoBox layouts. Do some trials to find the best for your screen size."), info_box_geometry_list, (unsigned)ui_settings.info_boxes.geometry); AddEnum(_("FLARM display"), NULL, flarm_display_location_list, (unsigned)ui_settings.traffic.gauge_location); SetExpertRow(AppFlarmLocation); AddEnum(_("Tab dialog style"), NULL, tabdialog_style_list, (unsigned)ui_settings.dialog.tab_style); AddEnum(_("Message display"), NULL, popup_msg_position_list, ui_settings.popup_message_position); SetExpertRow(AppStatusMessageAlignment); AddEnum(_("Dialog size"), NULL, dialog_style_list, ui_settings.dialog.dialog_style); SetExpertRow(DialogStyle); AddBoolean(_("Inverse InfoBoxes"), _("If true, the InfoBoxes are white on black, otherwise black on white."), ui_settings.info_boxes.inverse); SetExpertRow(AppInverseInfoBox); AddBoolean(_("Colored InfoBoxes"), _("If true, certain InfoBoxes will have coloured text. For example, the active waypoint " "InfoBox will be blue when the glider is above final glide."), ui_settings.info_boxes.use_colors); SetExpertRow(AppInfoBoxColors); AddEnum(_("InfoBox border"), NULL, infobox_border_list, ui_settings.info_boxes.border_style); SetExpertRow(AppInfoBoxBorder); }
void PlanePolarWidget::Prepare(ContainerWindow &parent, const PixelRect &rc) { AddReadOnly(_("Name"), nullptr, plane.polar_name); Add(new TextWidget()); SetRowVisible(INVALID, false); Add(new PolarShapeEditWidget(plane.polar_shape, this)); AddFloat(_("Reference Mass"), nullptr, _T("%.0f kg"), _T("%.0f"), fixed(0), fixed(1000), fixed(5), false, plane.reference_mass); AddFloat(_("Dry Mass"), nullptr, _T("%.0f kg"), _T("%.0f"), fixed(0), fixed(1000), fixed(5), false, plane.dry_mass); }
void PlanePolarWidget::Prepare(ContainerWindow &parent, const PixelRect &rc) { AddReadOnly(_("Name"), nullptr, plane.polar_name); Add(new TextWidget()); SetRowVisible(INVALID, false); Add(new PolarShapeEditWidget(plane.polar_shape, this)); AddFloat(_("Reference Mass"), _("Reference mass of the polar"), _T("%.0f %s"), _T("%.0f"), 0, 1000, 5, false, UnitGroup::MASS, plane.reference_mass); AddFloat(_("Dry Mass"), _("Dry all-up flying mass of your plane"), _T("%.0f %s"), _T("%.0f"), 0, 1000, 5, false, UnitGroup::MASS, plane.dry_mass); }
void TaskCalculatorPanel::Show(const PixelRect &rc) { const GlidePolar &polar = CommonInterface::GetComputerSettings().polar.glide_polar_task; cruise_efficiency = polar.GetCruiseEfficiency(); emc = CommonInterface::Calculated().ordered_task_stats.effective_mc; Refresh(); CommonInterface::GetLiveBlackboard().AddListener(*this); RowFormWidget::Show(rc); const bool modified = instance->IsTaskModified(); SetRowVisible(WARNING, modified); if (modified) { TextWidget &widget = (TextWidget &)GetRowWidget(WARNING); widget.SetText(_("Calculator excludes unsaved task changes!")); widget.SetColor(COLOR_RED); } }
void TaskPropertiesPanel::RefreshView() { const TaskFactoryType ftype = ordered_task->GetFactoryType(); const OrderedTaskBehaviour &p = ordered_task->GetOrderedTaskBehaviour(); bool aat_types = (ftype == TaskFactoryType::AAT); bool fai_start_finish = p.fai_finish; SetRowVisible(MIN_TIME, aat_types); LoadValueTime(MIN_TIME, (int)p.aat_min_time); SetRowVisible(START_MAX_SPEED, !fai_start_finish); LoadValue(START_MAX_SPEED, p.start_max_speed, UnitGroup::HORIZONTAL_SPEED); SetRowVisible(START_MAX_HEIGHT, !fai_start_finish); LoadValue(START_MAX_HEIGHT, fixed(p.start_max_height), UnitGroup::ALTITUDE); SetRowVisible(START_HEIGHT_REF, !fai_start_finish); LoadValueEnum(START_HEIGHT_REF, p.start_max_height_ref); SetRowVisible(FINISH_MIN_HEIGHT, !fai_start_finish); LoadValue(FINISH_MIN_HEIGHT, fixed(p.finish_min_height), UnitGroup::ALTITUDE); SetRowVisible(FINISH_HEIGHT_REF, !fai_start_finish); LoadValueEnum(FINISH_HEIGHT_REF, p.finish_min_height_ref); LoadValue(FAI_FINISH_HEIGHT, p.fai_finish); LoadValueEnum(TASK_TYPE, ftype); if (wTaskView != NULL) wTaskView->Invalidate(); // fixed aat_min_time // finish_min_height }
void AirspaceConfigPanel::ShowWarningControls(bool visible) { SetRowVisible(WarningTime, visible); SetRowVisible(AcknowledgeTime, visible); }
void RouteConfigPanel::ShowReachControls(bool show) { SetRowVisible(FinalGlideTerrain, show); SetRowVisible(ReachPolarMode, show); }
void InterfaceConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { const UISettings &settings = CommonInterface::GetUISettings(); RowFormWidget::Prepare(parent, rc); buttonFonts = ConfigPanel::GetExtraButton(1); assert(buttonFonts); #ifdef HAVE_BLANK AddBoolean(_("Auto. blank"), _("This determines whether to blank the display after a long period of inactivity " "when operating on internal battery power."), settings.display.enable_auto_blank); #endif AddFileReader(_("Events"), _("The Input Events file defines the menu system and how XCSoar responds to " "button presses and events from external devices."), szProfileInputFile, _T("*.xci\0")); SetExpertRow(InputFile); #ifndef HAVE_NATIVE_GETTEXT WndProperty *wp; wp = AddEnum(_("Language"), _("The language options selects translations for English texts to other " "languages. Select English for a native interface or Automatic to localise " "XCSoar according to the system settings.")); if (wp != NULL) { DataFieldEnum &df = *(DataFieldEnum *)wp->GetDataField(); df.addEnumText(_("Automatic")); df.addEnumText(_("English")); #ifdef HAVE_BUILTIN_LANGUAGES for (const struct builtin_language *l = language_table; l->resource != NULL; ++l) df.addEnumText(l->resource); #endif LanguageFileVisitor lfv(df); VisitDataFiles(_T("*.mo"), lfv); df.Sort(2); TCHAR value[MAX_PATH]; if (!Profile::GetPath(szProfileLanguageFile, value)) value[0] = _T('\0'); if (_tcscmp(value, _T("none")) == 0) df.Set(1); else if (!StringIsEmpty(value) && _tcscmp(value, _T("auto")) != 0) { const TCHAR *base = BaseName(value); if (base != NULL) df.SetAsString(base); } wp->RefreshDisplay(); } #endif /* !HAVE_NATIVE_GETTEXT */ AddFileReader(_("Status message"), _("The status file can be used to define sounds to be played when certain " "events occur, and how long various status messages will appear on screen."), szProfileStatusFile, _T("*.xcs\0")); SetExpertRow(StatusFile); AddTime(_("Menu timeout"), _("This determines how long menus will appear on screen if the user does not make any button " "presses or interacts with the computer."), 1, 60, 1, settings.menu_timeout / 2); SetExpertRow(MenuTimeout); static gcc_constexpr_data StaticEnumChoice text_input_list[] = { { (unsigned)DialogSettings::TextInputStyle::Default, N_("Default") }, { (unsigned)DialogSettings::TextInputStyle::Keyboard, N_("Keyboard") }, { (unsigned)DialogSettings::TextInputStyle::HighScore, N_("HighScore Style") }, { 0 } }; AddEnum(_("Text input style"), _("Determines how the user is prompted for text input (filename, teamcode etc.)"), text_input_list, (unsigned)settings.dialog.text_input_style); SetExpertRow(TextInput); /* on-screen keyboard doesn't work without a pointing device (mouse or touch screen), hide the option on Altair */ SetRowVisible(TextInput, HasPointer()); #ifdef HAVE_VIBRATOR static gcc_constexpr_data StaticEnumChoice haptic_feedback_list[] = { { (unsigned) UISettings::HapticFeedback::Default, N_("OS settings") }, { (unsigned) UISettings::HapticFeedback::Off, N_("Off") }, { (unsigned) UISettings::HapticFeedback::On, N_("On") }, { 0 } }; wp = AddEnum(_("Haptic feedback"), _("Determines if haptic feedback like vibration is used."), haptic_feedback_list, (unsigned)settings.haptic_feedback); SetExpertRow(HapticFeedback); #endif /* HAVE_VIBRATOR */ }
void ShowRow(unsigned i) { SetRowVisible(i, true); }
void HideRow(unsigned i) { SetRowVisible(i, false); }
void MapDisplayConfigPanel::UpdateVisibilities() { SetRowVisible(MapShiftBias, GetValueInteger(OrientationCruise) == NORTHUP); }
void RouteConfigPanel::ShowRouteControls(bool show) { SetRowVisible(RoutePlannerAllowClimb, show); SetRowVisible(RoutePlannerUseCeiling, show); }