A pool character in the gamemaster panel (fl_gamemaster_card): its model, a button that possesses it (or releases it when the local player plays it, or says who plays it), a button that deletes it once its name has been typed to confirm, and a marker when it stands in the world. The card can be dragged out of the panel onto the world; while it is dragged, a small tag with its name follows the cursor in place of the whole card, so that the spot it will be placed on stays in view.

Summary

Methods

Turns the possess button into a disabled notice.
Init()client
Creates the model preview, the buttons and makes the card draggable.
Hides the model and the buttons from the copy of the card that follows the cursor.
Shows the model and the buttons again once the drag is over.
Draws the card through the theme's PaintCharPanel hook, or the tag that follows the cursor while the card is dragged.
Draws the tag that follows the cursor while the card is dragged: the name of the character and how to place it or cancel.
Draws the marker of a character that stands in the world under the name.
Positions the model preview and the buttons.
Sets the pool character shown by the card.

Methods

PANEL:disable_possess(text, icon)

client plugins/gamemastery/plugin/views/cl_gamemaster_panel.lua:447

Turns the possess button into a disabled notice.

Parameters

  • text String the text of the button
  • icon String FontAwesome ID of its icon

Creates the model preview, the buttons and makes the card draggable.

Hides the model and the buttons from the copy of the card that follows the cursor.

Shows the model and the buttons again once the drag is over.

Draws the card through the theme's PaintCharPanel hook, or the tag that follows the cursor while the card is dragged.

Parameters

  • w Number
  • h Number

Draws the tag that follows the cursor while the card is dragged: the name of the character and how to place it or cancel. Drag and drop paints the card centered on the cursor, so the tag is drawn below and to the right of the center to keep the spot under the cursor clear.

Parameters

  • w Number
  • h Number

Draws the marker of a character that stands in the world under the name.

Parameters

  • w Number
  • _h Number

Positions the model preview and the buttons. The possess button takes the whole width when there is no delete button next to it.

Parameters

  • w Number
  • h Number

PANEL:set_character(char_data)

client plugins/gamemastery/plugin/views/cl_gamemaster_panel.lua:414

Sets the pool character shown by the card. A character the local player plays gets a release button, one somebody else plays a disabled button with their name, and a banned one a disabled button that says so; the delete button is hidden while anybody plays the character.

Parameters

  • char_data Map an entry of the pool list

Defined in