-
Notifications
You must be signed in to change notification settings - Fork 4
Pagination
Nikita Yudin edited this page Dec 28, 2023
·
1 revision
Pagination module adds useful methods to paginate items.
Let's look on list of all available properties:
Name | Type | Default | Description |
---|---|---|---|
enabled | bool | true |
Set the pagination to enabled or disabled. |
bullet_count | int | 0 |
Set the number of bullets. |
current | int | -1 |
Set the index of the currently selected bullet. |
clickable | bool | false |
Set whether the bullets are clickable. |
fill_bullets | bool | false |
Sets whether bullets will fill all available space. |
focus_bullets | bool | false |
Sets whether bullets are displayed while the button is in focus. |
bullet_size | Vector2 | Vector2(4, 4) |
Sets the size of the bullets. |
bullet_separation | int | 4 |
Sets the separation between the bullets. |
bullet_margin | int | Sets the separation between the bullets and the bottom border. | |
bullet_style | StyleBox | Sets the style of the active bullet. | |
bullet_inactive_style | StyleBox | Sets the style of the inactive bullets. | |
bullet_hover | StyleBox | Sets the style of the hovered active bullet. | |
bullet_inactive_hover | StyleBox | Sets the style of the hovered inactive bullets. | |
bullets | Array[Node] | [] |
Array of bullets. |
wrapper | MarginContainer | Wrapper for bullets. | |
container | HBoxContainer | Container for bullets. |
After we initialize we have its initialized instance in variable with helpful methods:
Name | Return | Description |
---|---|---|
initialize(spin_button: SBSpinButton) | void | Initializes the pagination. |
disable() | void | Disable pagination. |
enable() | void | Enable pagination. |
select(idx: int) | void | Select a bullet. |
set_bullet_count(value: int) | void | Set the number of bullets. |
get_bullet_count() | int | Get the number of bullets. |
Name | Description |
---|---|
bullet_selected(idx: int) | Emitted when a bullet is selected. |
Site yudinikita.ru · Email mail@yudinikita.ru · GitHub @yudinikita