https://github.com/diklor/advanced_radial_menu
https://github.com/diklor/advanced_radial_menu
advanced circle godot godot-engine godot-plugin godot4 godotengine node plugin popup procedural radial
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/diklor/advanced_radial_menu
- Owner: diklor
- License: apache-2.0
- Created: 2023-10-03T18:59:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-24T17:47:46.000Z (11 months ago)
- Last Synced: 2024-07-24T20:14:17.141Z (11 months ago)
- Topics: advanced, circle, godot, godot-engine, godot-plugin, godot4, godotengine, node, plugin, popup, procedural, radial
- Language: GDScript
- Homepage:
- Size: 659 KB
- Stars: 30
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# advanced_radial_menu
Advanced radial menu node
Usage
https://youtu.be/PgHafAvnUGw
## 1.3 Update!
* Temporary selections
* Signal docs
* .gdignore finally## 1.2 Update
* Controller support and mouse detection fixes# Temporarily selection
Set
```gdscript
radial_menu.set_temporary_selection(1)
# (1 is second element, 0 is first)
```
Remove
```gdscript
radial_menu.set_temporary_selection(-2) # -2 is nothing
```
# Signals
Connect slot selection
```gdscript
# Example how to make selected slot green
var _prev_slot: Control = nullfunc _ready() -> void:
radial_menu.slot_selected.connect(func(slot: Control, index: int) -> void:
if _prev_slot != null:
_prev_slot.modulate = Color.WHITE
slot.modulate = Color.GREEN
_prev_slot = slot
)
```
Selection changed (hover):
```gdscript
radial_menu.selection_changed.connect(func(new_selection: int) -> void:
var slot := radial_menu.get_selected_child()
)
# You can animate `slot.scale` because radial_menu is not a container
```
Selection canceled:
```gdscript
radial_menu.selection_canceled.connect(func() -> void: ...
```---
# What the hell with indexes?
* -2 is nothing
* -1 is center slot (only if you have `first_in_center` variable enabled)
* 0 is first slotIt's just ordinary indexes, but -1 became -2
_If you work with a team, you should probably comment these incomprehensible -2 indexes in the code..._
What is **deadzone**?
# What is **deadzone**?
The threshold of detection. For example, in the picture of the dedzone is 0.2, m
The values below or equals 0.2 will be ignored| [Download `example.tscn` (downgit)](https://downgit.github.io/#/home?url=https://github.com/diklor/advanced_radial_menu/blob/main/example.tscn) |
| - |## Support