Browse Source

Update rack0.hpp header

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
11544f25b3
7 changed files with 44 additions and 47 deletions
  1. +1
    -1
      Makefile
  2. +23
    -23
      include/componentlibrary.hpp
  3. +2
    -2
      include/rack.hpp
  4. +13
    -14
      include/rack0.hpp
  5. +0
    -1
      src/Core/plugin.hpp
  6. +0
    -1
      src/app/CableWidget.cpp
  7. +5
    -5
      src/app/PortWidget.cpp

+ 1
- 1
Makefile View File

@@ -199,5 +199,5 @@ cmdplugins:

include compile.mk

.PHONY: all dep run debug clean dist allplugins cleanplugins distplugins plugins
.PHONY: all dep run debug clean dist plugins cleanplugins distplugins cmdplugins
.DEFAULT_GOAL := all

include/component.hpp → include/componentlibrary.hpp View File

@@ -19,25 +19,25 @@ You may not freely sell plugins using Component Library graphics.
However, a free commercial license is available for plugins sold through the [VCV Store](https://vcvrack.com/plugins.html).
Email contact@vcvrack.com for more information about licensing or the VCV Store.
*/
namespace component {
namespace componentlibrary {


////////////////////
// Color scheme
////////////////////

static const NVGcolor BLACK_TRANSPARENT = nvgRGBA(0x00, 0x00, 0x00, 0x00);
static const NVGcolor BLACK = nvgRGB(0x00, 0x00, 0x00);
static const NVGcolor WHITE = nvgRGB(0xff, 0xff, 0xff);
static const NVGcolor RED = nvgRGB(0xed, 0x2c, 0x24);
static const NVGcolor ORANGE = nvgRGB(0xf2, 0xb1, 0x20);
static const NVGcolor YELLOW = nvgRGB(0xf9, 0xdf, 0x1c);
static const NVGcolor GREEN = nvgRGB(0x90, 0xc7, 0x3e);
static const NVGcolor CYAN = nvgRGB(0x22, 0xe6, 0xef);
static const NVGcolor BLUE = nvgRGB(0x29, 0xb2, 0xef);
static const NVGcolor PURPLE = nvgRGB(0xd5, 0x2b, 0xed);
static const NVGcolor LIGHT_GRAY = nvgRGB(0xe6, 0xe6, 0xe6);
static const NVGcolor DARK_GRAY = nvgRGB(0x17, 0x17, 0x17);
static const NVGcolor SCHEME_BLACK_TRANSPARENT = nvgRGBA(0x00, 0x00, 0x00, 0x00);
static const NVGcolor SCHEME_BLACK = nvgRGB(0x00, 0x00, 0x00);
static const NVGcolor SCHEME_WHITE = nvgRGB(0xff, 0xff, 0xff);
static const NVGcolor SCHEME_RED = nvgRGB(0xed, 0x2c, 0x24);
static const NVGcolor SCHEME_ORANGE = nvgRGB(0xf2, 0xb1, 0x20);
static const NVGcolor SCHEME_YELLOW = nvgRGB(0xf9, 0xdf, 0x1c);
static const NVGcolor SCHEME_GREEN = nvgRGB(0x90, 0xc7, 0x3e);
static const NVGcolor SCHEME_CYAN = nvgRGB(0x22, 0xe6, 0xef);
static const NVGcolor SCHEME_BLUE = nvgRGB(0x29, 0xb2, 0xef);
static const NVGcolor SCHEME_PURPLE = nvgRGB(0xd5, 0x2b, 0xed);
static const NVGcolor SCHEME_LIGHT_GRAY = nvgRGB(0xe6, 0xe6, 0xe6);
static const NVGcolor SCHEME_DARK_GRAY = nvgRGB(0x17, 0x17, 0x17);

////////////////////
// Knobs
@@ -422,41 +422,41 @@ struct GrayModuleLightWidget : app::ModuleLightWidget {

struct RedLight : GrayModuleLightWidget {
RedLight() {
addBaseColor(RED);
addBaseColor(SCHEME_RED);
}
};

struct GreenLight : GrayModuleLightWidget {
GreenLight() {
addBaseColor(GREEN);
addBaseColor(SCHEME_GREEN);
}
};

struct YellowLight : GrayModuleLightWidget {
YellowLight() {
addBaseColor(YELLOW);
addBaseColor(SCHEME_YELLOW);
}
};

struct BlueLight : GrayModuleLightWidget {
BlueLight() {
addBaseColor(BLUE);
addBaseColor(SCHEME_BLUE);
}
};

/** Reads two adjacent lightIds, so `lightId` and `lightId + 1` must be defined */
struct GreenRedLight : GrayModuleLightWidget {
GreenRedLight() {
addBaseColor(GREEN);
addBaseColor(RED);
addBaseColor(SCHEME_GREEN);
addBaseColor(SCHEME_RED);
}
};

struct RedGreenBlueLight : GrayModuleLightWidget {
RedGreenBlueLight() {
addBaseColor(RED);
addBaseColor(GREEN);
addBaseColor(BLUE);
addBaseColor(SCHEME_RED);
addBaseColor(SCHEME_GREEN);
addBaseColor(SCHEME_BLUE);
}
};

@@ -621,5 +621,5 @@ struct ScrewBlack : app::SvgScrew {
};


} // namespace component
} // namespace componentlibrary
} // namespace rack

+ 2
- 2
include/rack.hpp View File

@@ -12,7 +12,7 @@
#include "app.hpp"
#include "midi.hpp"
#include "helpers.hpp"
#include "component.hpp"
#include "componentlibrary.hpp"

#include "widget/Widget.hpp"
#include "widget/TransparentWidget.hpp"
@@ -106,7 +106,7 @@ using namespace app;
using plugin::Plugin;
using plugin::Model;
using namespace engine;
using namespace component;
using namespace componentlibrary;
#endif




+ 13
- 14
include/rack0.hpp View File

@@ -1,6 +1,5 @@
#pragma once
#include "rack.hpp"
#include "componentlibrary.hpp"


namespace rack {
@@ -79,7 +78,7 @@ DEPRECATED inline std::string assetPlugin(Plugin *plugin, std::string filename)
// color
////////////////////

DEPRECATED inline NVGcolor colorClip(NVGcolor a) {return color::clip(a);}
DEPRECATED inline NVGcolor colorClip(NVGcolor a) {return color::clamp(a);}
DEPRECATED inline NVGcolor colorMinus(NVGcolor a, NVGcolor b) {return color::minus(a, b);}
DEPRECATED inline NVGcolor colorPlus(NVGcolor a, NVGcolor b) {return color::plus(a, b);}
DEPRECATED inline NVGcolor colorMult(NVGcolor a, NVGcolor b) {return color::mult(a, b);}
@@ -93,18 +92,18 @@ DEPRECATED inline std::string colorToHexString(NVGcolor c) {return color::toHexS
// componentlibrary
////////////////////

DEPRECATED static const NVGcolor COLOR_BLACK_TRANSPARENT = SCHEME_BLACK_TRANSPARENT;
DEPRECATED static const NVGcolor COLOR_BLACK = SCHEME_BLACK;
DEPRECATED static const NVGcolor COLOR_WHITE = SCHEME_WHITE;
DEPRECATED static const NVGcolor COLOR_RED = SCHEME_RED;
DEPRECATED static const NVGcolor COLOR_ORANGE = SCHEME_ORANGE;
DEPRECATED static const NVGcolor COLOR_YELLOW = SCHEME_YELLOW;
DEPRECATED static const NVGcolor COLOR_GREEN = SCHEME_GREEN;
DEPRECATED static const NVGcolor COLOR_CYAN = SCHEME_CYAN;
DEPRECATED static const NVGcolor COLOR_BLUE = SCHEME_BLUE;
DEPRECATED static const NVGcolor COLOR_PURPLE = SCHEME_PURPLE;
DEPRECATED static const NVGcolor COLOR_LIGHT_PANEL = SCHEME_LIGHT_PANEL;
DEPRECATED static const NVGcolor COLOR_DARK_PANEL = SCHEME_DARK_PANEL;
DEPRECATED static const NVGcolor COLOR_BLACK_TRANSPARENT = componentlibrary::SCHEME_BLACK_TRANSPARENT;
DEPRECATED static const NVGcolor COLOR_BLACK = componentlibrary::SCHEME_BLACK;
DEPRECATED static const NVGcolor COLOR_WHITE = componentlibrary::SCHEME_WHITE;
DEPRECATED static const NVGcolor COLOR_RED = componentlibrary::SCHEME_RED;
DEPRECATED static const NVGcolor COLOR_ORANGE = componentlibrary::SCHEME_ORANGE;
DEPRECATED static const NVGcolor COLOR_YELLOW = componentlibrary::SCHEME_YELLOW;
DEPRECATED static const NVGcolor COLOR_GREEN = componentlibrary::SCHEME_GREEN;
DEPRECATED static const NVGcolor COLOR_CYAN = componentlibrary::SCHEME_CYAN;
DEPRECATED static const NVGcolor COLOR_BLUE = componentlibrary::SCHEME_BLUE;
DEPRECATED static const NVGcolor COLOR_PURPLE = componentlibrary::SCHEME_PURPLE;
DEPRECATED static const NVGcolor COLOR_LIGHT_PANEL = componentlibrary::SCHEME_LIGHT_GRAY;
DEPRECATED static const NVGcolor COLOR_DARK_PANEL = componentlibrary::SCHEME_DARK_GRAY;

////////////////////
// helpers


+ 0
- 1
src/Core/plugin.hpp View File

@@ -1,5 +1,4 @@
#include "rack.hpp"
#include "component.hpp"


using namespace rack;


+ 0
- 1
src/app/CableWidget.cpp View File

@@ -1,6 +1,5 @@
#include "app/CableWidget.hpp"
#include "app/Scene.hpp"
#include "component.hpp"
#include "window.hpp"
#include "event.hpp"
#include "app.hpp"


+ 5
- 5
src/app/PortWidget.cpp View File

@@ -3,7 +3,7 @@
#include "window.hpp"
#include "app.hpp"
#include "history.hpp"
#include "component.hpp"
#include "componentlibrary.hpp"


namespace rack {
@@ -12,11 +12,11 @@ namespace app {

struct PlugLight : MultiLightWidget {
PlugLight() {
addBaseColor(component::GREEN);
addBaseColor(component::RED);
addBaseColor(component::BLUE);
addBaseColor(componentlibrary::SCHEME_GREEN);
addBaseColor(componentlibrary::SCHEME_RED);
addBaseColor(componentlibrary::SCHEME_BLUE);
box.size = math::Vec(8, 8);
bgColor = component::BLACK_TRANSPARENT;
bgColor = componentlibrary::SCHEME_BLACK_TRANSPARENT;
}
};



Loading…
Cancel
Save