An image and pointer hotspot for a DRM cursor override. Use this record in the
default, text or pointer field of Emerge.Config.Cursor.
%Emerge.Config{
input: %Emerge.Config.Input{
cursor: %Emerge.Config.Cursor{
pointer: %Emerge.Config.CursorIcon{source: "cursors/hand.png", hotspot: {4, 2}}
}
}
}Fields
source— an image path orEmerge.Assets.Ref. Relative paths resolve under the application'spriv/directory. Absolute paths are runtime assets and need the policy inEmerge.Config.RuntimePaths. The defaultnilis a placeholder; a supplied icon must have a source.hotspot—{x, y}position of the pointing tip within the image, in image pixels. Defaults to{0, 0}; coordinates must be non-negative numbers.
A hotspot changes where the cursor points, not where UI elements are laid out. Cursor overrides require a new viewport to change.
Summary
Types
Canonical form after nested keyword records have been expanded.
Typed keyword shorthand accepted in this record's parent field.
Types
@type normalized_t() :: t()
Canonical form after nested keyword records have been expanded.
@type options() :: [ source: String.t() | Emerge.Assets.Ref.t() | nil, hotspot: {number(), number()} ]
Typed keyword shorthand accepted in this record's parent field.
@type t() :: %Emerge.Config.CursorIcon{ hotspot: {number(), number()}, source: String.t() | Emerge.Assets.Ref.t() | nil }