// // Created by versustune on 01.03.20. // #ifndef VENO_CONFIG_H #define VENO_CONFIG_H #include "JuceHeader.h" #include "../GUI/LookAndFeel/LookHandler.h" #include "../GUI/Theme/Theme.h" #include class Config : public Timer { private: std::shared_ptr m_config = nullptr; std::shared_ptr m_theme = nullptr; static std::shared_ptr m_instance; int m_currentLook = 0; //nah move the bitch logic from current to next std::unordered_map m_editors; std::shared_ptr m_lookHandler; public: int m_fps = 60; float m_scale = 1.0f; static std::shared_ptr getInstance (); void saveAll (); int getCurrentLook (); void setColourForIndex (Colour* colour, ThemeColour index); std::shared_ptr getCurrentTheme (); double getScale () const; // can be public but doesnt need! Config (); ~Config (); void registerEditor (AudioProcessorEditor* editor, const std::string& name); void removeEditor (const std::string& name); int getEditorCount (); int getFps () const; void setScale(float value); void setFps(float value); void timerCallback () override; void repaintAll(); protected: void initConfig (); }; #endif //VENO_CONFIG_H