You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Made it possible to properly draw over the 2D canvas for 2D objects. Arranged some functions to achieve this.
This commit is contained in:
@@ -6681,45 +6681,54 @@ EditorNode::~EditorNode() {
|
||||
|
||||
|
||||
void EditorPluginList::make_visible(bool p_visible) {
|
||||
if (!plugins_list.empty()) {
|
||||
for (int i = 0; i < plugins_list.size(); i++) {
|
||||
plugins_list[i]->make_visible(p_visible);
|
||||
}
|
||||
|
||||
for (int i = 0; i < plugins_list.size(); i++) {
|
||||
plugins_list[i]->make_visible(p_visible);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void EditorPluginList::edit(Object* p_object) {
|
||||
if (!plugins_list.empty()) {
|
||||
for (int i = 0; i < plugins_list.size(); i++) {
|
||||
plugins_list[i]->edit(p_object);
|
||||
}
|
||||
|
||||
for (int i = 0; i < plugins_list.size(); i++) {
|
||||
plugins_list[i]->edit(p_object);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool EditorPluginList::forward_input_event(const InputEvent& p_event) {
|
||||
bool EditorPluginList::forward_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) {
|
||||
|
||||
bool discard = false;
|
||||
if (!plugins_list.empty()) {
|
||||
for (int i = 0; i < plugins_list.size(); i++) {
|
||||
if (plugins_list[i]->forward_input_event(p_event)) {
|
||||
discard = true;
|
||||
}
|
||||
|
||||
for (int i = 0; i < plugins_list.size(); i++) {
|
||||
if (plugins_list[i]->forward_canvas_input_event(p_canvas_xform,p_event)) {
|
||||
discard = true;
|
||||
}
|
||||
}
|
||||
|
||||
return discard;
|
||||
}
|
||||
|
||||
bool EditorPluginList::forward_spatial_input_event(Camera* p_camera, const InputEvent& p_event) {
|
||||
bool discard = false;
|
||||
if (!plugins_list.empty()) {
|
||||
for (int i = 0; i < plugins_list.size(); i++) {
|
||||
if (plugins_list[i]->forward_spatial_input_event(p_camera, p_event)) {
|
||||
discard = true;
|
||||
}
|
||||
|
||||
for (int i = 0; i < plugins_list.size(); i++) {
|
||||
if (plugins_list[i]->forward_spatial_input_event(p_camera, p_event)) {
|
||||
discard = true;
|
||||
}
|
||||
}
|
||||
|
||||
return discard;
|
||||
}
|
||||
|
||||
void EditorPluginList::forward_draw_over_canvas(const Matrix32& p_canvas_xform,Control* p_canvas) {
|
||||
|
||||
for (int i = 0; i < plugins_list.size(); i++) {
|
||||
plugins_list[i]->forward_draw_over_canvas(p_canvas_xform,p_canvas);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool EditorPluginList::empty() {
|
||||
return plugins_list.empty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user