예제 #1
0
void LayerChatWindow::onButtonChats( CCObject* pSender, TouchEventType type )
{
	UIButton* btnChat = dynamic_cast<UIButton*>(pSender);
	if(type == TOUCH_EVENT_ENDED){
		CCLog("onButtonChats %s", btnChat->getTitleText());
		txtChat->setText( btnChat->getTitleText() );
	}
}
예제 #2
0
void UIButton::copySpecialProperties(UIWidget *widget)
{
    UIButton* button = dynamic_cast<UIButton*>(widget);
    if (button)
    {   
        m_bPrevIgnoreSize = button->m_bPrevIgnoreSize;
        setScale9Enabled(button->m_bScale9Enabled);
        loadTextureNormal(button->m_strNormalFileName.c_str(), button->m_eNormalTexType);
        loadTexturePressed(button->m_strClickedFileName.c_str(), button->m_ePressedTexType);
        loadTextureDisabled(button->m_strDisabledFileName.c_str(), button->m_eDisabledTexType);
        setCapInsetsNormalRenderer(button->m_capInsetsNormal);
        setCapInsetsPressedRenderer(button->m_capInsetsPressed);
        setCapInsetsDisabledRenderer(button->m_capInsetsDisabled);
        setTitleText(button->getTitleText());
        setTitleFontName(button->getTitleFontName());
        setTitleFontSize(button->getTitleFontSize());
        setTitleColor(button->getTitleColor());
        setPressedActionEnabled(button->m_bPressedActionEnabled);
    }
}