Skip to content

Commit 3141906

Browse files
fix for colorselect (#289)
* fix for colorselect multis not having colors
1 parent f2c175c commit 3141906

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

VortexEngine/src/Menus/Menu.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@ void Menu::nextBulbSelection()
166166
}
167167
}
168168

169+
void Menu::bypassLedSelection(LedMap map) {
170+
m_ledSelected = true;
171+
m_targetLeds = map;
172+
onLedSelected();
173+
}
174+
169175
void Menu::onLedSelected()
170176
{
171177
}

VortexEngine/src/Menus/Menu.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ class Menu
4444
// iterate to next bulb selection
4545
void nextBulbSelection();
4646

47+
//skip led selection
48+
void bypassLedSelection(LedMap map);
4749
// an overridable api that allows derived menus to decide which led selections
4850
// should be available before they have actually opened
4951
virtual bool isValidLedSelection(LedMap selection) const { return true; }

VortexEngine/src/Menus/MenuList/ColorSelect.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ bool ColorSelect::init()
4545
return false;
4646
}
4747
if (cur->isMultiLed()) {
48-
m_targetLeds = MAP_LED(LED_MULTI);
49-
m_ledSelected = true;
48+
bypassLedSelection(MAP_LED(LED_MULTI));
5049
}
5150
m_state = STATE_INIT;
5251
DEBUG_LOG("Entered color select");

0 commit comments

Comments
 (0)