Cleanup EditorProperty setup methods
This commit is contained in:
@ -46,6 +46,19 @@ class SceneTreeDialog;
|
||||
class TextEdit;
|
||||
class TextureButton;
|
||||
|
||||
struct EditorPropertyRangeHint {
|
||||
bool or_greater = true;
|
||||
bool or_less = true;
|
||||
double min = 0.0;
|
||||
double max = 0.0;
|
||||
double step = 1.0;
|
||||
String suffix;
|
||||
bool exp_range = false;
|
||||
bool prefer_slider = false;
|
||||
bool hide_control = true;
|
||||
bool radians_as_degrees = false;
|
||||
};
|
||||
|
||||
class EditorPropertyNil : public EditorProperty {
|
||||
GDCLASS(EditorPropertyNil, EditorProperty);
|
||||
LineEdit *text = nullptr;
|
||||
@ -370,7 +383,7 @@ protected:
|
||||
|
||||
public:
|
||||
virtual void update_property() override;
|
||||
void setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_prefer_slider, bool p_hide_control, bool p_allow_greater, bool p_allow_lesser, const String &p_suffix = String());
|
||||
void setup(const EditorPropertyRangeHint &p_range_hint);
|
||||
EditorPropertyInteger();
|
||||
};
|
||||
|
||||
@ -421,7 +434,7 @@ protected:
|
||||
|
||||
public:
|
||||
virtual void update_property() override;
|
||||
void setup(double p_min, double p_max, double p_step, bool p_hide_control, bool p_exp_range, bool p_greater, bool p_lesser, const String &p_suffix = String(), bool p_radians_as_degrees = false);
|
||||
void setup(const EditorPropertyRangeHint &p_range_hint);
|
||||
EditorPropertyFloat();
|
||||
};
|
||||
|
||||
@ -477,7 +490,7 @@ protected:
|
||||
|
||||
public:
|
||||
virtual void update_property() override;
|
||||
void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String());
|
||||
void setup(const EditorPropertyRangeHint &p_range_hint);
|
||||
EditorPropertyRect2(bool p_force_wide = false);
|
||||
};
|
||||
|
||||
@ -492,7 +505,7 @@ protected:
|
||||
|
||||
public:
|
||||
virtual void update_property() override;
|
||||
void setup(int p_min, int p_max, const String &p_suffix = String());
|
||||
void setup(const EditorPropertyRangeHint &p_range_hint);
|
||||
EditorPropertyRect2i(bool p_force_wide = false);
|
||||
};
|
||||
|
||||
@ -507,7 +520,7 @@ protected:
|
||||
|
||||
public:
|
||||
virtual void update_property() override;
|
||||
void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String());
|
||||
void setup(const EditorPropertyRangeHint &p_range_hint);
|
||||
EditorPropertyPlane(bool p_force_wide = false);
|
||||
};
|
||||
|
||||
@ -539,7 +552,7 @@ protected:
|
||||
|
||||
public:
|
||||
virtual void update_property() override;
|
||||
void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String(), bool p_hide_editor = false);
|
||||
void setup(const EditorPropertyRangeHint &p_range_hint, bool p_hide_editor = false);
|
||||
EditorPropertyQuaternion();
|
||||
};
|
||||
|
||||
@ -554,7 +567,7 @@ protected:
|
||||
|
||||
public:
|
||||
virtual void update_property() override;
|
||||
void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String());
|
||||
void setup(const EditorPropertyRangeHint &p_range_hint);
|
||||
EditorPropertyAABB();
|
||||
};
|
||||
|
||||
@ -569,7 +582,7 @@ protected:
|
||||
|
||||
public:
|
||||
virtual void update_property() override;
|
||||
void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String());
|
||||
void setup(const EditorPropertyRangeHint &p_range_hint);
|
||||
EditorPropertyTransform2D(bool p_include_origin = true);
|
||||
};
|
||||
|
||||
@ -584,7 +597,7 @@ protected:
|
||||
|
||||
public:
|
||||
virtual void update_property() override;
|
||||
void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String());
|
||||
void setup(const EditorPropertyRangeHint &p_range_hint);
|
||||
EditorPropertyBasis();
|
||||
};
|
||||
|
||||
@ -600,7 +613,7 @@ protected:
|
||||
public:
|
||||
virtual void update_property() override;
|
||||
virtual void update_using_transform(Transform3D p_transform);
|
||||
void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String());
|
||||
void setup(const EditorPropertyRangeHint &p_range_hint);
|
||||
EditorPropertyTransform3D();
|
||||
};
|
||||
|
||||
@ -616,7 +629,7 @@ protected:
|
||||
public:
|
||||
virtual void update_property() override;
|
||||
virtual void update_using_transform(Projection p_transform);
|
||||
void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String());
|
||||
void setup(const EditorPropertyRangeHint &p_range_hint);
|
||||
EditorPropertyProjection();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user