diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-06-07 22:46:30 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-06-07 23:22:53 +0200 |
commit | 4a818328b3041afdd3be384beba41413d044c2de (patch) | |
tree | d2fdc982dc7aa27259d52fb698baed1e9e07df47 /editor | |
parent | b59abcd07e8c9bd2c79061f8cfc827a43c9408ef (diff) |
wa
Diffstat (limited to 'editor')
-rw-r--r-- | editor/inspect-types.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/editor/inspect-types.cpp b/editor/inspect-types.cpp index 65af0966..2a4fd05d 100644 --- a/editor/inspect-types.cpp +++ b/editor/inspect-types.cpp @@ -164,14 +164,17 @@ template<> struct entity_accessors<hole, inspect_intent_t> [](const hole& x) { return x.flags.is_wall ? st::enabled : st::readonly; }, constantly(constraints::range<uint8_t>{0, tile_size_z}), }, + E::type<bool>::field{ "enabled"_s, + [](const hole& x) { return x.flags.enabled; }, + [](hole& x, bool value) { x.set_enabled(x.flags.on_render, x.flags.on_physics, value); }, + }, E::type<bool>::field{"on-render"_s, [](const hole& x) { return x.flags.on_render; }, - [](hole& x, bool value) { x.set_enabled(value, x.flags.on_physics); }, + [](hole& x, bool value) { x.set_enabled(value, x.flags.on_physics, x.flags.enabled); }, }, - E::type<bool>::field{ - "on-physics"_s, + E::type<bool>::field{ "on-physics"_s, [](const hole& x) { return x.flags.on_physics; }, - [](hole& x, bool value) { x.set_enabled(x.flags.on_render, value); }, + [](hole& x, bool value) { x.set_enabled(x.flags.on_render, value, x.flags.enabled); }, }, }; return std::tuple_cat(tuple0, tuple); |