mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix EditorSpinSlider ignoring step
This commit is contained in:
parent
0fdbf050e0
commit
a54b8b48a0
1 changed files with 3 additions and 1 deletions
|
|
@ -51,7 +51,9 @@ String EditorSpinSlider::get_tooltip(const Point2 &p_pos) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
String EditorSpinSlider::get_text_value() const {
|
String EditorSpinSlider::get_text_value() const {
|
||||||
return TS->format_number(editing_integer ? itos(get_value()) : rtos(get_value()));
|
return TS->format_number(editing_integer
|
||||||
|
? itos(get_value())
|
||||||
|
: String::num(get_value(), Math::range_step_decimals(get_step())));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorSpinSlider::gui_input(const Ref<InputEvent> &p_event) {
|
void EditorSpinSlider::gui_input(const Ref<InputEvent> &p_event) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue