change chainbutton to index instead of color
This commit is contained in:
@@ -63,6 +63,19 @@ bool buttonIsPressed(e_ledcolor index)
|
||||
}
|
||||
}
|
||||
|
||||
bool buttonIsPressed(uint16_t index)
|
||||
{
|
||||
c_button *thisbutton = getButton(index);
|
||||
if (thisbutton == NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return thisbutton->isPressed();
|
||||
}
|
||||
}
|
||||
|
||||
bool buttonWasPressed(e_ledcolor index)
|
||||
{
|
||||
c_button *thisbutton = getButton(index);
|
||||
|
||||
Reference in New Issue
Block a user