Skip to main content
Version: 15.x (API 15) [Current]

Interface IGameGui

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

Assembly: Dalamud.dll​
Declaration
public interface IGameGui : IDalamudService

Properties​

GameUiHidden​

Gets a value indicating whether the game UI is hidden.

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.

Declaration
ulong HoveredItem { get; set; }

HoveredAction​

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

Declaration
HoveredAction HoveredAction { get; }

Methods​

OpenMapWithMapLink(MapLinkPayload)​

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

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.

OpenMapWithMapLink(uint, uint, Vector3)​

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

Declaration
bool OpenMapWithMapLink(uint territory, uint map, Vector3 worldPos)
Returns​

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

Parameters​
TypeNameDescription
System.UInt32territoryTerritory to link.
System.UInt32mapMap to link.
System.Numerics.Vector3worldPosPosition of the link.

WorldToScreen(Vector3, out Vector2)​

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

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).

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.

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 UIModule instance.

Declaration
UIModulePtr GetUIModule()
Returns​

Dalamud.Game.NativeWrapper.UIModulePtr: A pointer wrapper to UIModule.

GetAddonByName(string, int)​

Gets the pointer to the Addon with the given name and index.

Declaration
AtkUnitBasePtr GetAddonByName(string name, int index = 1)
Returns​

Dalamud.Game.NativeWrapper.AtkUnitBasePtr: A pointer wrapper to the addon.

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

GetAddonByName<T>(string, int)​

Gets the pointer to the Addon with the given name and index.

Declaration
T* GetAddonByName<T>(string name, int index = 1) where T : unmanaged
Returns​

<T>*: A pointer wrapper to the addon.

Parameters​
TypeNameDescription
System.StringnameName of addon to find.
System.Int32indexIndex of addon to find (1-indexed).
Type Parameters​
NameDescription
TType of addon pointer AtkUnitBase or any derived struct.

GetAgentById(int)​

Find the agent associated with an addon, if possible.

Declaration
AgentInterfacePtr GetAgentById(int id)
Returns​

Dalamud.Game.NativeWrapper.AgentInterfacePtr: A pointer wrapper to the agent interface.

Parameters​
TypeNameDescription
System.Int32idThe agent id.

FindAgentInterface(string)​

Find the agent associated with an addon, if possible.

Declaration
AgentInterfacePtr FindAgentInterface(string addonName)
Returns​

Dalamud.Game.NativeWrapper.AgentInterfacePtr: A pointer wrapper to the agent interface.

Parameters​
TypeNameDescription
System.StringaddonNameThe addon name.

FindAgentInterface(AtkUnitBasePtr)​

Find the agent associated with an addon, if possible.

Declaration
AgentInterfacePtr FindAgentInterface(AtkUnitBasePtr addon)
Returns​

Dalamud.Game.NativeWrapper.AgentInterfacePtr: A pointer wrapper to the agent interface.

Parameters​
TypeNameDescription
Dalamud.Game.NativeWrapper.AtkUnitBasePtraddonThe addon address.

Events​

UiHideToggled​

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

Declaration
event EventHandler<bool> UiHideToggled
Event Type​

System.EventHandler<System.Boolean>

HoveredItemChanged​

Event that is fired when the currently hovered item changes.

Declaration
event EventHandler<ulong> HoveredItemChanged
Event Type​

System.EventHandler<System.UInt64>

HoveredActionChanged​

Event that is fired when the currently hovered action changes.

Declaration
event EventHandler<HoveredAction> HoveredActionChanged
Event Type​

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

AgentUpdate​

Fired when the game sets one or more Dalamud.Game.Gui.AgentUpdateFlag values, used by agents to conditionally update their addons.

Declaration
event Action<AgentUpdateFlag> AgentUpdate
Event Type​

System.Action<Dalamud.Game.Gui.AgentUpdateFlag>