ElementsContent & layout
AddDraggableLabel
Adds a text label that can be repositioned.
AddDraggableLabel
What it does
Adds a text label that can be repositioned.
When to use it
Use it for movable annotations, overlays, or user-customizable information labels.
XLQPGen1:AddDraggableLabel(Text)
local Watermark = Library:AddDraggableLabel(
"Example text",
)Behavior and return value
Call this method on the compatible section, tab, panel, or element container shown by the signature. Store the returned value when you need to update, read, or destroy the element later.
The label parents to the XLQP root GUI, which exists as soon as the source finishes loading, so this may be called before MakeWindow. The returned controller provides:
| Method | What it does |
|---|---|
SetText(text) | Replaces the base text, keeping the stats suffix when fps is on |
SetStatsVisible(visible) | Shows or hides the live FPS and ping suffix |
SetVisible(visible) | Shows or hides the label frame |
Destroy() | Unregisters the label from the stats refresh loop and removes it. Remove is an alias |
AddLabelGui is an alias for this method.
Fields marked optional may be omitted. XLQP then uses the method’s built-in default or leaves that feature disabled.