Skip to content
Snippets Groups Projects
Commit 66da7d34 authored by Philip Trettner's avatar Philip Trettner
Browse files

fixed global config changes inside interactive viewers

parent e25c1ab7
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,7 @@ private:
detail::shared_command_queue const mStaticCommandQueue;
/// Whether mStaticCommandQueue contains interactive parts. If false, the layout does not require a rebuild each frame
bool const mIsInteractive;
detail::global_settings const mSettings;
detail::global_settings const& mSettings;
/// A subview data cache, keys are x/y upper left corner
std::unordered_map<tg::ipos2, SubViewData> mSubViewDataCache;
......
......@@ -55,8 +55,8 @@ void configure(Renderable&, infinite_accumulation_t b)
}
void configure(Renderable& r, maybe_empty_t) { r.setCanBeEmpty(); }
void configure(Renderable&, no_left_mouse_control_t) { detail::set_left_mouse_control(false); }
void configure(Renderable&, no_right_mouse_control_t) { detail::set_right_mouse_control(false); }
void configure(Renderable&, no_left_mouse_control_t b) { detail::set_left_mouse_control(!b.active); }
void configure(Renderable&, no_right_mouse_control_t b) { detail::set_right_mouse_control(!b.active); }
void configure(Renderable&, controls_2d_t b) { detail::set_2d_controls(b.active); }
void configure(Renderable&, dark_ui_t b) { detail::set_ui_darkmode(b.active); }
......
......@@ -103,8 +103,8 @@ inline auto constexpr backface_culling = backface_culling_t{};
// passthrough configures for scene modification commands
void configure(Renderable&, no_grid_t b);
void configure(Renderable&, no_shadow_t);
void configure(Renderable&, no_left_mouse_control_t);
void configure(Renderable&, no_right_mouse_control_t);
void configure(Renderable&, no_left_mouse_control_t b);
void configure(Renderable&, no_right_mouse_control_t b);
void configure(Renderable&, print_mode_t b);
void configure(Renderable&, maybe_empty_t);
void configure(Renderable&, no_outline_t b);
......
......@@ -35,9 +35,13 @@ struct maybe_empty_t
};
struct no_left_mouse_control_t
{
bool active = true;
no_left_mouse_control_t operator()(bool a) const { return {a}; }
};
struct no_right_mouse_control_t
{
bool active = true;
no_right_mouse_control_t operator()(bool a) const { return {a}; }
};
struct no_fresnel_t
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment