Helper methods – UIState helpers - TiberiumFusion/TTPlugins GitHub Wiki

Back to the Helper methods overview article.


These helpers are located in the nested HHelpers.UIState class and provide information about how the local player is currently interacting with the ingame gui.

All helper methods are static.


Method boolIsLocalPlayerTypingInChat()

Returns true if the local player is currently typing something in chat, returns false otherwise.

Example usage:

if (HHelpers.UIState.IsLocalPlayerTypingInChat())
{
	Debug.WriteLine("The local player is typing something in chat.");
}

Method boolIsLocalPlayerRenamingChest()

Returns true if the local player is currently renaming a chest, returns false otherwise.

Example usage:

if (HHelpers.UIState.IsLocalPlayerRenamingChest())
{
	Debug.WriteLine("The local player is renaming a chest right now.");
}

Method boolIsLocalPlayerEditingASign()

Returns true if the local player is currently editing a sign's text, returns false otherwise.

Example usage:

if (HHelpers.UIState.IsLocalPlayerEditingASign())
{
	Debug.WriteLine("The local player is editing some sign text.");
}

Method boolIsLocalPlayerTypingInASearchBox()

Returns true if the local player is currently typing something into a search box, such as the Bestiary's search box. Returns false otherwise.

Example usage:

if (HHelpers.UIState.IsLocalPlayerTypingInASearchBox())
{
	Debug.WriteLine("The local player is using a search box right now.");
}

Method boolIsLocalPlayerTypingSomething()

Returns true if the local player is typing something into any kind of gui textbox, including chat, chest names, sign text, and search boxes. Returns false otherwise.

TIP: This helper is a good way to detect if the local player is currently using some gui and should not be triggering hotkey combinations.

Example usage:

if (HHelpers.UIState.IsLocalPlayerTypingSomething())
{
	// don't do hotkey checks
}
else
{
	if (HHelpers.InputReading.IsKeyComboDown(Keys.A, Keys.LeftControl)))
	{
		// do something
	}
}

Back to the Helper methods overview article.