TextureButton

Inherits: BaseButton < Control < CanvasItem < Node < Object

Category: Core

Brief Description

Button that can be themed with textures.

Member Functions

BitMap get_click_mask ( ) const
Texture get_disabled_texture ( ) const
Texture get_focused_texture ( ) const
Texture get_hover_texture ( ) const
Color get_modulate ( ) const
Texture get_normal_texture ( ) const
Texture get_pressed_texture ( ) const
int get_resize_mode ( ) const
int get_stretch_mode ( ) const
Vector2 get_texture_scale ( ) const
void set_click_mask ( BitMap mask )
void set_disabled_texture ( Texture texture )
void set_focused_texture ( Texture texture )
void set_hover_texture ( Texture texture )
void set_modulate ( Color color )
void set_normal_texture ( Texture texture )
void set_pressed_texture ( Texture texture )
void set_resize_mode ( int p_mode )
void set_stretch_mode ( int p_mode )
void set_texture_scale ( Vector2 scale )

Numeric Constants

  • RESIZE_SCALE = 0
  • RESIZE_STRETCH = 1
  • STRETCH_SCALE_ON_EXPAND = 0
  • STRETCH_SCALE = 1
  • STRETCH_TILE = 2
  • STRETCH_KEEP = 3
  • STRETCH_KEEP_CENTERED = 4
  • STRETCH_KEEP_ASPECT = 5
  • STRETCH_KEEP_ASPECT_CENTERED = 6
  • STRETCH_KEEP_ASPECT_COVERED = 7

Description

Button that can be themed with textures. This is like a regular Button but can be themed by assigning textures to it. This button is intended to be easy to theme, however a regular button can expand (that uses styleboxes) and still be better if the interface is expect to have internationalization of texts.

Only the normal texture is required, the others are optional.

Member Function Description

  • BitMap get_click_mask ( ) const
  • Texture get_disabled_texture ( ) const
  • Texture get_focused_texture ( ) const
  • Texture get_hover_texture ( ) const
  • Color get_modulate ( ) const
  • Texture get_normal_texture ( ) const
  • Texture get_pressed_texture ( ) const
  • int get_resize_mode ( ) const
  • int get_stretch_mode ( ) const
  • Vector2 get_texture_scale ( ) const
  • void set_click_mask ( BitMap mask )
  • void set_disabled_texture ( Texture texture )
  • void set_focused_texture ( Texture texture )
  • void set_hover_texture ( Texture texture )
  • void set_modulate ( Color color )
  • void set_normal_texture ( Texture texture )
  • void set_pressed_texture ( Texture texture )
  • void set_resize_mode ( int p_mode )
  • void set_stretch_mode ( int p_mode )
  • void set_texture_scale ( Vector2 scale )