Class TGUIButton

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TGUIButton = class(TGUIElement)

Description

A GUI Button.

Hierarchy

Overview

Methods

Public procedure SetImage(Image: TTexture); overload; inline;
Public procedure SetImage(Image: TTexture; const Pos: TRect); overload; inline;
Public procedure SetOverrideFont(Font: TGUIFont); inline;
Public procedure SetPressedImage(Image: TTexture); overload; inline;
Public procedure SetPressedImage(Image: TTexture; const Pos: TRect); overload; inline;
Public procedure SetSprite(State: TGUIButtonState; Index: LongInt; Color: TARGBColor=$ffffffff; Loop: Boolean = False); inline;
Public procedure SetSpriteBank(Bank: TGUISpriteBank); inline;

Properties

Public property DrawBorder: Boolean read IsDrawingBorder write SetDrawBorder;
Public property IsPushButton: Boolean read GetIsPushButton write SetIsPushButton;
Public property Pressed: Boolean read IsPressed write SetPressed;
Public property ScaleImage: Boolean read IsScalingImage write SetScaleImage;
Public property UseAlphaChannel: Boolean read IsAlphaChannelUsed write SetUseAlphaChannel;

Description

Methods

Public procedure SetImage(Image: TTexture); overload; inline;

Sets an image which should be displayed on the button when it is in normal state.

Parameters
Image
Texture containing the image to be displayed.
Public procedure SetImage(Image: TTexture; const Pos: TRect); overload; inline;

Sets a background image for the button when it is in normal state.

Parameters
Image
Texture containing the image to be displayed.
Pos
Position in the texture, where the image is located.
Public procedure SetOverrideFont(Font: TGUIFont); inline;

Sets another skin independent font.
If this is set to zero, the button uses the font of the skin.

Parameters
Font
New font to set.
Public procedure SetPressedImage(Image: TTexture); overload; inline;

Sets a background image for the button when it is in pressed state.
If no images is specified for the pressed state via SetPressedImage, this image is also drawn in pressed state.

Parameters
Image
Image to be displayed
Public procedure SetPressedImage(Image: TTexture; const Pos: TRect); overload; inline;

Sets an image which should be displayed on the button when it is in pressed state.

Parameters
Image
Texture containing the image to be displayed.
Pos
Position in the texture, where the image is located.
Public procedure SetSprite(State: TGUIButtonState; Index: LongInt; Color: TARGBColor=$ffffffff; Loop: Boolean = False); inline;

Sets the animated sprite for a specific button state.

Parameters
State
State of the button to set the sprite for.
Index
Number of the sprite within the sprite bank, use -1 for no sprite.
Color
The color of the sprite.
Loop
True if the animation should loop, false if not.
Public procedure SetSpriteBank(Bank: TGUISpriteBank); inline;

Sets the sprite bank used by the button.

Properties

Public property DrawBorder: Boolean read IsDrawingBorder write SetDrawBorder;

Specifies if the border and button face are being drawn using the skin.

Public property IsPushButton: Boolean read GetIsPushButton write SetIsPushButton;

Tells whether the button is a push button.
Which means it can be in two states: Normal or Pressed. With a click on the button, the user can change the state of the button.

Public property Pressed: Boolean read IsPressed write SetPressed;

Tells whether the button is currently pressed or sets its state, if the button is a push button.

Public property ScaleImage: Boolean read IsScalingImage write SetScaleImage;

Specifies if the button should scale the button images to fit.

Public property UseAlphaChannel: Boolean read IsAlphaChannelUsed write SetUseAlphaChannel;

Specifies whether the alpha channel should be used for drawing background images on the button.


Generated by PasDoc 0.12.1 on 2012-09-14 17:32:22