summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorFireForge <67974470+fire-forge@users.noreply.github.com>2022-05-20 00:24:41 -0500
committerFireForge <67974470+fire-forge@users.noreply.github.com>2022-06-11 09:41:05 -0500
commit4678736a3958392362b805129aad1c41c36896c8 (patch)
tree5989c525a71166a1da7fc960bbc4bd2e0a90550c /editor
parent126e4d0a5b182a2eea4e49e21344e376acdbba8c (diff)
Add suffixes to all nodes and resources
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_properties.cpp5
-rw-r--r--editor/editor_properties.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 521f237fb1..ddf1974070 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -1259,12 +1259,13 @@ void EditorPropertyInteger::update_property() {
void EditorPropertyInteger::_bind_methods() {
}
-void EditorPropertyInteger::setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_allow_greater, bool p_allow_lesser) {
+void EditorPropertyInteger::setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_allow_greater, bool p_allow_lesser, const String &p_suffix) {
spin->set_min(p_min);
spin->set_max(p_max);
spin->set_step(p_step);
spin->set_allow_greater(p_allow_greater);
spin->set_allow_lesser(p_allow_lesser);
+ spin->set_suffix(p_suffix);
}
EditorPropertyInteger::EditorPropertyInteger() {
@@ -3492,7 +3493,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
EditorPropertyInteger *editor = memnew(EditorPropertyInteger);
EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1);
- editor->setup(hint.min, hint.max, hint.step, hint.greater, hint.lesser);
+ editor->setup(hint.min, hint.max, hint.step, hint.greater, hint.lesser, hint.suffix);
return editor;
}
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index a3990db678..6513eb0390 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -368,7 +368,7 @@ protected:
public:
virtual void update_property() override;
- void setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_allow_greater, bool p_allow_lesser);
+ void setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_allow_greater, bool p_allow_lesser, const String &p_suffix = String());
EditorPropertyInteger();
};