feat(config): add SKSE Menu Framework menu#47
Conversation
There was a problem hiding this comment.
Pull request overview
Adds optional integration with SKSE Menu Framework so players can edit HoldFast settings in-game while keeping persistence in HoldFast.ini. This fits into the plugin’s startup + input interception flow by centralizing INI parsing and adding a menu-driven settings surface.
Changes:
- Refactors INI loading/parsing into a new
HoldFast::Configmodule (load/save/apply/build buttons). - Adds
HoldFastMenuUIintegration (registers a Settings page; applies changes and persists to INI). - Updates input processing to avoid Start/Back interception while the Menu Framework UI is blocking input; updates build/docs to include the new dependency and instructions.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Plugin.cpp | Switches startup config loading to HoldFast::Config and registers the menu integration. |
| src/PCH.h | Adds <filesystem> to PCH. |
| src/MenuUI.h | Declares Menu Framework integration API. |
| src/MenuUI.cpp | Implements Menu Framework registration, settings rendering, save/reload/reset, and “blocking input” detection. |
| src/InputHandler.cpp | Skips interception while the Menu Framework UI is blocking input. |
| src/Config.h | Declares settings model + config API (load/save/apply/parse/name). |
| src/Config.cpp | Implements INI read/write, action parsing, and handler application logic. |
| README.md | Documents optional in-game settings via SKSE Menu Framework. |
| docs/nexus-page.md | Mirrors README documentation for Nexus. |
| CMakeLists.txt | Adds new sources, include path for SKSE-MCP, and UNICODE defines. |
| .gitmodules | Adds lib/skse-mcp submodule. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes linker failure in PLUGIN_TESTS_ONLY build (r3369989644). ParseAction and ActionName are moved from Config.cpp into a new ConfigParsing.cpp that compiles without SKSE headers. The test target gains ConfigParsing.cpp as a source and the PLUGIN_TESTS_ONLY compile definition to guard out the logger call and PCH inclusion.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
CMakeLists.txt:28
- The unit-test target now includes config parsing/tests that pull in
Config.h→InputHandler.h, butInputHandler.hdepends on CommonLibSSE types (RE::...) and is not buildable in the currentPLUGIN_TESTS_ONLYconfiguration (which only links Catch2 and doesn’t add CommonLibSSE include paths/targets). This will breakcmake -DPLUGIN_TESTS_ONLY=ONbuilds.
Consider either (a) refactoring config parsing/types so they don’t depend on InputHandler/RE (e.g., a RE-free enum in HoldFast::Config plus mapping in the plugin), or (b) updating the tests CMake branch to add CommonLibSSE-NG (and any required compile defs/includes) so InputHandler.h can be compiled.
if(PLUGIN_TESTS_ONLY)
find_package(Catch2 3 CONFIG REQUIRED)
include(CTest)
include(Catch)
add_executable(${PROJECT_NAME}Tests test/PluginTests.cpp src/ConfigParsing.cpp)
target_compile_definitions(${PROJECT_NAME}Tests PRIVATE PLUGIN_TESTS_ONLY)
target_include_directories(${PROJECT_NAME}Tests PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_link_libraries(${PROJECT_NAME}Tests PRIVATE Catch2::Catch2WithMain)
Use SetSpaces(false) to match the existing no-space = style.
Use fmt::format with {:g} instead of SetDoubleValue to avoid the
%f six-decimal output (0.5 stays 0.5, not 0.500000).
… header Fixes two review comments (r3370054355, r3370054365, r3370054338, r3370054350). LongPressAction enum, ButtonConfig struct, and hold-duration constants are moved to src/LongPressAction.h (stdlib-only, no RE:: dependency). InputHandler.h includes it and adds using aliases so InputHandler::LongPressAction and InputHandler::ButtonConfig remain valid throughout the plugin code. Config.h replaces its InputHandler.h include with LongPressAction.h and a forward declaration of InputHandler, making config parsing headers RE-free — the PLUGIN_TESTS_ONLY build can now compile without CommonLibSSE. Also fixes None/NONE/etc triggering a spurious invalid-action warning: the guard now lowercases the raw value before comparing against 'none'.
Summary