50 lines
2.1 KiB
C++
50 lines
2.1 KiB
C++
#pragma once
|
|
|
|
#include "Gallery_Session_Control.h"
|
|
#include "Gallery_Renderables_Adminive.h"
|
|
|
|
namespace adminive {
|
|
|
|
template <>
|
|
struct Type_Descriptor<renderive::web::Gallery_Feedback_Policy> {
|
|
static auto get() {
|
|
using T = renderive::web::Gallery_Feedback_Policy;
|
|
using namespace renderive::web::gallery_adminive;
|
|
return object<T>("feedback_policy", "Consumer feedback",
|
|
boolean<&T::enabled>("enabled", "Enabled"),
|
|
boolean<&T::pixel>("pixel", "Pixel feedback"),
|
|
boolean<&T::presentation>("presentation", "Presentation feedback"),
|
|
boolean<&T::manual>("manual", "Manual feedback"),
|
|
number<&T::manual_fps>("manual_fps", "Manual FPS"));
|
|
}
|
|
};
|
|
|
|
template <>
|
|
struct Type_Descriptor<renderive::web::Gallery_Session_Control_Model> {
|
|
static auto get() {
|
|
using T = renderive::web::Gallery_Session_Control_Model;
|
|
using namespace renderive::web::gallery_adminive;
|
|
return object<T>("gallery_session", "Scene",
|
|
color<&T::background_color>("background_color", "Background"),
|
|
boolean<&T::performance_overlay>("performance_overlay", "Performance overlay"),
|
|
boolean<&T::renderable_visible>("renderable_visible", "Renderable visible"),
|
|
select<&T::cache_mode>("cache_mode", "Cache mode"),
|
|
editable<&T::object_name>("object_name", "Object name", Field_Control::text),
|
|
boolean<&T::frequency_limit_enabled>("frequency_limit_enabled", "Frequency limit"),
|
|
number<&T::max_render_fps>("max_render_fps", "Maximum render FPS"),
|
|
editable<&T::feedback>("feedback", "Consumer feedback", Field_Control::automatic));
|
|
}
|
|
};
|
|
|
|
template <>
|
|
struct Object_Adapter<renderive::web::Gallery_Session_Control> {
|
|
using object_type = renderive::web::Gallery_Session_Control;
|
|
using model_type = renderive::web::Gallery_Session_Control_Model;
|
|
static model_type snapshot(const object_type& value) { return value.adminive_snapshot(); }
|
|
static void commit(object_type& target, model_type value) {
|
|
target.adminive_commit(std::move(value));
|
|
}
|
|
};
|
|
|
|
} // namespace adminive
|