From e9a02afd3755cd209a197e446c647bc3d4f50068 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 16 Jun 2022 11:36:49 +0200 Subject: [PATCH] Connect up CurveEdit's button. --- .../editor/widgets/curve_edit/curve_edit.cpp | 10 ++++++++++ .../editor/widgets/curve_edit/curve_edit.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/modules/material_maker/editor/widgets/curve_edit/curve_edit.cpp b/modules/material_maker/editor/widgets/curve_edit/curve_edit.cpp index 58f5c9692..4f5c43cb4 100644 --- a/modules/material_maker/editor/widgets/curve_edit/curve_edit.cpp +++ b/modules/material_maker/editor/widgets/curve_edit/curve_edit.cpp @@ -40,6 +40,16 @@ CurveEdit::CurveEdit() { CurveEdit::~CurveEdit() { } +void CurveEdit::_notification(int p_what) { + switch (p_what) { + case NOTIFICATION_POSTINITIALIZE: { + connect("pressed", this, "_on_CurveEdit_pressed"); + } break; + default: { + } break; + } +} + void CurveEdit::_bind_methods() { ADD_SIGNAL(MethodInfo("updated", PropertyInfo(Variant::OBJECT, "curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveBase"))); diff --git a/modules/material_maker/editor/widgets/curve_edit/curve_edit.h b/modules/material_maker/editor/widgets/curve_edit/curve_edit.h index 714ee46ae..7807e2aa3 100644 --- a/modules/material_maker/editor/widgets/curve_edit/curve_edit.h +++ b/modules/material_maker/editor/widgets/curve_edit/curve_edit.h @@ -20,6 +20,8 @@ public: ~CurveEdit(); protected: + void _notification(int p_what); + static void _bind_methods(); Ref value;