Skip to content

Latest commit

 

History

History
177 lines (100 loc) · 9.32 KB

File metadata and controls

177 lines (100 loc) · 9.32 KB

:github_url: hide

ExpandableButton

Inherits: RevisedButton < BaseButton

Button with additional content shown while hovered.

Description

Expands when hovered by mouse revealing additional content on left side.

Was not intended to work with transparent StyleBoxes, but it still can.

Note: Its minimum_size changes depending of it state and frame of expanding animation.

Note: It is planed to add more directions.

Properties

Vector2 base_minimum_size Vector2(0, 0)
int expansion_indentation 0
EXPANSION_INFO expansion_information 0
int expansion_information_margin 0
int expansion_minimum_size 0
int expansion_size 70
float expansion_speed 25.0
StringName theme_type_variation &"_ExpandableButton_hidden" (overrides Control.theme_type_variation)

Methods

void expand( )
void reduce( )

Enumerations

enum EXPANSION_INFO:

EXPANSION_INFO IMAGE = 0

There is currently no description for this enum. Please help us by contributing one !

There is currently no description for this enum. Please help us by contributing one !


Property Descriptions

Vector2 base_minimum_size = Vector2(0, 0)

  • void set_base_minimum_size( value: Vector2 )
  • Vector2 get_base_minimum_size( )

Minimum size of the main body.

int expansion_indentation = 0

  • void set_expansion_indentation( value: int )
  • int get_expansion_indentation( )

Defines additional lenght of expanded StyleBox.

Added lenght will always appear underneath main StyleBox unless expansion_indentation is negative.

EXPANSION_INFO expansion_information = 0

Defines which part of content is additional.

Note: It is planed to add posibility for two texts and/or buttons.

int expansion_information_margin = 0

  • void set_info_margin( value: int )
  • int get_info_margin( )

If set to positive value then additional content is moved aside main body otherwise part of it renders underneath it.

int expansion_minimum_size = 0

  • void set_minimum_expansion_size( value: int )
  • int get_minimum_expansion_size( )

Shows to user the minimum size of additional content.

Note: set_minimum_expansion_size does nothing.

int expansion_size = 70

  • void set_expansion_size( value: int )
  • int get_expansion_size( )

Defines size of additional content unless expansion_size is less than expansion_minimum_size.

float expansion_speed = 25.0

  • void set_expansion_speed( value: float )
  • float get_expansion_speed( )

Defines how fast additional content will appear.


Method Descriptions

void expand( )

Shows additional content.

void reduce( )

Hides additional content.

<style> Violet { color: Violet } </style>