diff --git a/skinny/src/Gui.cpp b/skinny/src/Gui.cpp index fd1e5f8..998c6c7 100755 --- a/skinny/src/Gui.cpp +++ b/skinny/src/Gui.cpp @@ -98,7 +98,7 @@ void Gui::reload() layerMidiInputs_[i]->setText(""); layerCCInputs_[i]->setText(""); layerRetriggerToggles_[i]->setChecked(false); - blendModeDropdowns_[i]->select(0); + blendModeDropdowns_[i]->select(static_cast(DEFAULT_BLEND_MODE)); } } @@ -657,13 +657,12 @@ void Gui::setupBlendModePanel(glm::ivec2& pos) blendModePanel_->addBreak(); std::vector options; - for (auto i = static_cast(BlendMode::Normal); i < static_cast(BlendMode::Count); ++i) + for (auto i = static_cast(BlendMode::Overlay); i < static_cast(BlendMode::Count); ++i) options.push_back(c_str(static_cast(i))); for (int i = 0; i < blendModeDropdowns_.size(); ++i) { blendModeDropdowns_[i] = blendModePanel_->addDropdown("Select...", options); blendModeDropdowns_[i]->setName(std::to_string(i)); - blendModeDropdowns_[i]->select(static_cast(BlendMode::Normal)); blendModeDropdowns_[i]->onDropdownEvent(this, &Gui::onBlendModeDropdown); } blendModePanel_->addBreak(); diff --git a/skinny/src/Layer.cpp b/skinny/src/Layer.cpp index 002d93a..07ca281 100755 --- a/skinny/src/Layer.cpp +++ b/skinny/src/Layer.cpp @@ -27,7 +27,7 @@ Layer::Layer(int id, ErrorType error) : id_(id), name_(error == ErrorType::Invalid ? "Invalid description." : "Failed to load."), valid_(false), - blendMode_(BlendMode::Normal), + blendMode_(DEFAULT_BLEND_MODE), alpha_(0) { } diff --git a/skinny/src/base.cpp b/skinny/src/base.cpp index 0411927..a01e977 100755 --- a/skinny/src/base.cpp +++ b/skinny/src/base.cpp @@ -6,8 +6,8 @@ const char * c_str(BlendMode blendMode) { switch (blendMode) { - case BlendMode::Normal: - return "Normal"; + case BlendMode::Overlay: + return "Overlay"; case BlendMode::Multiply: return "Multiply"; case BlendMode::Screen: diff --git a/skinny/src/base.h b/skinny/src/base.h index dfa728d..10d9296 100755 --- a/skinny/src/base.h +++ b/skinny/src/base.h @@ -24,7 +24,7 @@ static constexpr const char * FONT_ITALIC = "fonts/IBMPlexSerif-Italic.ttf"; enum class BlendMode { Invalid = -1, - Normal = 0, // s + Overlay = 0, // s Multiply = 1, // b * s Screen = 2, // 1 - ((1 - b) * (1 - s)) Darken = 3, // min(b, s) @@ -37,6 +37,8 @@ enum class BlendMode { const char* c_str(BlendMode blendMode); +static const BlendMode DEFAULT_BLEND_MODE = BlendMode::LinearDodge; + enum class EffectType { Invalid = -1, Solarize = 0, diff --git a/skinny/src/meta.h b/skinny/src/meta.h index 13b94d8..b2fb5d5 100755 --- a/skinny/src/meta.h +++ b/skinny/src/meta.h @@ -34,7 +34,7 @@ struct LayerDescription : public MappableDescription { midiNote note = invalid_midi, midiNote cc = invalid_midi, //float alpha = 1.0f, - const BlendMode& blendMode = BlendMode::Normal); + const BlendMode& blendMode = DEFAULT_BLEND_MODE); bool fromXml(ofxXmlSettings& config) override; void toXml(ofxXmlSettings& config) const override;