void EnnemiBisouNuage::update()
{
	if (blood > 0)
		blood -= 1;

	etape_shoot += 1;

	switch (etat) {
		case ETAT_NORMAL:
		case ETAT_AVANCE:
			onNormal();
			break;

		case ETAT_MEURE:
		case ETAT_CARBONISE:
			onMeureWait();
			break;

		case ETAT_MEURE_2:
			onMeureTombe();
			break;


		case ETAT_MEURE_4:
			onMeureFin();
			break;
	}

	updateADetruire();
}
Beispiel #2
0
void TOTama::setcontent( int ail )
{
	m_iLevel = ail;
	//CCAssert(ail<6,"ail<6");
	//CCAssert(ail>-1,"ail>=0");
	labelAtlas->setString(tlevel[ail]);
	onNormal();
}
Beispiel #3
0
void Container::update(float fDelta){
	if(mLasto && m_iState != C_STATE_SELECT){
		if(checkTouch(mLasto)){
			onHover();
		}else{
			onNormal();
			CC_SAFE_RELEASE_NULL(mLasto);
		}
	}
}
Beispiel #4
0
void TOSkill::setcontent( SkillMeta* sm )
{
	m_smData = sm;
	if(sm){
		mLT_Name->setString(sm->name.c_str());
	}else{
		mLT_Name->setString("NONE");
	}
	onNormal();
}
Beispiel #5
0
AbEpisod::AbEpisod(int eid, int aw, int ah)
{
	Container::Container();
	miEID = eid;

	spriteNormal	= NULL;
	spriteDisable	= NULL;
	spriteSelected	= NULL;
	spriteHover		= NULL;

	std::stringstream tss;
	tss << "Images/UI/ep_";
	tss << eid;
	
	spriteNormal = CCSprite::create( (tss.str()+".png").c_str());
	spriteNormal->setAnchorPoint(CCPointZero);
	spriteNormal->setPosition(CCPointZero);
	addChild(spriteNormal);

	spriteHover = CCSprite::create( (tss.str()+"_hov.png").c_str());
	spriteHover->setAnchorPoint(CCPointZero);
	spriteHover->setPosition(CCPointZero);
	addChild(spriteHover);

	labelAtlas = new CCLabelBMFont();
	labelAtlas->autorelease();
	labelAtlas->setVisible(false);
	addChild(labelAtlas);

	m_obContentSize.width = aw;
	m_obContentSize.height = ah;

	onNormal();
	m_iState = C_STATE_NORMAL;

	scheduleUpdate();
}
Beispiel #6
0
void Container::setEnability(bool tar){
	m_bIsEnabled = tar;
	if(!m_bIsEnabled) onDisable();
	else onNormal();
}
acDockWidgetTitlebar::acDockWidgetTitlebar(QWidget *parent) : parent(parent)
{
    QString PushButtonStyle("QPushButton {border:none; margin: 0px; padding: 0px } QPushButton:hover {border:1px solid black}");

    QPalette Pal(palette());
    Pal.setColor(QPalette::Background, Qt::lightGray);
    setAutoFillBackground(true);
    setPalette(Pal);
    setMaximumHeight(20);
    m_close = false;

    m_parent = parent;

    // Create a close button and set its icon to that of the OS 
    m_ToolBarIcon = new QIcon(":/CompressonatorGUI/Images/settings.png");

    m_buttonToolBar = new QPushButton(this);
    m_buttonToolBar->setIcon(*m_ToolBarIcon);
    m_buttonToolBar->setStyleSheet(PushButtonStyle);
    m_buttonToolBar->setToolTip("Show Tool Bar");
    m_buttonToolBarEnabled = true;


    // Get the OS close button icon
    QStyle*style = qApp->style();

    QIcon minimizeIcon = style->standardIcon(QStyle::SP_TitleBarMinButton);
    // Create a maximize button and set its icon to that of the OS 
    m_buttonMinimize = new QPushButton(this);
    m_buttonMinimize->setIcon(minimizeIcon);
    m_buttonMinimize->setStyleSheet(PushButtonStyle);
    m_buttonMinimize->setToolTip("Minimize Window");

    QIcon maximizeIcon = style->standardIcon(QStyle::SP_TitleBarMaxButton);
    // Create a maximize button and set its icon to that of the OS 
    m_buttonMaximize = new QPushButton(this);
    m_buttonMaximize->setIcon(maximizeIcon);
    m_buttonMaximize->setStyleSheet(PushButtonStyle);
    m_buttonMaximize->setToolTip("Maximize Window");

    QIcon normalIcon = style->standardIcon(QStyle::SP_TitleBarNormalButton);
    // Create a maximize button and set its icon to that of the OS 
    m_buttonNormal = new QPushButton(this);
    m_buttonNormal->setIcon(normalIcon);
    m_buttonNormal->setStyleSheet(PushButtonStyle);
    m_buttonNormal->setToolTip("Normal Window");
    m_buttonNormal->hide();

    QIcon closeIcon = style->standardIcon(QStyle::SP_TitleBarCloseButton);
    
    // Create a close button and set its icon to that of the OS 
    m_buttonClose = new QPushButton(this);
    //m_buttonClose->setIcon(QIcon(":/CompressonatorGUI/Images/cxClose.png"));
    m_buttonClose->setIcon(closeIcon);
    m_buttonClose->setStyleSheet(PushButtonStyle);
    m_buttonClose->setToolTip("Close Window");
    m_ButtonCloseEnabled = true;

    // Reserve a label for the Titlebar
    m_label = new QLabel("",this);

    // Set a layout for the new label and pushbutton
    m_layout = new QHBoxLayout(this);
    m_layout->addWidget(m_label,Qt::AlignLeading);
    m_layout->addWidget(m_buttonToolBar);
    m_layout->addWidget(m_buttonMinimize);
    m_layout->addWidget(m_buttonNormal);
    m_layout->addWidget(m_buttonMaximize);
    m_layout->addWidget(m_buttonClose);

    m_layout->setSpacing(0);
    m_layout->setMargin(0);
    m_layout->setContentsMargins(0, 0, 0, 0);

    setLayout(m_layout);

    connect(m_buttonMinimize, SIGNAL(clicked()), this, SLOT(onMinimize()));
    connect(m_buttonNormal, SIGNAL(clicked()), this, SLOT(onNormal()));
    connect(m_buttonMaximize, SIGNAL(clicked()), this, SLOT(onMaximize()));
    connect(m_buttonClose, SIGNAL(clicked()), this, SLOT(onClose()));
    connect(m_buttonToolBar, SIGNAL(clicked()), this, SLOT(OnToolBarClicked()));

    setButtonMinMaxEnabled(false);
    
}