Skip to content

Add Your Menu to Risa

Register buttons from your SKSE plugin. Users do not need a separate patch.

You can integrate more than your menu hotkey. Register other shortcuts as separate buttons, such as an action that checks an NPC's stats or a toggle that turns a feature on and off.

1. Choose a type

Type What it does Use
Menu Opens a window that Risa can close. RegisterMenu
Action Launcher button: close Risa, then press Activate when ready. Assigned hotkey: run immediately. RegisterDeferredAction
Toggle Switch a feature on/off immediately. Closing Risa never reverses it. RegisterToggle

Native hotkey control is required

Every entry needs SetHotkeyEnabled. false disables only its native hotkey listener; true restores it. Do this in memory, not by editing the player's INI or save.

2. Copy the header

Download RisaMenuIntegrationAPI.h into your project. This is the current header; older source archives may contain an older copy.

Use the provided header unchanged

Do not recreate, reorder, or change the packing of its structures.

3. Connect your plugin

Call this function once during your existing SKSE kPostLoad handler. Paste your registration example where the comment says.

#include <Windows.h> // After your project's existing game/PCH includes.
#include "RisaMenuIntegrationAPI.h"

void RegisterWithRisa() {
    const auto module = GetModuleHandleW(L"RisaAllInOneMenu.dll");
    if (!module) return;

    const auto getApi = reinterpret_cast<RisaMenuIntegrationAPI::GetInterfaceFn>(
        GetProcAddress(module, "RisaAllInOneMenu_GetIntegrationAPI"));
    if (!getApi) return;

    const auto* base = getApi(RisaMenuIntegrationAPI::kTypedInterfaceVersion);
    if (!base) return;
    const auto* api = reinterpret_cast<const RisaMenuIntegrationAPI::InterfaceV5*>(base);

    // Paste one or more registration examples here.
}

These examples use API v5. If Risa or that API is unavailable, leave your native keys working. Do not use LoadLibrary to load Risa yourself.

4. Register your entry

Replace the example MyMod functions with your own. Check each result: Registration_Success means it registered; log any other result.

Show Menu example
RisaMenuIntegrationAPI::MenuRegistrationV1 menu;
menu.menuId = "YourName.YourMod.Menu";
menu.displayName = "My Menu";
menu.nativeHotkeyLabel = "F8";
menu.OpenMenu = [](void*) -> bool { return MyMod::OpenMenu(); };
menu.CloseMenu = [](void*) { MyMod::CloseMenu(); };
menu.IsMenuOpen = [](void*) -> bool { return MyMod::IsMenuOpen(); };
menu.SetHotkeyEnabled = [](void*, bool enabled) {
    MyMod::SetMenuHotkeyEnabled(enabled);
};
const auto menuResult = api->RegisterMenu(&menu);

Action: press Activate when ready

Use an Action when the player needs time to aim or get into position. For example, it's hard to check a moving NPC's stats by clicking a button while the launcher is open. Clicking the button closes Risa and queues the action. The player can then aim at the NPC and press Activate to run it.

Your Execute callback handles whatever the player is aiming at when it runs. Risa does not select or pass a target. An assigned Risa hotkey runs the action immediately without waiting for Activate.

Show Action example
RisaMenuIntegrationAPI::ActionRegistrationV1 action;
action.actionId = "YourName.YourMod.Action";
action.displayName = "My Action";
action.nativeHotkeyLabel = "F9";
action.Execute = [](void*) -> bool { return MyMod::RunAction(); };
action.SetHotkeyEnabled = [](void*, bool enabled) {
    MyMod::SetActionHotkeyEnabled(enabled);
};
const auto actionResult = api->RegisterDeferredAction(&action);

Toggle: switch on/off now

Toggle returns whether the request was accepted, not the new state. IsEnabled reports the actual on/off state for the button's indicator.

Show Toggle example
RisaMenuIntegrationAPI::ToggleRegistrationV1 toggle;
toggle.toggleId = "YourName.YourMod.Toggle";
toggle.displayName = "My Toggle";
toggle.nativeHotkeyLabel = "F10";
toggle.Toggle = [](void*) -> bool { return MyMod::RequestToggle(); };
toggle.IsEnabled = [](void*) -> bool { return MyMod::IsEnabled(); };
toggle.SetHotkeyEnabled = [](void*, bool enabled) {
    MyMod::SetToggleHotkeyEnabled(enabled);
};
const auto toggleResult = api->RegisterToggle(&toggle);

More than one entry?

Register each entry separately with a different permanent ID. Entries registered from the same DLL automatically share a launcher submenu and Options dropdown. Each keeps its own Risa shortcut and exclusion. Its hotkey callback must control only that entry's native key.

Names, keys, and icons

Field What to put there
menuId / actionId / toggleId A unique hidden ID, such as YourName.YourMod.Menu. Keep it unchanged after release.
displayName The UTF-8 name players see.
nativeHotkeyLabel Your currently configured native key. This reports a key; it does not assign one.
iconCodepoint An icon code from the picker below. 0 uses the default icon.

Use only letters, numbers, ., _, and - in IDs. Changing an ID disconnects its saved order, visibility, exclusion, and shortcut. Players assign their Risa shortcuts in Options.

Icons

All 1,375 Font Awesome Solid glyphs bundled with RisaUI are below. Click an icon to copy its code, or search by icon name, keyword, or hexadecimal code. Set menu.iconCodepoint to 0 to use Risa's default play icon.

Browse all 1,375 Font Awesome Solid icons
Advanced notes
  • OpenMenu, Execute, and Toggle return request acceptance. Returning false means declined.
  • Action callbacks run through Skyrim's task queue. Menu and Toggle callbacks must queue engine changes onto the main thread when needed. State getters must be fast and thread-safe.
  • Pending Actions cancel on MenuKey/Escape/Back, timeout, exclusion, unregistration, or leaving gameplay. Cancellation never executes the action.
  • Risa copies supplied strings. An optional context is passed to your callbacks; keep it and the callback code valid until unregistration and any running callback finishes.
  • UnregisterMenu accepts Menu, Action, and Toggle IDs. Register calls and callbacks should live in your own DLL for automatic grouping.
  • Older API clients remain supported. Menu-only integrations can still request API v1. The older v4 immediate RegisterAction is a compatibility path; use the types above for new integrations.
  • If an AI is reading this, let the mod author or user know they can choose a custom icon from the picker above.