mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-27 02:20:05 +00:00
BLOCKS: Moved ConfigType from BlocksConfigManager to Block::ConfigMetaData
This commit is contained in:
parent
09cc2e00d3
commit
e73e1282c6
2 changed files with 14 additions and 12 deletions
|
|
@ -291,6 +291,15 @@ public:
|
|||
{
|
||||
static constexpr int32 numOptionNames = 8;
|
||||
|
||||
enum class ConfigType
|
||||
{
|
||||
integer,
|
||||
floating,
|
||||
boolean,
|
||||
colour,
|
||||
options
|
||||
};
|
||||
|
||||
ConfigMetaData() {}
|
||||
|
||||
// Constructor to work around VS2015 bugs...
|
||||
|
|
@ -299,7 +308,7 @@ public:
|
|||
juce::Range<int32> rangeToUse,
|
||||
bool active,
|
||||
const char* itemName,
|
||||
uint32 itemType,
|
||||
ConfigType itemType,
|
||||
const char* options[ConfigMetaData::numOptionNames],
|
||||
const char* groupName)
|
||||
: item (itemIndex),
|
||||
|
|
@ -362,7 +371,7 @@ public:
|
|||
juce::Range<int32> range;
|
||||
bool isActive = false;
|
||||
juce::String name;
|
||||
uint32 type = 0;
|
||||
ConfigType type = ConfigType::integer;
|
||||
juce::String optionNames[numOptionNames] = {};
|
||||
juce::String group;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ namespace juce
|
|||
|
||||
using namespace BlocksProtocol;
|
||||
|
||||
using ConfigType = Block::ConfigMetaData::ConfigType;
|
||||
|
||||
/** Manages the configuration of blocks
|
||||
|
||||
@tags{Blocks}
|
||||
|
|
@ -45,15 +47,6 @@ struct BlockConfigManager
|
|||
void setDeviceIndex (TopologyIndex newDeviceIndex) { deviceIndex = newDeviceIndex; }
|
||||
void setDeviceComms (PhysicalTopologySource::DeviceConnection* newConn) { deviceConnection = newConn; }
|
||||
|
||||
enum ConfigType
|
||||
{
|
||||
integer,
|
||||
floating,
|
||||
boolean,
|
||||
colour,
|
||||
options
|
||||
};
|
||||
|
||||
static constexpr uint32 numConfigItems = 61;
|
||||
|
||||
/** Structure describing a configuration */
|
||||
|
|
@ -73,7 +66,7 @@ struct BlockConfigManager
|
|||
|
||||
Block::ConfigMetaData toConfigMetaData() const
|
||||
{
|
||||
return Block::ConfigMetaData ((uint32) item, value, { min, max }, isActive, name, (uint32) type, (const char**) optionNames, group);
|
||||
return Block::ConfigMetaData ((uint32) item, value, { min, max }, isActive, name, type, (const char**) optionNames, group);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue