mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-01 21:29:07 +08:00
spine-godot: add Godot 4.6 API compatibility guards
This commit is contained in:
parent
c9cd6428dc
commit
07ee57ec68
@ -446,7 +446,20 @@ void SpineEditorPropertyAnimationMix::update_property() {
|
||||
mix_float->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
mix_float->set_name_split_ratio(0);
|
||||
mix_float->set_selectable(false);
|
||||
#if (VERSION_MAJOR >= 4 && VERSION_MINOR >= 6)
|
||||
EditorPropertyRangeHint range_hint;
|
||||
range_hint.min = 0;
|
||||
range_hint.max = 9999999;
|
||||
range_hint.step = 0.001;
|
||||
range_hint.or_greater = true;
|
||||
range_hint.or_less = false;
|
||||
range_hint.exp_range = false;
|
||||
range_hint.hide_control = false;
|
||||
range_hint.radians_as_degrees = false;
|
||||
mix_float->setup(range_hint);
|
||||
#else
|
||||
mix_float->setup(0, 9999999, 0.001, true, false, false, false);
|
||||
#endif
|
||||
mix_float->set_object_and_property(mix, "mix");
|
||||
mix_float->update_property();
|
||||
#if VERSION_MAJOR > 3
|
||||
|
||||
@ -60,7 +60,11 @@
|
||||
#include "core/math/transform_2d.h"
|
||||
#include "core/variant/array.h"
|
||||
#include "scene/resources/mesh.h"
|
||||
#if (VERSION_MAJOR >= 4 && VERSION_MINOR >= 6)
|
||||
#include "servers/rendering/rendering_server.h"
|
||||
#else
|
||||
#include "servers/rendering_server.h"
|
||||
#endif
|
||||
#include "scene/resources/canvas_item_material.h"
|
||||
#if VERSION_MINOR > 0 && defined(TOOLS_ENABLED)
|
||||
#include "editor/editor_interface.h"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user