Add suffix to EditorSpinSlider tooltips

This commit is contained in:
Giganzo 2025-07-24 13:32:56 +02:00
parent 71a9948157
commit 3d6b4f9038

View file

@ -40,9 +40,9 @@
String EditorSpinSlider::get_tooltip(const Point2 &p_pos) const {
if (!read_only && grabber->is_visible()) {
Key key = (OS::get_singleton()->has_feature("macos") || OS::get_singleton()->has_feature("web_macos") || OS::get_singleton()->has_feature("web_ios")) ? Key::META : Key::CTRL;
return TS->format_number(rtos(get_value())) + "\n\n" + vformat(TTR("Hold %s to round to integers.\nHold Shift for more precise changes."), find_keycode_name(key));
return TS->format_number(rtos(get_value())) + suffix + "\n\n" + vformat(TTR("Hold %s to round to integers.\nHold Shift for more precise changes."), find_keycode_name(key));
}
return TS->format_number(rtos(get_value()));
return TS->format_number(rtos(get_value())) + suffix;
}
String EditorSpinSlider::get_text_value() const {