Navigation
Browse the developer docs

FH2 Mod Platform for .NET

Pop-ups, tips and message boxes

HUD pop-ups, tips, the game's message box, UI sounds and help text, filled with your text.

By Bartholomew Ho (qiangqiang101) · MIT license · v0.12.0 · 15 Nov 2026 · repository · original page

On this page

Pieces of the game's own UI that you fill with text: pop-ups on the HUD, tips, the game's message box, UI sounds, and the help bar and hint line of your own pages. The platform draws them in the game's look and decides when they show, so nothing you pass can break the game's screens.

New in 0.12.0. Needs FH2 Mod Platform 2.9.0 or later. On an older platform each of these does nothing and returns false (or 0), so your mod still runs there.

They're all on Mod, and they go out under your mod's name. Thread: any, unless a member says otherwise.

Pop-ups

The game's HUD notification: one of its pictures, a title and a line, bottom centre over the driving view, for about 5 seconds.

ShowPopup(new PopupOptions("Lap record") { Text = "1:02.481 at Castelletto", Icon = PopupIcon.Trophy, Sound = UiSound.Notify });
ShowPopup(New PopupOptions("Lap record") With {.Text = "1:02.481 at Castelletto", .Icon = PopupIcon.Trophy, .Sound = UiSound.Notify})
MemberWhat it does
ShowPopup(PopupOptions popup) → boolQueues it. False if it wasn't (pop-ups are off, no title; the log says which).
ShowPopup(string title, string? text = null) → boolThe same, with just a title and a line.
ClearPopup(string? key = null)Takes down your waiting pop-up key, or all your waiting ones. One on screen runs its 5 seconds.

PopupOptions

Property
TitleShown in capitals; 28 characters. Pass sentence case.
TextThe line under it; 45 characters.
KeyUp to 32 letters, digits and _. A new pop-up with the same key replaces your waiting one (a score that keeps changing, say).
IconOne of the game's nine pictures (PopupIcon.Trophy, Photo, Payout...), or none.
SoundA UiSound as it appears. None by default, as the game's own.
UrgentSomething the player must act on: first in the queue. Two a session; later ones are normal.
ReplyIt answers the player's own press (a hotkey): shown within 6 seconds or dropped.
PrivateThe text may name people: platform.log gets only your mod and the key.
ExpireSecondsDropped if it couldn't show for this long (1 to 600; default 120).

Notes

  • One queue for every mod, spaced around the game's own notifications. Up to 4 of yours wait; a 5th drops your oldest.
  • They wait while the player is in the pause menu, photo mode, a replay, loading or a cutscene. Waiting there doesn't count toward ExpireSeconds.
  • The player decides: the platform's Mod pop-ups row and the game's Minor notifications option turn every mod's off. Call DeclareUi(UiUses.Popups) in OnInit and your mod's page gets a Pop-ups row of its own.
  • UI.Notify(title, text) is the simple version: it goes out under Platform.NET's name (see UI and Hud).

Tips

A hint with a button in it, shown once rather than every session: a pop-up with your mod's name as its title, after a while of driving.

ShowTip(new TipOptions("tip_boost", "Press {button} for a boost") { Button = Prompt.ForHotkey("Boost") });
MemberWhat it does
ShowTip(TipOptions tip) → boolQueues it. False if it was seen, tips are off, or there's a button but no {button} in the text.
TipSeen(string key) → boolTrue once it has been seen, in any session.
SetTipSeen(string key, bool seen = true)Marks it seen (and drops it if it's waiting), or not seen, to show it again.

TipOptions: Key (the seen key: up to 32 letters, digits and _, so tip_boost, not tip.boost), Text (with {button}; 45 characters in all), Button (a Prompt), DelaySeconds (of driving before it shows; default 60), UntilDone (seen only when you call SetTipSeen, once the player has done it), MaxSessions (with UntilDone: shown in at most this many sessions).

  • The button is written as the player last pressed: (A) on a pad, [SPACE] on the keyboard.
  • At least 3 minutes after any other mod's tip. Which tips were seen is kept in fh2-mods\platform-seen.txt.
  • Call DeclareUi(UiUses.Tips) in OnInit if you use tips: that starts the watch on which device the player used last.

Prompts

A button shown in a tip or a page's help bar: the game's picture of it on a pad, the key on the keyboard.

Make one with
Prompt.Pad(PadGlyph.Y, "Reload", vk: 'R')A controller button, and the key to show for keyboard players.
Prompt.Key(0x20, "Jump", PadGlyph.A)A key, and the button to show for pad players.
Prompt.ForHotkey("Boost", "Boost")One of your hotkeys: whatever the player bound it to.
new Prompt { Glyph = PadGlyph.X, Word = UiWord.Toggle }The game's own word ("Toggle"), in the player's language.

Message boxes

The game's own message box over the page the player is on: a title, a message, your choices, and Back, which the platform adds.

AddPage(new PageOptions("Saves", "Saves")
{
    Selected = row => ShowMessageBox(new MessageBoxOptions("delete", "Delete it?", ["Keep it", "Delete"])
    {
        Message = "This can't be undone.",
        Chosen = c => { if (c == 1) Delete(row); },
    }),
});
MemberWhat it does
ShowMessageBox(MessageBoxOptions box) → boolShows it. Only from a callback of one of your pages, settings or title entries; false anywhere else.

MessageBoxOptions: Key, Title (30 characters), Choices (1 to 99; the safe one first, no Back of your own), Message (200 characters, wrapped), Focus (the choice the focus starts on), Chosen (gets the choice from 0, or MessageBoxOptions.Back, on the game's UI thread; it may never be called if the player leaves another way).

One box at a time, and nothing is queued.

Sounds and status

MemberWhat it does
PlaySound(UiSound sound) → boolOne of the game's UI sounds (Select, Back, Error, Notify, Shutter...). Never make a sound the only cue.
UiStatus (property, UiStatus)What works now: Popups (they can show this session), PopupsOff, TipsOff, OnScreen (the HUD is up), GameHudHidden, Keyboard (used last).
DeclareUi(UiUses uses) → boolFrom OnInit: what you use (Popups, Tips, OwnSwitch). Only honoured while the game starts; a reload keeps what the first copy said.

Your pages: help bar and hint line

MemberWhat it does
SetPageHelp(string pageKey, params Prompt[] prompts) → intThe page's help bar, beside the platform's own Back and Select. Only buttons the page can handle: A and B on a page of rows; A, B, X, Y, LB and RB on a page of your own design. Returns how many were taken.
SetPageHints(string pageKey, params string[] hints) → boolThe texts the page's hint line can show (up to 8, 80 characters each). From OnInit or the page's Opened.
ShowPageHint(string pageKey, int index, HintKind kind = HintKind.Info) → boolShows one (Info, Attention in orange, Fault in red), or none for -1.

See also

Copied from the wiki page Pop-ups-tips-and-message-boxes at commit 7396a07 · MIT license
MIT License

Copyright (c) 2026 Bartholomew Ho

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.