
2979.8. Dashboard
mouseClick = false;
if(momentary) // If momentary switch
switchOn = true;
else
switchOn = !switchOn; // Toggle the switch
if(switchOn)
setCurrentFrame(dashboardNS::BUTTON_DOWN_FRAME);
else
setCurrentFrame(dashboardNS::BUTTON_UP_FRAME);
}
}
}
else
{
mouseClick = true;
if(momentary)
{
switchOn = false;
setCurrentFrame(dashboardNS::BUTTON_UP_FRAME);
}
}
}
Listing 9.54. e update function from the PushButton class.
9.8.7 Bar Graph
e bar graph, which is sometimes referred to as a VU meter, displays a sequence of bars
from 0 to the maximum number. e screen location, scale, number of bars in the meter,
and bar color is specied in ...