summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-06-12 08:47:41 +0200
committerGitHub <noreply@github.com>2022-06-12 08:47:41 +0200
commit79fd068a10e9976bf76d16e7cdf749693c9d4200 (patch)
tree0dfee3fd5789a5faac177a229ececddc1e489281 /editor
parent8df8fff54ba2263d53448b0a7f4e33fa76fdea50 (diff)
parent4678736a3958392362b805129aad1c41c36896c8 (diff)
Merge pull request #61240 from fire-forge/suffix
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();
};