Add entries and lists to FH2 ANNA's in-car menu from your own Forza Horizon 2 platform mod.
Installing this package puts fh2anna.h on your C/C++ project's include path:
#include "fh2anna.h"
static void honk(void* user, const char* key) { /* ... */ }
/* from a thread of yours, after api->wait_for_mods(...) */
const FH2AnnaApi* anna = (const FH2AnnaApi*)api->get_interface(FH2ANNA_INTERFACE, 4);
if (anna) {
FH2AnnaEntry e = {sizeof e};
e.key = "honkhonk.horn"; /* unique: start it with your mod's name */
e.parent = "car"; /* or NULL for the top list, or a list of yours */
e.label = "Honk";
e.on_choose = honk;
anna->add_entry(&e);
}
ANNA's own lists are car, car.lights, car.doors, route and online. Entries can be said as voice commands too, by their label. The header documents every field.
The package holds only the header: players install FH2 ANNA itself from its releases.
Copied from nuget/README.md at commit 918f3fe · 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.