SULFUR Native UI Lib

版本 v0.10.1·更新於 2026-07-08

A native Options screen UI library for SULFUR BepInEx mods.

模組介紹 作者原文

SULFUR Native UI Lib

A native Options screen UI library for SULFUR BepInEx mods.

This library allows other modders to register custom pages inside the game's native Options screen and build native-style UI for mod configuration, debug panels, help pages, and other in-game tools.

Features

  • Native Options screen page registration
  • Custom Options categories
  • Foldout sections
  • Native-style setting rows
  • Toggle, text, number, and cycle controls
  • Themed section groups
  • Footer/status controls
  • Localization helpers
  • High-performance row updates for large config pages

For Players

This is a library mod.

It usually does nothing by itself. Install it only if another mod requires it.

For Mod Developers

Source code and full documentation are available on GitHub:

The GitHub documentation is the latest source of truth for API usage, examples, performance rules, themed groups, localization, and config editor patterns.

Installation

Install this mod with BepInEx.

Place the DLL under:

BepInEx/plugins/SULFURNativeUILib/

Recommended structure:

BepInEx/plugins/SULFURNativeUILib/

└─ SULFUR Native UI Lib.dll

Requirements

  • SULFUR
  • BepInEx 5

Source Code

The source code is available here:

The repository contains only original library source code and documentation. It does not include SULFUR game files, Unity assemblies, BepInEx binaries, paid assets, or decompiled game source.

Notes

This is a developer library. End users only need it when another mod lists it as a dependency.

Changelog

0.6.1

  • Added custom Options page registration.
  • Added basic native-style row creation helpers.
  • Added localization helper support.

0.6.2

  • Added SulfurSettingHandle.
  • Added high-performance AddSettingToggleEx, AddSettingTextEx, AddSettingNumberEx, and AddSettingCycleEx.
  • Cached sample text and native option width per page context.
  • Preserved existing AddSettingToggle, AddSettingText, AddSettingNumber, and AddSettingCycle APIs.

0.6.3

  • Added themed section group documentation standard.
  • Added guidance for large config editor pages.
  • Improved foldout hierarchy styling standard.
  • Added row-handle based update pattern for high-performance UI updates.
  • Documented that normal value edits should not rebuild the whole page.
  • Documented ASCII foldout arrows for TMP font compatibility.
  • Documented themed group border behavior and Unity Outline pitfalls.

0.7.0

  • Reworked localization loading: searches multiple folders for language files, auto-detects language files by name, merges entries from several sources, and follows the current game language.

0.7.1

Fixed

  • Fixed an issue where custom Native UI pages could disappear every second time the Options menu was opened.
  • Custom option categories are now rebuilt more safely when the game Options screen is opened again.
  • Improved custom category cleanup to avoid stale category buttons, invalid category references, or mismatched OptionsScreen state.
  • Improved custom category label refreshing so labels remain valid after the game UI is rebuilt or re-enabled.

Changed

  • Native UI custom categories are now recreated after OptionsScreen setup instead of relying on old injected category objects.
  • This should make custom pages more stable when closing and reopening the Options menu with ESC.

0.7.2

Added

  • New inline input rows for mod developers (AddInlineTextInput / AddInlineNumberInput): the label and input field sit on the same line, matching the vanilla Options layout, with optional password masking.

Fixed

  • Fixed text and option font sizes shrinking a little every time a page refreshed (for example on each edit in a config editor), until the Options screen was reopened.

0.7.3

Fixed

  • Fixed custom rows (badges, descriptions, section headers, text/number inputs) showing as blank boxes in non-English languages such as Chinese, Japanese, Korean, and Russian. They now use the game's current languag

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack

檔案與校驗

檔案名稱
SULFUR_Native_UI_Lib-0.10.1.zip
檔案大小
43.3 KiB