You are viewing a potentially older version of this package. View all versions.
Bobbie-MTDUI-1.0.1 icon

MTDUI

A simple UI library for 20 Minutes Till Dawn.

Date uploaded 4 years ago
Version 1.0.1
Download link Bobbie-MTDUI-1.0.1.zip
Downloads 259
Dependency string Bobbie-MTDUI-1.0.1

This mod requires the following mods to function

BepInExPackMTD-BepInExPack_20MTD-1.0.0 icon
BepInExPackMTD-BepInExPack_20MTD

BepInEx pack for 20 Minutes Till Dawn.

Preferred version: 1.0.0

README

MTDUI

A simple UI library for 20 Minutes Till Dawn.

For Developers

MTDUI is primarily meant to be used in conjunction with the BepInEx configuration system.

NOTE: MTDUI is still in early development, and as such only currently supports a few types of config options:

ConfigEntry Type Supported
Enum
Int
Float
Bool
String
Others?

Support for new ConfigEntry types will be added as the library matures.

Example Usage

// Create a new configuration file using the BepInEx config system
var customFile = new ConfigFile(Path.Combine(Paths.ConfigPath, "GameSpeed.cfg"), true);

// Add a config option
var gameSpeed = customFile.Bind("General", "Game Speed", 1, "The speed at which the game runs.");

// Register the config option with MTDUI's in-game mod settings
// 1, 2, 3, 4, 5, and 10 are valid options that can be selected
ModOptions.Register(gameSpeed, new List<int>(){ 1, 2, 3, 4, 5, 10 })

// gameSpeed should now be updated when changed in the ingame UI (or when the cfg file is manually modified)
// Use gameSpeed.Value when you want to actually use the value

For more information on how the BepInEx config system works, check out the official documentation.