void LogisticsSaveDialog::beginCampaign()
{
	beginLoad();
	edits[0].limitEntry( 20 );
	bCampaign= true;
	initDialog(campaignPath, 1);
	if ( !gameListBox.GetItemCount() )
	{
		selectedName = "campaign";
		bDone = true;
		return;
	}
	else
	{
		aListItem* pItem = gameListBox.GetItem( 0 );
		if ( pItem )
		{
			pItem->select();
			edits[0].setEntry( ((aTextListItem*)pItem)->getText() );
			selectedName = ( ((aLocalizedListItem*)pItem)->getHiddenText() );
		}
	}


	updateMissionInfo();
}
示例#2
0
EJ_BIND_SET( EJBindingImage, src, ctx, value) {
	// If the texture is still loading, do nothing to avoid confusion
	// This will break some edge cases; FIXME
	if( loading ) { return; }

	NSString * newPath = JSValueToNSString( ctx, value );
	
	// Release the old path and texture?
	if( path ) {
	
		// Same as the old path? Nothing to do here
		if( path->isEqual(newPath) ) { return; }

		path->release();
		path = NULL;
		
		texture->release();
		texture = NULL;
	}
	
	if( newPath->length() ) {
		newPath->retain();
		path = newPath;
		beginLoad();
	}

}
示例#3
0
void CalcScreen::setCalc(Calc *arg)
{
    if (m_calc != arg) {
        delete m_calc;
        m_calc = arg;
        connect(m_calc, SIGNAL(loaded()), this, SLOT( fileLoaded() ));
        connect(m_calc, SIGNAL(beginLoad()), this, SLOT( beforeFileLoaded() ));
        emit calcChanged(arg);
    }
}