A window panel (fl_frame) with a title header and a close button, drawn by the active theme's PaintFrame hook. Set the title with SetTitle; docked children start below the header. The close button removes the frame, and set_draggable lets the player drag it around the screen. The character creation and loading screens and the item icon editor are built on it. Derives from fl_base_panel.

Summary

Methods

Returns the size of the close button, which fits inside the header.
Init()client
Sets the default title, reserves space for the header and creates the close button.
Checks whether the frame can be dragged with the mouse.
Starts dragging the frame if it is draggable.
Stops dragging the frame if it is being dragged.
Delegates drawing of the frame to the active theme's PaintFrame hook.
Keeps the close button centered in the right end of the header.
Sets whether the frame can be dragged with the mouse.
Think()client
Moves the frame with the cursor while it is being dragged, keeping it on the screen, and runs the active theme's FrameThink hook.

Methods

PANEL:get_close_button_size()

client packages/active_ui/views/base/cl_frame.lua:37

Returns the size of the close button, which fits inside the header.

Returns

  • Number width
  • Number height

Sets the default title, reserves space for the header and creates the close button.

Checks whether the frame can be dragged with the mouse.

Returns

  • Boolean

PANEL:OnMousePressed()

client packages/active_ui/views/base/cl_frame.lua:83

Starts dragging the frame if it is draggable.

PANEL:OnMouseReleased()

client packages/active_ui/views/base/cl_frame.lua:91

Stops dragging the frame if it is being dragged.

Delegates drawing of the frame to the active theme's PaintFrame hook.

Parameters

  • w Number panel width
  • h Number panel height

Returns

  • Any whatever the theme hook returns; nil with the factory theme

PANEL:PerformLayout(w, _h)

client packages/active_ui/views/base/cl_frame.lua:46

Keeps the close button centered in the right end of the header.

Parameters

  • w Number panel width
  • _h Number panel height

PANEL:set_draggable(draggable)

client packages/active_ui/views/base/cl_frame.lua:100

Sets whether the frame can be dragged with the mouse.

Parameters

  • draggable Boolean optional, defaults to true false to keep the frame in place

Moves the frame with the cursor while it is being dragged, keeping it on the screen, and runs the active theme's FrameThink hook.

Defined in