Ver Fonte

change step to .01 for float

Suchaaver Chahal há 8 anos atrás
pai
commit
e29931b22a
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      editor/property_editor.cpp

+ 2 - 2
editor/property_editor.cpp

@@ -376,7 +376,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
 			if (hint == PROPERTY_HINT_RANGE) {
 			if (hint == PROPERTY_HINT_RANGE) {
 
 
 				int c = hint_text.get_slice_count(",");
 				int c = hint_text.get_slice_count(",");
-				float min = 0, max = 100, step = 1;
+				float min = 0, max = 100, step = .01;
 				if (c >= 1) {
 				if (c >= 1) {
 
 
 					if (!hint_text.get_slice(",", 0).empty())
 					if (!hint_text.get_slice(",", 0).empty())
@@ -3032,7 +3032,7 @@ void PropertyEditor::update_tree() {
 				if (p.hint == PROPERTY_HINT_SPRITE_FRAME || p.hint == PROPERTY_HINT_RANGE || p.hint == PROPERTY_HINT_EXP_RANGE) {
 				if (p.hint == PROPERTY_HINT_SPRITE_FRAME || p.hint == PROPERTY_HINT_RANGE || p.hint == PROPERTY_HINT_EXP_RANGE) {
 
 
 					int c = p.hint_string.get_slice_count(",");
 					int c = p.hint_string.get_slice_count(",");
-					float min = 0, max = 100, step = 1;
+					float min = 0, max = 100, step = .01;
 					if (c >= 1) {
 					if (c >= 1) {
 
 
 						min = p.hint_string.get_slice(",", 0).to_double();
 						min = p.hint_string.get_slice(",", 0).to_double();