mirror of
https://github.com/euphy/polargraphcontroller
synced 2024-11-15 02:37:56 +01:00
Dropdown selects the actual selected port (#15)
Also mentioned against issue #14.
This commit is contained in:
parent
d74881f2de
commit
936d918402
@ -31,9 +31,9 @@ ControlFrameSimple addSerialPortControlFrame(String theName, int theWidth, int t
|
||||
|
||||
ScrollableList sl = p.cp5().addScrollableList("dropdown_serialPort")
|
||||
.setPosition(10, 10)
|
||||
.setSize(150, 100)
|
||||
.setSize(150, 150)
|
||||
.setBarHeight(20)
|
||||
.setItemHeight(20)
|
||||
.setItemHeight(16)
|
||||
.plugTo(this, "dropdown_serialPort");
|
||||
|
||||
sl.addItem("No serial connection", -1);
|
||||
@ -61,9 +61,11 @@ ControlFrameSimple addSerialPortControlFrame(String theName, int theWidth, int t
|
||||
void dropdown_serialPort(int newSerialPort)
|
||||
{
|
||||
println("In dropdown_serialPort, newSerialPort: " + newSerialPort);
|
||||
|
||||
// No serial in list is slot 0 in code because of list index
|
||||
// So shift port index by one
|
||||
newSerialPort -= 1;
|
||||
|
||||
|
||||
if (newSerialPort == -2)
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user