-
-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to Godot 4.2b4 and updated panel container
- Loading branch information
Showing
2 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
extends TabContainer | ||
|
||
func _ready(): | ||
pass | ||
|
||
func _drop_data(_at_position, data): | ||
var source : TabContainer = get_node(data.from_path) | ||
var panel = source.get_tab_control(data.tabc_element) | ||
var source : TabContainer = get_node(data.from_path).get_parent() | ||
var panel = source.get_tab_control(data.tab_index) | ||
source.remove_child(panel) | ||
add_child(panel) | ||
|
||
func _can_drop_data(_at_position, data): | ||
if data is Dictionary and data.has("type") and data.type == "tabc_element": | ||
if data is Dictionary and data.has("type") and data.type == "tab_container_tab": | ||
return true | ||
return false |