Fixes snapping and replaces the _draw_canvas by forward_canvas_draw
This commit is contained in:
@@ -72,7 +72,6 @@ class LightOccluder2DEditor : public HBoxContainer {
|
||||
ConfirmationDialog *create_poly;
|
||||
|
||||
void _wip_close(bool p_closed);
|
||||
void _canvas_draw();
|
||||
void _menu_option(int p_option);
|
||||
void _create_poly();
|
||||
|
||||
@@ -83,6 +82,7 @@ protected:
|
||||
|
||||
public:
|
||||
Vector2 snap_point(const Vector2 &p_point) const;
|
||||
void forward_draw_over_canvas(Control *p_canvas);
|
||||
bool forward_gui_input(const Ref<InputEvent> &p_event);
|
||||
void edit(Node *p_collision_polygon);
|
||||
LightOccluder2DEditor(EditorNode *p_editor);
|
||||
@@ -92,11 +92,12 @@ class LightOccluder2DEditorPlugin : public EditorPlugin {
|
||||
|
||||
GDCLASS(LightOccluder2DEditorPlugin, EditorPlugin);
|
||||
|
||||
LightOccluder2DEditor *collision_polygon_editor;
|
||||
LightOccluder2DEditor *light_occluder_editor;
|
||||
EditorNode *editor;
|
||||
|
||||
public:
|
||||
virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const Ref<InputEvent> &p_event) { return collision_polygon_editor->forward_gui_input(p_event); }
|
||||
virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return light_occluder_editor->forward_gui_input(p_event); }
|
||||
virtual void forward_draw_over_canvas(Control *p_canvas) { return light_occluder_editor->forward_draw_over_canvas(p_canvas); }
|
||||
|
||||
virtual String get_name() const { return "LightOccluder2D"; }
|
||||
bool has_main_screen() const { return false; }
|
||||
|
||||
Reference in New Issue
Block a user