mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-11 05:19:50 +01:00
Now the paint plugin handles paint nodes.
This commit is contained in:
parent
e044b007f6
commit
ff701c35ad
@ -29,6 +29,8 @@ SOFTWARE.
|
|||||||
#include "ui/paint_sidebar.h"
|
#include "ui/paint_sidebar.h"
|
||||||
#include "ui/sidebar_modules/paint_color_grid.h"
|
#include "ui/sidebar_modules/paint_color_grid.h"
|
||||||
|
|
||||||
|
#include "nodes/paint_node.h"
|
||||||
|
|
||||||
PaintSidebar *PaintEditorPlugin::get_sidebar() {
|
PaintSidebar *PaintEditorPlugin::get_sidebar() {
|
||||||
return _sidebar;
|
return _sidebar;
|
||||||
}
|
}
|
||||||
@ -41,6 +43,24 @@ String PaintEditorPlugin::get_name() const {
|
|||||||
return "Paint";
|
return "Paint";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PaintEditorPlugin::edit(Object *p_object) {
|
||||||
|
_sidebar->on_paint_node_selected(Object::cast_to<PaintNode>(p_object));
|
||||||
|
//make_visible(true);
|
||||||
|
}
|
||||||
|
bool PaintEditorPlugin::handles(Object *p_object) const {
|
||||||
|
return p_object->is_class("PaintNode");
|
||||||
|
}
|
||||||
|
void PaintEditorPlugin::edited_scene_changed() {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PaintEditorPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p_event) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
void PaintEditorPlugin::forward_canvas_draw_over_viewport(Control *p_overlay) {
|
||||||
|
}
|
||||||
|
void PaintEditorPlugin::forward_canvas_force_draw_over_viewport(Control *p_overlay) {
|
||||||
|
}
|
||||||
|
|
||||||
PaintEditorPlugin::PaintEditorPlugin(EditorNode *p_node) {
|
PaintEditorPlugin::PaintEditorPlugin(EditorNode *p_node) {
|
||||||
editor = p_node;
|
editor = p_node;
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "editor/editor_plugin.h"
|
|
||||||
#include "core/object/reference.h"
|
#include "core/object/reference.h"
|
||||||
|
#include "editor/editor_plugin.h"
|
||||||
|
|
||||||
class PaintWindow;
|
class PaintWindow;
|
||||||
class Texture;
|
class Texture;
|
||||||
@ -39,6 +39,13 @@ public:
|
|||||||
|
|
||||||
void make_visible(const bool visible);
|
void make_visible(const bool visible);
|
||||||
String get_name() const;
|
String get_name() const;
|
||||||
|
void edit(Object *p_object);
|
||||||
|
bool handles(Object *p_object) const;
|
||||||
|
void edited_scene_changed();
|
||||||
|
|
||||||
|
bool forward_canvas_gui_input(const Ref<InputEvent> &p_event);
|
||||||
|
void forward_canvas_draw_over_viewport(Control *p_overlay);
|
||||||
|
void forward_canvas_force_draw_over_viewport(Control *p_overlay);
|
||||||
|
|
||||||
PaintEditorPlugin(EditorNode *p_node);
|
PaintEditorPlugin(EditorNode *p_node);
|
||||||
~PaintEditorPlugin();
|
~PaintEditorPlugin();
|
||||||
|
Loading…
Reference in New Issue
Block a user