Skip to main content

Interface IGameGui

A class handling many aspects of the in-game UI.

Assembly: Dalamud.dll
View Source
Declaration
public interface IGameGui

Properties

GameUiHidden

Gets a value indicating whether the game UI is hidden.

View Source
Declaration
bool GameUiHidden { get; }

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.

View Source
Declaration
ulong HoveredItem { get; set; }

HoveredAction

Gets the action ID that is current hovered by the player. 0 when no action is hovered.

View Source
Declaration
HoveredAction HoveredAction { get; }

Methods

OpenMapWithMapLink(MapLinkPayload)

Opens the in-game map with a flag on the location of the parameter.

View Source
Declaration
bool OpenMapWithMapLink(MapLinkPayload mapLink)
Returns

System.Boolean: True if there were no errors and it could open the map.

Parameters
TypeNameDescription
Dalamud.Game.Text.SeStringHandling.Payloads.MapLinkPayloadmapLinkLink to the map to be opened.

WorldToScreen(Vector3, out Vector2)

Converts in-world coordinates to screen coordinates (upper left corner origin).

View Source
Declaration
bool WorldToScreen(Vector3 worldPos, out Vector2 screenPos)
Returns

System.Boolean: True if worldPos corresponds to a position in front of the camera and screenPos is in the viewport.

Parameters
TypeNameDescription
System.Numerics.Vector3worldPosCoordinates in the world.
System.Numerics.Vector2screenPosConverted coordinates.

WorldToScreen(Vector3, out Vector2, out bool)

Converts in-world coordinates to screen coordinates (upper left corner origin).

View Source
Declaration
bool WorldToScreen(Vector3 worldPos, out Vector2 screenPos, out bool inView)
Returns

System.Boolean: True if worldPos corresponds to a position in front of the camera.

Parameters
TypeNameDescription
System.Numerics.Vector3worldPosCoordinates in the world.
System.Numerics.Vector2screenPosConverted coordinates.
System.BooleaninViewTrue if screenPos corresponds to a position inside the camera viewport.

ScreenToWorld(Vector2, out Vector3, float)

Converts screen coordinates to in-world coordinates via raycasting.

View Source
Declaration
bool ScreenToWorld(Vector2 screenPos, out Vector3 worldPos, float rayDistance = 100000)
Returns

System.Boolean: True if successful. On false, worldPos's contents are undefined.

Parameters
TypeNameDescription
System.Numerics.Vector2screenPosScreen coordinates.
System.Numerics.Vector3worldPosConverted coordinates.
System.SinglerayDistanceHow far to search for a collision.

GetUIModule()

Gets a pointer to the game's UI module.

View Source
Declaration
nint GetUIModule()
Returns

System.IntPtr: IntPtr pointing to UI module.### GetAddonByName(string, int) Gets the pointer to the Addon with the given name and index.

View Source
Declaration
nint GetAddonByName(string name, int index = 1)
Returns

System.IntPtr: nint.Zero if unable to find UI, otherwise nint pointing to the start of the addon.

Parameters
TypeNameDescription
System.StringnameName of addon to find.
System.Int32indexIndex of addon to find (1-indexed).

FindAgentInterface(string)

Find the agent associated with an addon, if possible.

View Source
Declaration
nint FindAgentInterface(string addonName)
Returns

System.IntPtr: A pointer to the agent interface.

Parameters
TypeNameDescription
System.StringaddonNameThe addon name.

FindAgentInterface(void*)

Find the agent associated with an addon, if possible.

View Source
Declaration
nint FindAgentInterface(void* addon)
Returns

System.IntPtr: A pointer to the agent interface.

Parameters
TypeNameDescription
System.Void*addonThe addon address.

FindAgentInterface(nint)

Find the agent associated with an addon, if possible.

View Source
Declaration
nint FindAgentInterface(nint addonPtr)
Returns

System.IntPtr: A pointer to the agent interface.

Parameters
TypeNameDescription
System.IntPtraddonPtrThe addon address.

Events

UiHideToggled

Event which is fired when the game UI hiding is toggled.

View Source
Declaration
event EventHandler<bool> UiHideToggled
Event Type

System.EventHandler<System.Boolean>

HoveredItemChanged

Event that is fired when the currently hovered item changes.

View Source
Declaration
event EventHandler<ulong> HoveredItemChanged
Event Type

System.EventHandler<System.UInt64>

HoveredActionChanged

Event that is fired when the currently hovered action changes.

View Source
Declaration
event EventHandler<HoveredAction> HoveredActionChanged
Event Type

System.EventHandler<Dalamud.Game.Gui.HoveredAction>