A button that shows an image instead of a title (fl_image_button). Set the image with SetImage. The image is darkened until the button is hovered, and an accent colored outline is drawn around it while the button is active. Derives from fl_button; the faction chooser of the character creation uses it.

Summary

Methods

Init()client
Creates the DImage that displays the image of the button.
Draws nothing: the image is a child panel and the overlay is drawn in PaintOver.
Darkens the image while it is not hovered and draws an accent colored outline while the button is active.
Sets the image displayed on the button.
Think()client
Updates the hover fade amount and stretches the image to the size of the button.

Methods

Creates the DImage that displays the image of the button.

Draws nothing: the image is a child panel and the overlay is drawn in PaintOver.

Parameters

  • _w Number panel width
  • _h Number panel height

Darkens the image while it is not hovered and draws an accent colored outline while the button is active.

Parameters

  • w Number panel width
  • h Number panel height

Sets the image displayed on the button.

Parameters

  • img String path of the image, as accepted by DImage:SetImage

Updates the hover fade amount and stretches the image to the size of the button.

Defined in