Helper methods – UIState helpers
← 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 bool
IsLocalPlayerTypingInChat
()
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 bool
IsLocalPlayerRenamingChest
()
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 bool
IsLocalPlayerEditingASign
()
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 bool
IsLocalPlayerTypingInASearchBox
()
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 bool
IsLocalPlayerTypingSomething
()
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.
◆ Main Topics
Creating a new blank plugin
Plugin class structure
Helpful inherited members
Writing stub patch methods
Using persistent savedata
Helper methods
Top-level helpers
AssetHandling helpers
StringDrawing helpers
InputReading helpers
UIState helpers
Security level compliance
◆ Advanced Topics
Precompiling your plugin
Developing with Visual Studio
Creating a project
Embedding resources
Source code debugging