Class GameGui
A class handling many aspects of the in-game UI.
Inheritance
Inherited Members
Namespace: Dalamud.Game.Gui
Assembly: Dalamud.dll
Syntax
public sealed class GameGui : IDisposable, IServiceType
Properties
| Improve this Doc View SourceGameUiHidden
Gets a value indicating whether the game UI is hidden.
Declaration
public bool GameUiHidden { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
HoveredAction
Gets the action ID that is current hovered by the player. 0 when no action is hovered.
Declaration
public HoveredAction HoveredAction { get; }
Property Value
| Type | Description |
|---|---|
| HoveredAction |
HoveredItem
Gets or sets the item ID that is currently hovered by the player. 0 when no item is hovered. If > 1.000.000, subtract 1.000.000 and treat it as HQ.
Declaration
public ulong HoveredItem { get; set; }
Property Value
| Type | Description |
|---|---|
| System.UInt64 |
Methods
| Improve this Doc View SourceFindAgentInterface(IntPtr)
Find the agent associated with an addon, if possible.
Declaration
public IntPtr FindAgentInterface(IntPtr addonPtr)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IntPtr | addonPtr | The addon address. |
Returns
| Type | Description |
|---|---|
| System.IntPtr | A pointer to the agent interface. |
FindAgentInterface(String)
Find the agent associated with an addon, if possible.
Declaration
public IntPtr FindAgentInterface(string addonName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | addonName | The addon name. |
Returns
| Type | Description |
|---|---|
| System.IntPtr | A pointer to the agent interface. |
FindAgentInterface(Void*)
Find the agent associated with an addon, if possible.
Declaration
public IntPtr FindAgentInterface(void *addon)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Void* | addon | The addon address. |
Returns
| Type | Description |
|---|---|
| System.IntPtr | A pointer to the agent interface. |
GetAddonByName(String, Int32)
Gets the pointer to the Addon with the given name and index.
Declaration
public IntPtr GetAddonByName(string name, int index = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name of addon to find. |
| System.Int32 | index | Index of addon to find (1-indexed). |
Returns
| Type | Description |
|---|---|
| System.IntPtr | IntPtr.Zero if unable to find UI, otherwise IntPtr pointing to the start of the addon. |
GetUIModule()
Gets a pointer to the game's UI module.
Declaration
public IntPtr GetUIModule()
Returns
| Type | Description |
|---|---|
| System.IntPtr | IntPtr pointing to UI module. |
OpenMapWithMapLink(MapLinkPayload)
Opens the in-game map with a flag on the location of the parameter.
Declaration
public bool OpenMapWithMapLink(MapLinkPayload mapLink)
Parameters
| Type | Name | Description |
|---|---|---|
| MapLinkPayload | mapLink | Link to the map to be opened. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if there were no errors and it could open the map. |
ScreenToWorld(Vector2, out Vector3, Single)
Converts screen coordinates to in-world coordinates via raycasting.
Declaration
public bool ScreenToWorld(Vector2 screenPos, out Vector3 worldPos, float rayDistance = 100000F)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Numerics.Vector2 | screenPos | Screen coordinates. |
| System.Numerics.Vector3 | worldPos | Converted coordinates. |
| System.Single | rayDistance | How far to search for a collision. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if successful. On false, worldPos's contents are undefined. |
WorldToScreen(Vector3, out Vector2)
Converts in-world coordinates to screen coordinates (upper left corner origin).
Declaration
public bool WorldToScreen(Vector3 worldPos, out Vector2 screenPos)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Numerics.Vector3 | worldPos | Coordinates in the world. |
| System.Numerics.Vector2 | screenPos | Converted coordinates. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if worldPos corresponds to a position in front of the camera and screenPos is in the viewport. |
WorldToScreen(Vector3, out Vector2, out Boolean)
Converts in-world coordinates to screen coordinates (upper left corner origin).
Declaration
public bool WorldToScreen(Vector3 worldPos, out Vector2 screenPos, out bool inView)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Numerics.Vector3 | worldPos | Coordinates in the world. |
| System.Numerics.Vector2 | screenPos | Converted coordinates. |
| System.Boolean | inView | True if screenPos corresponds to a position inside the camera viewport. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if worldPos corresponds to a position in front of the camera. |
Events
| Improve this Doc View SourceHoveredActionChanged
Event that is fired when the currently hovered action changes.
Declaration
public event EventHandler<HoveredAction> HoveredActionChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<HoveredAction> |
HoveredItemChanged
Event that is fired when the currently hovered item changes.
Declaration
public event EventHandler<ulong> HoveredItemChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<System.UInt64> |
UiHideToggled
Event which is fired when the game UI hiding is toggled.
Declaration
public event EventHandler<bool> UiHideToggled
Event Type
| Type | Description |
|---|---|
| System.EventHandler<System.Boolean> |
Explicit Interface Implementations
| Improve this Doc View SourceIDisposable.Dispose()
Disables the hooks and submodules of this module.
Declaration
void IDisposable.Dispose()