void LevelupDialog::resetCoins () { int curX = mMainWidget->getWidth()/2 - (16 + 2) * 1.5; for (int i=0; i<3; ++i) { MyGUI::ImageBox* image = mCoins[i]; image->setCoord(MyGUI::IntCoord(curX,250,16,16)); curX += 24+2; } }
void LevelupDialog::resetCoins () { int curX = 0; for (int i=0; i<3; ++i) { MyGUI::ImageBox* image = mCoins[i]; image->detachFromWidget(); image->attachToWidget(mCoinBox); image->setCoord(MyGUI::IntCoord(curX,0,16,16)); curX += 24+2; } }
void LevelupDialog::resetCoins() { const int coinSpacing = 10; int curX = mCoinBox->getWidth()/2 - (coinSpacing*(mCoinCount - 1) + 16*mCoinCount)/2; for (unsigned int i=0; i<mCoinCount; ++i) { MyGUI::ImageBox* image = mCoins[i]; image->detachFromWidget(); image->attachToWidget(mCoinBox); image->setCoord(MyGUI::IntCoord(curX,0,16,16)); curX += 16+coinSpacing; } }