Create many types of popups on demand
* LineEdit popups created on demand. * TextEdit popups created on demand. * SpinSlider popups created on demand. * ResourcePicker popups created on demand. Improves editor responsiveness.
This commit is contained in:
@ -67,7 +67,7 @@ class EditorResourcePicker : public HBoxContainer {
|
||||
CONVERT_BASE_ID = 1000,
|
||||
};
|
||||
|
||||
PopupMenu *edit_menu;
|
||||
PopupMenu *edit_menu = nullptr;
|
||||
|
||||
void _update_resource();
|
||||
void _update_resource_preview(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, ObjectID p_obj);
|
||||
@ -90,6 +90,8 @@ class EditorResourcePicker : public HBoxContainer {
|
||||
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
|
||||
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
|
||||
|
||||
void _ensure_resource_menu();
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
void _notification(int p_what);
|
||||
|
||||
Reference in New Issue
Block a user