void CircMenu::addButton() { CircButton *button = new CircButton(100); button->setBaseTexture(poGetTexture("buttons/Path_Icon_sm_base.png")); button->setIconTexture(poGetTexture("buttons/Path_Icon_sm_icon.png")); button->setHighlightTexture(poGetTexture("buttons/Path_Icon_sm_highlight.png")); buttons.push_back(button); buttons.back()->visible = false; addChild(buttons.back()); moveChildToBack(buttons.back()); }
poImageShape::poImageShape(const std::string &str, bool keepImage) : tex(NULL) , alphaTest(false) { tex = poGetTexture( str, keepImage ); alphaTest = (keepImage && tex->getSourceImage() && tex->getSourceImage()->hasAlpha()); }
void poImageShape::setImage(const std::string &str, bool keepImage){ if(tex) { tex = poGetTexture(str, keepImage); } }