void UIWaterTypeBrowser::buildTypeList() { removeChild( WaterTypeList ); WaterTypeList = new UIListView(4,24,width() - 8,height() - 28,20); WaterTypeList->clickable( true ); addChild(WaterTypeList); //LiquidTypeDB::getLiquidName(gWorld->getWaterType(tileX, tileY)); for( DBCFile::Iterator i = gLiquidTypeDB.begin(); i != gLiquidTypeDB.end(); ++i ) { UIFrame *curFrame = new UIFrame(1,1,1,1); std::stringstream ss; ss << i->getInt(LiquidTypeDB::ID) << "-" << LiquidTypeDB::getLiquidName(i->getInt(LiquidTypeDB::ID)); UIButton *tempButton = new UIButton(0.0f, 0.0f, 200.0f, 28.0f, ss.str(), "Interface\\DialogFrame\\UI-DialogBox-Background-Dark.blp", "Interface\\DialogFrame\\UI-DialogBox-Background-Dark.blp", boost::bind(&UIWaterTypeBrowser::setWaterTypeID, this, _1, _2), //steff: kidding me? we talked about this some h before u did this i->getInt(LiquidTypeDB::ID) ); tempButton->setLeft(); curFrame->addChild(tempButton); WaterTypeList->addElement(curFrame); } WaterTypeList->recalcElements(1); }