void update() { if (bounds.isEmpty()) setBounds (0, 0, getParentWidth(), getParentHeight()); else setBounds (bounds); bluetoothDevicesList.setBounds (getOverlayBounds().withTrimmedTop (40)); }
void paint (Graphics& g) override { g.fillAll (Colours::black.withAlpha (0.6f)); g.setColour (Colour (0xffdfdfdf)); Rectangle<int> overlayBounds = getOverlayBounds(); g.fillRect (overlayBounds); g.setColour (Colours::black); g.setFont (16); g.drawText ("Bluetooth MIDI Devices", overlayBounds.removeFromTop (20).reduced (3, 3), Justification::topLeft, true); overlayBounds.removeFromTop (2); g.setFont (12); g.drawText ("tap to connect/disconnect", overlayBounds.removeFromTop (18).reduced (3, 3), Justification::topLeft, true); }