feat(gui): add knob value popup, tooltips, tab cycling, and layout system
Add a floating value label near the cursor while dragging a knob, giving immediate feedback without altering slider behaviour. Inherit SettableTooltipClient on ToggleButton so setTooltip works consistently with knobs and combos. Introduce a shared layout constants namespace in PluginEditor so every panel, row and control position derives from one spacing system. Add tooltips to all knobs, combos, toggles, and buttons. Add Tab/Shift+Tab tab cycling via keyPressed, with a TooltipWindow for hover hints.
This commit is contained in:
+10
-3
@@ -30,6 +30,7 @@ public:
|
||||
void paint (juce::Graphics&) override;
|
||||
void resized() override;
|
||||
void timerCallback() override;
|
||||
bool keyPressed (const juce::KeyPress& key) override;
|
||||
|
||||
void setTab (int index);
|
||||
|
||||
@@ -42,6 +43,9 @@ private:
|
||||
|
||||
juce::Component root;
|
||||
|
||||
// --- tooltips ---
|
||||
juce::TooltipWindow tooltipWindow;
|
||||
|
||||
// --- top bar ---
|
||||
std::unique_ptr<juce::Drawable> logo;
|
||||
juce::ComboBox presetCombo;
|
||||
@@ -103,9 +107,12 @@ private:
|
||||
|
||||
// --- helpers ---
|
||||
Knob* makeKnob (juce::Component* parent, const juce::String& name, const juce::String& paramId,
|
||||
std::function<juce::String (float)> fmt = {});
|
||||
juce::ComboBox* makeCombo (juce::Component* parent, const juce::String& paramId, const juce::StringArray& items);
|
||||
ToggleButton* makeToggle (juce::Component* parent, const juce::String& label, const juce::String& paramId);
|
||||
std::function<juce::String (float)> fmt = {}, const juce::String& tooltip = {});
|
||||
juce::ComboBox* makeCombo (juce::Component* parent, const juce::String& paramId, const juce::StringArray& items,
|
||||
const juce::String& tooltip = {});
|
||||
ToggleButton* makeToggle (juce::Component* parent, const juce::String& label, const juce::String& paramId,
|
||||
const juce::String& tooltip = {});
|
||||
void cycleTab (int delta);
|
||||
|
||||
void buildTopBar();
|
||||
void buildOscTab();
|
||||
|
||||
Reference in New Issue
Block a user