diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/inspect-types.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/inspect-types.cpp b/editor/inspect-types.cpp index 41a236b0..fe33a760 100644 --- a/editor/inspect-types.cpp +++ b/editor/inspect-types.cpp @@ -52,10 +52,6 @@ struct entity_accessors<object, inspect_intent_t> { [](const object& x) { return x.pass; }, [](object& x, pass_mode value) { x.set_bbox(x.offset, x.bbox_offset, x.bbox_size, value); }, }, - E::type<float>::field{"speed"_s, - [](const object& x) { return x.speed; }, - [](object& x, float value) { x.speed = Math::clamp(value, 0.f, 1e6f); } - }, E::type<Vector2b>::field{"bbox-offset"_s, [](const object& x) { return x.bbox_offset; }, [](object& x, Vector2b value) { x.set_bbox(x.offset, value, x.bbox_size, x.pass); }, @@ -211,6 +207,10 @@ struct entity_accessors<critter, inspect_intent_t> { E::type<String>::field{"name"_s, [](const critter& x) { return x.name; }, [](critter& x, const String& value) { x.name = value; } }, + E::type<float>::field{"speed"_s, + [](const critter& x) { return x.speed; }, + [](critter& x, float value) { x.speed = Math::clamp(value, 0.f, 1e6f); } + }, }; auto t1 = std::tuple{ E::type<bool>::field{"playable"_s, @@ -218,7 +218,7 @@ struct entity_accessors<critter, inspect_intent_t> { [](critter& x, bool value) { x.playable = value; }, constantly(constraints::max_length{ 128 }) }, }; - return std::tuple_cat(t0, prev, t1); + return std::tuple_cat(t0, t1, prev); } }; |