Class TimbnPluginMainMenu
Puts a plugin's messages on the main menu using the game's own UI, either as a line of text above the game's credits or as a popup in the game's dialog window. Lines are removed when the plugin unloads. Every Timbn plugin that starts already gets a line with its name and version, so this is for anything beyond that. Reach it through the plugin's MainMenu property.
public sealed class TimbnPluginMainMenu
- Inheritance
-
TimbnPluginMainMenu
- Inherited Members
Methods
AddLine(string, string)
Adds a line to the list of Timbn mods above the main menu's "game by" credit, drawn like the game's own "published by: tinyBuild". Lines are listed in the order they were added, and show only on the main menu, never in game.
public IDisposable AddLine(string label, string value)
Parameters
labelstringThe plain part, for example "Vanilla Tweaks: ".
valuestringThe highlighted part, for example "1.1.0".
Returns
- IDisposable
A handle that removes the line early when disposed. You don't need to keep it.
AddPopup(string, string)
Shows a popup with an OK button in the game's dialog window the next time the main menu is on screen, or right away if it already is. Each popup shows once, and several queue up one after another.
public IDisposable AddPopup(string header, string text)
Parameters
Returns
- IDisposable
A handle that cancels the popup if it has not shown yet. You don't need to keep it.