Skip to content

Latest commit

 

History

History
272 lines (143 loc) · 10.6 KB

File metadata and controls

272 lines (143 loc) · 10.6 KB

:github_url: hide

AnimatedBar

Inherits: Container

Inherited By: HAnimatedBar, VAnimatedBar

Class for creating tool bar.

Description

Emits custom siglalls when one of button children is pressed.

See also HAnimatedBar and VAnimatedBar.

.. tabs::

.. code-tab:: gdscript

func Test():
pritn("TEST!")

.. tabs::

.. code-tab:: csharp

private void Test()
{
    GD.Print("TEST!");
}

.. tabs::

text

Text with multiple lines.

Second line of text.

There was a blank line.

[/text]

Properties

bool fill_remaining_space true
NodePath navigation_buttons_custom_left NodePath("")
NodePath navigation_buttons_custom_right NodePath("")
float navigation_buttons_spacing 5.0
bool navigation_buttons_use_custom false
int navigation_buttons_visibility 3
float spacing 10.0
float speed 4.0

Methods

bool are_navigation_buttons_visible( )
void deactivate_focus( )
int get_options_quantity( ) const
ORIENTATION get_orientation( ) const

Signals

focus_activated( focused_child_id: int )

Emitted when option changes from nothing to something.

focus_changed( focused_child_id: int )

Emitted when one option changes to another.

focus_deactivated( )

Emitted when option changes from something to nothing.

options_quantity_changed( new_quantity: int )

Emitted when quantity of options changes.


Enumerations

enum ORIENTATION:

ORIENTATION ORIENTATION_HORIZONTAL = 1

Value of HAnimatedBar.

ORIENTATION ORIENTATION_VERTICAL = 2

Value of VAnimatedBar.

ORIENTATION ORIENTATION_UNDEFINED = 0

Default value.


Property Descriptions

bool fill_remaining_space = true

  • void set_fill_remaining_space( value: bool )
  • bool is_remaining_space_filled( )

If true Control children are stretched to fill remaining space.

NodePath navigation_buttons_custom_left = NodePath("")

  • void set_custom_left_navigation_button( value: NodePath )
  • NodePath get_custom_left_navigation_button( )

If is not set to null pointer and navigation_buttons_use_custom is set to true then child found by this path replaces default left navigation button.

NodePath navigation_buttons_custom_right = NodePath("")

  • void set_custom_right_navigation_button( value: NodePath )
  • NodePath get_custom_right_navigation_button( )

If is not set to null pointer and navigation_buttons_use_custom is set to true then child found by this path replaces default right navigation button.

float navigation_buttons_spacing = 5.0

  • void set_navigation_buttons_spacing( value: float )
  • float get_navigation_buttons_spacing( )

Defines space between navigation buttons and other content.

bool navigation_buttons_use_custom = false

  • void use_custom_navigation_buttons( value: bool )
  • bool are_custom_navigation_buttons_used( )

Defines if to use custom navigation buttons.

int navigation_buttons_visibility = 3

  • void set_navigation_buttons_visibility( value: int )
  • int get_navigation_buttons_visibility( )

If set to 0 then navigation buttons are always hidden.

If set to 1 then navigation buttons are always visible.

If set to other number then navigation buttons whill automatically hide and show up.

float spacing = 10.0

  • void set_spacing( value: float )
  • float get_spacing( )

Defines space between individual Control Children.

float speed = 4.0

  • void set_speed( value: float )
  • float get_speed( )

Defines sliding speed of content after pressing one of navigation buttons.


Method Descriptions

bool are_navigation_buttons_visible( )

Returns true if left and right navigation buttons(by default, those with arrows) are visible.

void deactivate_focus( )

Does same thing as pressing already chosen butoon(eg. choosing already choosen tool).

int get_options_quantity( ) const

Return number of Control children.

ORIENTATION get_orientation( ) const

Returns orientation of this class.

Note: It is C++ virtual const method and subclasses like HAnimatedBar may overwrite it.