LAB: Simplify code in perFlipButton
This commit is contained in:
parent
0ca10a7d40
commit
583f86be27
1 changed files with 1 additions and 3 deletions
|
@ -159,9 +159,7 @@ void LabEngine::perFlipButton(uint16 buttonId) {
|
||||||
for (ButtonList::iterator button = _moveButtonList.begin(); button != _moveButtonList.end(); ++button) {
|
for (ButtonList::iterator button = _moveButtonList.begin(); button != _moveButtonList.end(); ++button) {
|
||||||
Button *topButton = *button;
|
Button *topButton = *button;
|
||||||
if (topButton->_buttonId == buttonId) {
|
if (topButton->_buttonId == buttonId) {
|
||||||
Image *tmpImage = topButton->_image;
|
SWAP<Image *>(topButton->_image, topButton->_altImage);
|
||||||
topButton->_image = topButton->_altImage;
|
|
||||||
topButton->_altImage = tmpImage;
|
|
||||||
|
|
||||||
if (!_alternate)
|
if (!_alternate)
|
||||||
topButton->_image->drawImage(topButton->_x, topButton->_y);
|
topButton->_image->drawImage(topButton->_x, topButton->_y);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue