Repository navigation
Radio
Bartholomew Ho edited this page Nov 15, 2026
·
2 revisions
The game's car radio: what's playing, and changing the station as the D-pad does.
New in 0.12.0.
Thread: Station, Song and Artist from any thread; Next and Previous on the game's thread; Changed is raised on the game's thread.
protected override void OnInit()
{
Radio.Changed += () => UI.Notify(Radio.Station, $"{Radio.Song} - {Radio.Artist}");
AddHotkey(new HotkeyOptions("NextStation", "Next radio station", new HotkeyBinding(0x22 /* Page Down */, KeyModifiers.None, null))
{
Pressed = () => Game.Run(() => Radio.Next()),
});
}Protected Overrides Sub OnInit()
AddHandler Radio.Changed, Sub() UI.Notify(Radio.Station, $"{Radio.Song} - {Radio.Artist}")
End Sub| Member | What it does |
|---|---|
Station (property, get, string) |
The station playing, as the radio's banner names it, or "" while it's off or not known yet. |
Song (property, get, string) |
The song playing, or "". |
Artist (property, get, string) |
Who it's by, or "". |
Changed (event, Action) |
The station, the song or the artist changed. |
Next() → bool
|
The next station, as the game's D-pad right does. |
Previous() → bool
|
The station before, as D-pad left does. |
- The station, song and artist come from the radio's banner on the HUD, which the game updates about every frame while you drive. They're "" until it has run once.
- Found by ANNA-DroneMode.
Playing
Getting started
Writing mods
- Hosted or NativeAOT?
- Threads
- Reloading and debugging
- Reading game memory safely
- Pop-ups, tips and message boxes
- Translations
The FH2 classes
- Game
- Player
- Vehicle
- World
- Garage, CarCatalog, Profile
- UI and Hud
- Camera
- Audio
- ANNA
- Skills
- Radio
- Livery
- GameDb
- DebugOverlay
- Controller
- GameInput
- GameWindow
- Menus and UiElement
- SettingsTile
- ButtonIcons and Picture
- MapView, PhotoCamera, GarageCamera
More