@@ -2,7 +2,7 @@ | |||||
#include "app/common.hpp" | #include "app/common.hpp" | ||||
#include "widget/OpaqueWidget.hpp" | #include "widget/OpaqueWidget.hpp" | ||||
#include "ui/Tooltip.hpp" | #include "ui/Tooltip.hpp" | ||||
#include "app/ParamQuantity.hpp" | |||||
#include "engine/ParamQuantity.hpp" | |||||
#include "history.hpp" | #include "history.hpp" | ||||
@@ -12,11 +12,10 @@ namespace app { | |||||
/** Manages an engine::Param on a ModuleWidget. */ | /** Manages an engine::Param on a ModuleWidget. */ | ||||
struct ParamWidget : widget::OpaqueWidget { | struct ParamWidget : widget::OpaqueWidget { | ||||
ParamQuantity *paramQuantity = NULL; | |||||
engine::ParamQuantity *paramQuantity = NULL; | |||||
float dirtyValue = NAN; | float dirtyValue = NAN; | ||||
ui::Tooltip *tooltip = NULL; | ui::Tooltip *tooltip = NULL; | ||||
~ParamWidget(); | |||||
void step() override; | void step() override; | ||||
void draw(const DrawArgs &args) override; | void draw(const DrawArgs &args) override; | ||||
void onButton(const widget::ButtonEvent &e) override; | void onButton(const widget::ButtonEvent &e) override; | ||||
@@ -5,7 +5,7 @@ | |||||
namespace rack { | namespace rack { | ||||
namespace app { | |||||
namespace engine { | |||||
/** A Quantity that wraps an engine::Param. */ | /** A Quantity that wraps an engine::Param. */ | ||||
@@ -33,5 +33,5 @@ struct ParamQuantity : Quantity { | |||||
}; | }; | ||||
} // namespace app | |||||
} // namespace engine | |||||
} // namespace rack | } // namespace rack |
@@ -5,10 +5,10 @@ | |||||
#include "ui/MenuLabel.hpp" | #include "ui/MenuLabel.hpp" | ||||
#include "ui/Menu.hpp" | #include "ui/Menu.hpp" | ||||
#include "app/PortWidget.hpp" | #include "app/PortWidget.hpp" | ||||
#include "app/ParamQuantity.hpp" | |||||
#include "app/ParamWidget.hpp" | #include "app/ParamWidget.hpp" | ||||
#include "app/Scene.hpp" | #include "app/Scene.hpp" | ||||
#include "engine/Module.hpp" | #include "engine/Module.hpp" | ||||
#include "engine/ParamQuantity.hpp" | |||||
#include "app.hpp" | #include "app.hpp" | ||||
#include "window.hpp" | #include "window.hpp" | ||||
@@ -66,7 +66,7 @@ TParamWidget *createParam(math::Vec pos, engine::Module *module, int paramId) { | |||||
if (f) | if (f) | ||||
o->paramQuantity = f->create(); | o->paramQuantity = f->create(); | ||||
else | else | ||||
o->paramQuantity = new app::ParamQuantity; | |||||
o->paramQuantity = new engine::ParamQuantity; | |||||
o->paramQuantity->module = module; | o->paramQuantity->module = module; | ||||
o->paramQuantity->paramId = paramId; | o->paramQuantity->paramId = paramId; | ||||
} | } | ||||
@@ -2,7 +2,6 @@ | |||||
#include "ui/MenuOverlay.hpp" | #include "ui/MenuOverlay.hpp" | ||||
#include "ui/TextField.hpp" | #include "ui/TextField.hpp" | ||||
#include "app/Scene.hpp" | #include "app/Scene.hpp" | ||||
#include "app/ParamQuantity.hpp" | |||||
#include "app.hpp" | #include "app.hpp" | ||||
#include "engine/Engine.hpp" | #include "engine/Engine.hpp" | ||||
#include "settings.hpp" | #include "settings.hpp" | ||||
@@ -109,11 +108,6 @@ struct ParamUnmapItem : ui::MenuItem { | |||||
}; | }; | ||||
ParamWidget::~ParamWidget() { | |||||
if (paramQuantity) | |||||
delete paramQuantity; | |||||
} | |||||
void ParamWidget::step() { | void ParamWidget::step() { | ||||
if (paramQuantity) { | if (paramQuantity) { | ||||
float value = paramQuantity->getValue(); | float value = paramQuantity->getValue(); | ||||
@@ -1,10 +1,10 @@ | |||||
#include "app/ParamQuantity.hpp" | |||||
#include "engine/ParamQuantity.hpp" | |||||
#include "app.hpp" | #include "app.hpp" | ||||
#include "engine/Engine.hpp" | #include "engine/Engine.hpp" | ||||
namespace rack { | namespace rack { | ||||
namespace app { | |||||
namespace engine { | |||||
engine::Param *ParamQuantity::getParam() { | engine::Param *ParamQuantity::getParam() { | ||||
@@ -119,5 +119,5 @@ std::string ParamQuantity::getUnit() { | |||||
} | } | ||||
} // namespace app | |||||
} // namespace engine | |||||
} // namespace rack | } // namespace rack |