Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
05656f2b
Commit
05656f2b
authored
Jun 15, 2020
by
Tomasz Chabora
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete bus effect with Delete key
parent
6fa2a5ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
editor_audio_buses.cpp
editor/editor_audio_buses.cpp
+13
-0
editor_audio_buses.h
editor/editor_audio_buses.h
+1
-0
No files found.
editor/editor_audio_buses.cpp
View file @
05656f2b
...
...
@@ -545,6 +545,17 @@ void EditorAudioBus::_gui_input(const Ref<InputEvent> &p_event) {
}
}
void
EditorAudioBus
::
_unhandled_key_input
(
Ref
<
InputEvent
>
p_event
)
{
Ref
<
InputEventKey
>
k
=
p_event
;
if
(
k
.
is_valid
()
&&
k
->
is_pressed
()
&&
!
k
->
is_echo
()
&&
k
->
get_keycode
()
==
KEY_DELETE
)
{
TreeItem
*
current_effect
=
effects
->
get_selected
();
if
(
current_effect
&&
current_effect
->
get_metadata
(
0
).
get_type
()
==
Variant
::
INT
)
{
_delete_effect_pressed
(
0
);
accept_event
();
}
}
}
void
EditorAudioBus
::
_bus_popup_pressed
(
int
p_option
)
{
if
(
p_option
==
2
)
{
// Reset volume
...
...
@@ -738,6 +749,7 @@ void EditorAudioBus::_bind_methods() {
ClassDB
::
bind_method
(
"update_bus"
,
&
EditorAudioBus
::
update_bus
);
ClassDB
::
bind_method
(
"update_send"
,
&
EditorAudioBus
::
update_send
);
ClassDB
::
bind_method
(
"_gui_input"
,
&
EditorAudioBus
::
_gui_input
);
ClassDB
::
bind_method
(
"_unhandled_key_input"
,
&
EditorAudioBus
::
_unhandled_key_input
);
ClassDB
::
bind_method
(
"get_drag_data_fw"
,
&
EditorAudioBus
::
get_drag_data_fw
);
ClassDB
::
bind_method
(
"can_drop_data_fw"
,
&
EditorAudioBus
::
can_drop_data_fw
);
ClassDB
::
bind_method
(
"drop_data_fw"
,
&
EditorAudioBus
::
drop_data_fw
);
...
...
@@ -761,6 +773,7 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
add_child
(
vb
);
set_v_size_flags
(
SIZE_EXPAND_FILL
);
set_process_unhandled_key_input
(
true
);
track_name
=
memnew
(
LineEdit
);
track_name
->
connect
(
"text_entered"
,
callable_mp
(
this
,
&
EditorAudioBus
::
_name_changed
));
...
...
editor/editor_audio_buses.h
View file @
05656f2b
...
...
@@ -92,6 +92,7 @@ class EditorAudioBus : public PanelContainer {
mutable
bool
hovering_drop
;
void
_gui_input
(
const
Ref
<
InputEvent
>
&
p_event
);
void
_unhandled_key_input
(
Ref
<
InputEvent
>
p_event
);
void
_bus_popup_pressed
(
int
p_option
);
void
_name_changed
(
const
String
&
p_new_name
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment