summaryrefslogtreecommitdiff
path: root/editor/editor_properties.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_properties.h')
-rw-r--r--editor/editor_properties.h76
1 files changed, 43 insertions, 33 deletions
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index 574767890c..0a4a07cdc0 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -32,15 +32,15 @@
#define EDITOR_PROPERTIES_H
#include "editor/create_dialog.h"
-#include "editor/editor_file_system.h"
#include "editor/editor_inspector.h"
#include "editor/editor_spin_slider.h"
#include "editor/property_selector.h"
#include "editor/scene_tree_editor.h"
#include "scene/gui/color_picker.h"
+#include "scene/gui/line_edit.h"
class EditorPropertyNil : public EditorProperty {
- GDCLASS(EditorPropertyNil, EditorProperty)
+ GDCLASS(EditorPropertyNil, EditorProperty);
LineEdit *text;
public:
@@ -49,7 +49,7 @@ public:
};
class EditorPropertyText : public EditorProperty {
- GDCLASS(EditorPropertyText, EditorProperty)
+ GDCLASS(EditorPropertyText, EditorProperty);
LineEdit *text;
bool updating;
@@ -66,7 +66,7 @@ public:
};
class EditorPropertyMultilineText : public EditorProperty {
- GDCLASS(EditorPropertyMultilineText, EditorProperty)
+ GDCLASS(EditorPropertyMultilineText, EditorProperty);
TextEdit *text;
AcceptDialog *big_text_dialog;
@@ -87,7 +87,7 @@ public:
};
class EditorPropertyTextEnum : public EditorProperty {
- GDCLASS(EditorPropertyTextEnum, EditorProperty)
+ GDCLASS(EditorPropertyTextEnum, EditorProperty);
OptionButton *options;
void _option_selected(int p_which);
@@ -102,7 +102,7 @@ public:
};
class EditorPropertyPath : public EditorProperty {
- GDCLASS(EditorPropertyPath, EditorProperty)
+ GDCLASS(EditorPropertyPath, EditorProperty);
Vector<String> extensions;
bool folder;
bool global;
@@ -127,7 +127,8 @@ public:
};
class EditorPropertyClassName : public EditorProperty {
- GDCLASS(EditorPropertyClassName, EditorProperty)
+ GDCLASS(EditorPropertyClassName, EditorProperty);
+
private:
CreateDialog *dialog;
Button *property;
@@ -146,7 +147,8 @@ public:
};
class EditorPropertyMember : public EditorProperty {
- GDCLASS(EditorPropertyMember, EditorProperty)
+ GDCLASS(EditorPropertyMember, EditorProperty);
+
public:
enum Type {
MEMBER_METHOD_OF_VARIANT_TYPE, ///< a method of a type
@@ -179,7 +181,7 @@ public:
};
class EditorPropertyCheck : public EditorProperty {
- GDCLASS(EditorPropertyCheck, EditorProperty)
+ GDCLASS(EditorPropertyCheck, EditorProperty);
CheckBox *checkbox;
void _checkbox_pressed();
@@ -193,7 +195,7 @@ public:
};
class EditorPropertyEnum : public EditorProperty {
- GDCLASS(EditorPropertyEnum, EditorProperty)
+ GDCLASS(EditorPropertyEnum, EditorProperty);
OptionButton *options;
void _option_selected(int p_which);
@@ -209,7 +211,7 @@ public:
};
class EditorPropertyFlags : public EditorProperty {
- GDCLASS(EditorPropertyFlags, EditorProperty)
+ GDCLASS(EditorPropertyFlags, EditorProperty);
VBoxContainer *vbox;
Vector<CheckBox *> flags;
Vector<int> flag_indices;
@@ -228,7 +230,8 @@ public:
class EditorPropertyLayersGrid;
class EditorPropertyLayers : public EditorProperty {
- GDCLASS(EditorPropertyLayers, EditorProperty)
+ GDCLASS(EditorPropertyLayers, EditorProperty);
+
public:
enum LayerType {
LAYER_PHYSICS_2D,
@@ -257,7 +260,7 @@ public:
};
class EditorPropertyInteger : public EditorProperty {
- GDCLASS(EditorPropertyInteger, EditorProperty)
+ GDCLASS(EditorPropertyInteger, EditorProperty);
EditorSpinSlider *spin;
bool setting;
void _value_changed(double p_val);
@@ -272,7 +275,7 @@ public:
};
class EditorPropertyObjectID : public EditorProperty {
- GDCLASS(EditorPropertyObjectID, EditorProperty)
+ GDCLASS(EditorPropertyObjectID, EditorProperty);
Button *edit;
String base_type;
void _edit_pressed();
@@ -287,7 +290,7 @@ public:
};
class EditorPropertyFloat : public EditorProperty {
- GDCLASS(EditorPropertyFloat, EditorProperty)
+ GDCLASS(EditorPropertyFloat, EditorProperty);
EditorSpinSlider *spin;
bool setting;
void _value_changed(double p_val);
@@ -302,10 +305,14 @@ public:
};
class EditorPropertyEasing : public EditorProperty {
- GDCLASS(EditorPropertyEasing, EditorProperty)
+ GDCLASS(EditorPropertyEasing, EditorProperty);
Control *easing_draw;
PopupMenu *preset;
+ EditorSpinSlider *spin;
+ bool setting;
+
bool full;
+ bool flip;
enum {
EASING_ZERO,
@@ -318,13 +325,16 @@ class EditorPropertyEasing : public EditorProperty {
};
- bool flip;
-
void _drag_easing(const Ref<InputEvent> &p_ev);
void _draw_easing();
- void _notification(int p_what);
void _set_preset(int);
+ void _setup_spin();
+ void _spin_value_changed(double p_value);
+ void _spin_focus_exited();
+
+ void _notification(int p_what);
+
protected:
static void _bind_methods();
@@ -335,7 +345,7 @@ public:
};
class EditorPropertyVector2 : public EditorProperty {
- GDCLASS(EditorPropertyVector2, EditorProperty)
+ GDCLASS(EditorPropertyVector2, EditorProperty);
EditorSpinSlider *spin[2];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -351,7 +361,7 @@ public:
};
class EditorPropertyRect2 : public EditorProperty {
- GDCLASS(EditorPropertyRect2, EditorProperty)
+ GDCLASS(EditorPropertyRect2, EditorProperty);
EditorSpinSlider *spin[4];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -367,7 +377,7 @@ public:
};
class EditorPropertyVector3 : public EditorProperty {
- GDCLASS(EditorPropertyVector3, EditorProperty)
+ GDCLASS(EditorPropertyVector3, EditorProperty);
EditorSpinSlider *spin[3];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -383,7 +393,7 @@ public:
};
class EditorPropertyPlane : public EditorProperty {
- GDCLASS(EditorPropertyPlane, EditorProperty)
+ GDCLASS(EditorPropertyPlane, EditorProperty);
EditorSpinSlider *spin[4];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -399,7 +409,7 @@ public:
};
class EditorPropertyQuat : public EditorProperty {
- GDCLASS(EditorPropertyQuat, EditorProperty)
+ GDCLASS(EditorPropertyQuat, EditorProperty);
EditorSpinSlider *spin[4];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -415,7 +425,7 @@ public:
};
class EditorPropertyAABB : public EditorProperty {
- GDCLASS(EditorPropertyAABB, EditorProperty)
+ GDCLASS(EditorPropertyAABB, EditorProperty);
EditorSpinSlider *spin[6];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -431,7 +441,7 @@ public:
};
class EditorPropertyTransform2D : public EditorProperty {
- GDCLASS(EditorPropertyTransform2D, EditorProperty)
+ GDCLASS(EditorPropertyTransform2D, EditorProperty);
EditorSpinSlider *spin[6];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -447,7 +457,7 @@ public:
};
class EditorPropertyBasis : public EditorProperty {
- GDCLASS(EditorPropertyBasis, EditorProperty)
+ GDCLASS(EditorPropertyBasis, EditorProperty);
EditorSpinSlider *spin[9];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -463,7 +473,7 @@ public:
};
class EditorPropertyTransform : public EditorProperty {
- GDCLASS(EditorPropertyTransform, EditorProperty)
+ GDCLASS(EditorPropertyTransform, EditorProperty);
EditorSpinSlider *spin[12];
bool setting;
void _value_changed(double p_val, const String &p_name);
@@ -479,7 +489,7 @@ public:
};
class EditorPropertyColor : public EditorProperty {
- GDCLASS(EditorPropertyColor, EditorProperty)
+ GDCLASS(EditorPropertyColor, EditorProperty);
ColorPickerButton *picker;
void _color_changed(const Color &p_color);
void _popup_closed();
@@ -494,7 +504,7 @@ public:
};
class EditorPropertyNodePath : public EditorProperty {
- GDCLASS(EditorPropertyNodePath, EditorProperty)
+ GDCLASS(EditorPropertyNodePath, EditorProperty);
Button *assign;
Button *clear;
SceneTreeDialog *scene_tree;
@@ -517,7 +527,7 @@ public:
};
class EditorPropertyRID : public EditorProperty {
- GDCLASS(EditorPropertyRID, EditorProperty)
+ GDCLASS(EditorPropertyRID, EditorProperty);
Label *label;
public:
@@ -526,7 +536,7 @@ public:
};
class EditorPropertyResource : public EditorProperty {
- GDCLASS(EditorPropertyResource, EditorProperty)
+ GDCLASS(EditorPropertyResource, EditorProperty);
enum MenuOption {
@@ -605,7 +615,7 @@ public:
/// \brief The EditorInspectorDefaultPlugin class
///
class EditorInspectorDefaultPlugin : public EditorInspectorPlugin {
- GDCLASS(EditorInspectorDefaultPlugin, EditorInspectorPlugin)
+ GDCLASS(EditorInspectorDefaultPlugin, EditorInspectorPlugin);
public:
virtual bool can_handle(Object *p_object);