Interface IGameGui
A class handling many aspects of the in-game UI.
Assembly: Dalamud.dll
View Source
public interface IGameGui
Properties
GameUiHidden
Gets a value indicating whether the game UI is hidden.
View Source
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
ulong HoveredItem { get; set; }
HoveredAction
Gets the action ID that is current hovered by the player. 0 when no action is hovered.
View Source
HoveredAction HoveredAction { get; }
Methods
OpenMapWithMapLink(MapLinkPayload)
Opens the in-game map with a flag on the location of the parameter.
View Source
bool OpenMapWithMapLink(MapLinkPayload mapLink)
Returns
System.Boolean
: True if there were no errors and it could open the map.
Parameters
Type | Name | Description |
---|---|---|
Dalamud.Game.Text.SeStringHandling.Payloads.MapLinkPayload | mapLink | Link to the map to be opened. |
WorldToScreen(Vector3, out Vector2)
Converts in-world coordinates to screen coordinates (upper left corner origin).
View Source
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
Type | Name | Description |
---|---|---|
System.Numerics.Vector3 | worldPos | Coordinates in the world. |
System.Numerics.Vector2 | screenPos | Converted coordinates. |
WorldToScreen(Vector3, out Vector2, out bool)
Converts in-world coordinates to screen coordinates (upper left corner origin).
View Source
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
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. |
ScreenToWorld(Vector2, out Vector3, float)
Converts screen coordinates to in-world coordinates via raycasting.
View Source
bool ScreenToWorld(Vector2 screenPos, out Vector3 worldPos, float rayDistance = 100000)
Returns
System.Boolean
: True if successful. On false, worldPos's contents are undefined.
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. |
GetUIModule()
Gets a pointer to the game's UI module.
View Source
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
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
Type | Name | Description |
---|---|---|
System.String | name | Name of addon to find. |
System.Int32 | index | Index of addon to find (1-indexed). |
FindAgentInterface(string)
Find the agent associated with an addon, if possible.
View Source
nint FindAgentInterface(string addonName)
Returns
System.IntPtr
: A pointer to the agent interface.
Parameters
Type | Name | Description |
---|---|---|
System.String | addonName | The addon name. |
FindAgentInterface(void*)
Find the agent associated with an addon, if possible.
View Source
nint FindAgentInterface(void* addon)
Returns
System.IntPtr
: A pointer to the agent interface.
Parameters
Type | Name | Description |
---|---|---|
System.Void* | addon | The addon address. |
FindAgentInterface(nint)
Find the agent associated with an addon, if possible.
View Source
nint FindAgentInterface(nint addonPtr)
Returns
System.IntPtr
: A pointer to the agent interface.
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | addonPtr | The addon address. |
Events
UiHideToggled
Event which is fired when the game UI hiding is toggled.
View Source
event EventHandler<bool> UiHideToggled
Event Type
System.EventHandler<System.Boolean>
HoveredItemChanged
Event that is fired when the currently hovered item changes.
View Source
event EventHandler<ulong> HoveredItemChanged
Event Type
System.EventHandler<System.UInt64>
HoveredActionChanged
Event that is fired when the currently hovered action changes.
View Source
event EventHandler<HoveredAction> HoveredActionChanged
Event Type
System.EventHandler<Dalamud.Game.Gui.HoveredAction>