From 7ff29b9ef44d2da783882af9f1882feeb3cf4460 Mon Sep 17 00:00:00 2001 From: Oli Larkin Date: Fri, 8 Feb 2013 15:00:04 +0000 Subject: [PATCH] [IPLUG] Add the possibility to specify shape as an argument to IParam::InitDouble() --- WDL/IPlug/IParam.cpp | 4 +++- WDL/IPlug/IParam.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WDL/IPlug/IParam.cpp b/WDL/IPlug/IParam.cpp index 7b136cfa..dbd10a39 100644 --- a/WDL/IPlug/IParam.cpp +++ b/WDL/IPlug/IParam.cpp @@ -35,7 +35,7 @@ void IParam::InitInt(const char* name, int defaultVal, int minVal, int maxVal, c InitDouble(name, (double) defaultVal, (double) minVal, (double) maxVal, 1.0, label, group); } -void IParam::InitDouble(const char* name, double defaultVal, double minVal, double maxVal, double step, const char* label, const char* group) +void IParam::InitDouble(const char* name, double defaultVal, double minVal, double maxVal, double step, const char* label, const char* group, double shape) { if (mType == kTypeNone) mType = kTypeDouble; @@ -54,6 +54,8 @@ void IParam::InitDouble(const char* name, double defaultVal, double minVal, doub { ; } + + SetShape(shape); } void IParam::SetShape(double shape) diff --git a/WDL/IPlug/IParam.h b/WDL/IPlug/IParam.h index d810d38f..53839ef5 100644 --- a/WDL/IPlug/IParam.h +++ b/WDL/IPlug/IParam.h @@ -32,7 +32,7 @@ public: void InitBool(const char* name, bool defaultVal, const char* label = "", const char* group = ""); // LABEL not used here void InitEnum(const char* name, int defaultVal, int nEnums, const char* label = "", const char* group = ""); // LABEL not used here void InitInt(const char* name, int defaultVal, int minVal, int maxVal, const char* label = "", const char* group = ""); - void InitDouble(const char* name, double defaultVal, double minVal, double maxVal, double step, const char* label = "", const char* group = ""); + void InitDouble(const char* name, double defaultVal, double minVal, double maxVal, double step, const char* label = "", const char* group = "", double shape = 1.); void Set(double value) { mValue = BOUNDED(value, mMin, mMax); } void SetDisplayText(int value, const char* text); -- 2.11.4.GIT