Table of Contents

Class TimbnPluginMainMenu

Namespace
Timbn.GraveyardKeeperTwo.Core.Framework
Assembly
Timbn.GraveyardKeeperTwo.Core.dll

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

label string

The plain part, for example "Vanilla Tweaks: ".

value string

The 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

header string

The window title. The game logs an error when it is empty.

text string

The message.

Returns

IDisposable

A handle that cancels the popup if it has not shown yet. You don't need to keep it.