First UI push

pull/1/head
Pascal Gauthier 10 years ago
parent a49ec32de3
commit f95dc91319
  1. BIN
      Resources/ui/ButtonUnlabeled_50x30.png
  2. BIN
      Resources/ui/GlobalEditor_864x144.png
  3. BIN
      Resources/ui/Knob_34x34.png
  4. BIN
      Resources/ui/LFO_36_26.png
  5. BIN
      Resources/ui/Light_14x14.png
  6. BIN
      Resources/ui/Meter_140x8.png
  7. BIN
      Resources/ui/NotoSans-Regular.ttf
  8. BIN
      Resources/ui/OperatorEditor_287x218.png
  9. BIN
      Resources/ui/Scaling_36_26.png
  10. BIN
      Resources/ui/Slider_26x26.png
  11. BIN
      Resources/ui/Switch_48x26.png
  12. BIN
      Resources/ui/source/Dexed-skinman.skin
  13. BIN
      Resources/ui/source/Knob_34x34.knob
  14. BIN
      Resources/ui/source/render_template.png
  15. 23
      Source/DXLookNFeel.cpp
  16. 8
      Source/DXLookNFeel.h
  17. 6
      Source/PluginEditor.cpp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

@ -23,8 +23,31 @@
Colour DXLookNFeel::dxDarkBrown = Colour(0xFF47260D); Colour DXLookNFeel::dxDarkBrown = Colour(0xFF47260D);
Colour DXLookNFeel::dxLightBrown = Colour(0xFFA87B67); Colour DXLookNFeel::dxLightBrown = Colour(0xFFA87B67);
Colour DXLookNFeel::background = Colour(60,50,47);
Colour DXLookNFeel::fillColour = Colour(77,159,151);
DXLookNFeel::DXLookNFeel() { DXLookNFeel::DXLookNFeel() {
setColour(TextButton::buttonColourId,Colour(0xFF0FC00F)); setColour(TextButton::buttonColourId,Colour(0xFF0FC00F));
setColour(Slider::rotarySliderOutlineColourId,Colour(0xFF0FC00F)); setColour(Slider::rotarySliderOutlineColourId,Colour(0xFF0FC00F));
setColour(Slider::rotarySliderFillColourId,Colour(0xFFFFFFFF)); setColour(Slider::rotarySliderFillColourId,Colour(0xFFFFFFFF));
} }
void DXLookNFeel::drawRotarySlider( Graphics &g, int x, int y, int width, int height, float sliderPosProportional,
float rotaryStartAngle, float rotaryEndAngle, Slider &slider ) {
Image myStrip = ImageCache::getFromMemory (BinaryData::knobstrip_png, BinaryData::knobstrip_pngSize);
const double fractRotation = (slider.getValue() - slider.getMinimum()) / (slider.getMaximum() - slider.getMinimum()); //value between 0 and 1 for current amount of rotation
const int nFrames = myStrip.getHeight()/myStrip.getWidth(); // number of frames for vertical film strip
const int frameIdx = (int)ceil(fractRotation * ((double)nFrames-1.0) ); // current index from 0 --> nFrames-1
const float radius = jmin (width / 2.0f, height / 2.0f) ;
const float centreX = x + width * 0.5f;
const float centreY = y + height * 0.5f;
const float rx = centreX - radius - 1.0f;
const float ry = centreY - radius - 1.0f;
g.drawImage(myStrip, (int)rx, (int)ry, 2*(int)radius, 2*(int)radius, 0, frameIdx*myStrip.getWidth(), myStrip.getWidth(), myStrip.getWidth());
};

@ -25,10 +25,14 @@
class DXLookNFeel : public LookAndFeel_V3 { class DXLookNFeel : public LookAndFeel_V3 {
public: public:
static Colour background;
static Colour fillColour;
DXLookNFeel();
virtual void drawRotarySlider(Graphics &g, int x, int y, int width, int height, float sliderPosProportional, float rotaryStartAngle, float rotaryEndAngle, Slider &slider );
static Colour dxDarkBrown; static Colour dxDarkBrown;
static Colour dxLightBrown; static Colour dxLightBrown;
DXLookNFeel();
}; };
#endif // DXLOOKNFEEL_H_INCLUDED #endif // DXLOOKNFEEL_H_INCLUDED

@ -25,6 +25,7 @@
#include "SysexComm.h" #include "SysexComm.h"
#include "Dexed.h" #include "Dexed.h"
#include "math.h" #include "math.h"
#include "DXLookNFeel.h"
#include <fstream> #include <fstream>
#include "msfa/fm_op_kernel.h" #include "msfa/fm_op_kernel.h"
@ -226,11 +227,8 @@ DexedAudioProcessorEditor::~DexedAudioProcessorEditor() {
//============================================================================== //==============================================================================
void DexedAudioProcessorEditor::paint (Graphics& g) { void DexedAudioProcessorEditor::paint (Graphics& g) {
g.setColour(Colour(0xFF47260D)); g.setColour(DXLookNFeel::background);
g.fillRoundedRectangle(0.0f, 0.0f, (float) getWidth(), (float) getHeight(), 0); g.fillRoundedRectangle(0.0f, 0.0f, (float) getWidth(), (float) getHeight(), 0);
g.setColour(Colour(0xFF4D3828));
g.fillRoundedRectangle(0.0f, 30, (float) getWidth(), 200, 0);
} }
void DexedAudioProcessorEditor::buttonClicked(Button *buttonThatWasClicked) { void DexedAudioProcessorEditor::buttonClicked(Button *buttonThatWasClicked) {

Loading…
Cancel
Save