MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / DropdownUpdated

Method DropdownUpdated

Source/MidiController.cpp:2010–2039  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2008}
2009
2010void MidiController::DropdownUpdated(DropdownList* list, int oldVal, double time)
2011{
2012 if (list == mPageSelector)
2013 {
2014 SetEntirePageToZero(oldVal);
2015 ResyncControllerState();
2016 }
2017 if (list == mControllerList)
2018 {
2019 if (TheSynth->GetTopModalFocusItem() == mControllerList->GetModalDropdown())
2020 {
2021 ConnectDevice();
2022 OnDeviceChanged();
2023 }
2024 else
2025 {
2026 UpdateControllerIndex();
2027 }
2028 }
2029 if (list == mMonomeDeviceDropdown)
2030 {
2031 Monome* monome = dynamic_cast<Monome*>(mNonstandardController);
2032 if (monome)
2033 monome->ConnectToDevice(mMonomeDeviceDropdown->GetLabel(mMonomeDeviceIndex));
2034 }
2035 if (list == mLayoutFileDropdown)
2036 {
2037 LoadControllerLayout(mLayoutFileDropdown->GetLabel(mLayoutFileIndex));
2038 }
2039}
2040
2041void MidiController::DropdownClicked(DropdownList* list)
2042{

Callers

nothing calls this directly

Calls 4

GetTopModalFocusItemMethod · 0.80
GetModalDropdownMethod · 0.80
ConnectToDeviceMethod · 0.80
GetLabelMethod · 0.45

Tested by

no test coverage detected