Example #1
0
/*
==============
RMLPreIdle

Called every "frame" by the modal dialog loop
==============
*/
int CServerCtrlDlg::RMLPreIdle(void)
{
	static  DWORD lastupdate;
	DWORD currenttime;

	// Haven't started up HLDS
	if ( !m_hReceive || !m_hSend || !m_hMappedFile )
		return 0;

	// Refresh console text every 1/2 second
	currenttime = timeGetTime();
	if ( ( currenttime - lastupdate ) > 500 )
	{
		lastupdate = currenttime;
		
		RefreshText();
	}

	// Has event fired? Signaling that we have received a response from the engine?
	if ( WaitForSingleObject( m_hReceive, 0 ) == WAIT_OBJECT_0 )
	{
		// Process response
		ProcessMappedResponse();
	}

	return 0;
}
Example #2
0
//---------------------------------------------------------------------------
void __fastcall TGroundGroupForm::SuperGroupComboChange(TObject *Sender)
{
	info_itemS*	I= *Persons2::ConvertPtrUID(MissionEditor->currobj);
    I->SGT=UniqueID(GetSGListEntry(SuperGroupCombo->ItemIndex));
	RefreshText();
	MissionEditor->Invalidate();
}
Example #3
0
/***********************************************************
default constructor
***********************************************************/
OsgObjectHandler::OsgObjectHandler(int sceneidx, boost::shared_ptr<DisplayTransformation> Tr,
									const LbaNet::ObjectExtraInfo &extrainfo,
									const LbaNet::LifeManaInfo &lifeinfo,
									osg::ref_ptr<osg::Node> particle)
:  _posX(0), _posY(0), _posZ(0), _displayed(true), _extrainfo(extrainfo), _uselight(true),
		_lifeinfo(lifeinfo), _useTransparentMaterial(false), _MaterialType(0), _sceneidx(sceneidx),
		_particle(particle)
{
	#ifdef _DEBUG
		LogHandler::getInstance()->LogToFile("Created empty Osg object.");
	#endif

	_OsgObject = OsgHandler::getInstance()->AddEmptyActorNode(_sceneidx, true);
	_OsgObjectNoLight = OsgHandler::getInstance()->AddEmptyActorNode(_sceneidx,false);

	if(Tr)
	{
		_osgpat = OsgHandler::getInstance()->CreatePAT(Tr);
		_OsgObject->addChild(_osgpat);

		_osgpatNoLight = OsgHandler::getInstance()->CreatePAT(Tr);
		_OsgObjectNoLight->addChild(_osgpatNoLight);
	}

	UpdateMatrix();
	RefreshText();
}
Example #4
0
void CEditParameter::Init()
{
	InitLayout();
	InitSignalSlot();
	RefreshText();

	m_strScope = CScreenProject::GetInstance()->GetOpenedFileName();
}
Example #5
0
/***************************************************************************************************
*FunctionName: activityStart
*Description: 显示主界面
*Input: 
*Output: 
*Return: 
*Author: xsx
*Date: 2016年12月21日09:00:32
***************************************************************************************************/
static void activityStart(void)
{
	RefreshText();
			
	DspLine();
			
	dspIco();
	
	SelectPage(147);
}
Example #6
0
//---------------------------------------------------------------------------
void __fastcall TGroundGroupForm::SuperGroupComboChange(TObject *Sender)
{
   info_itemS*	I= *Persons2::ConvertPtrUID(MissionEditor->currobj);
	I->SGT = MissionEditor->loadedsupergroup[SuperGroupCombo->ItemIndex].uid;
	MissionEditor->supergroupbeingfilled = SuperGroupCombo->ItemIndex;
	MissionEditor->SuperGroupStatusBar(I->SGT);

	RefreshText();
	MissionEditor->Invalidate();

}
Example #7
0
void CScreenLineEditor::changeEvent(QEvent *event)
{
	QWidget::changeEvent(event);

	switch (event->type())
	{
	case QEvent::LanguageChange:
	{
		RefreshText();
	}break;
	}
}
void ScreenGameplaySyncMachine::Init()
{
	m_bForceNoNetwork = true;

	GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
	GAMESTATE->SetCurrentStyle( GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
	AdjustSync::ResetOriginalSyncData();

	RString sFile = THEME->GetPathO("ScreenGameplaySyncMachine","music");
	// Allow themers to use either a .ssc or .sm file for this. -aj
	SSCLoader loaderSSC;
	SMLoader loaderSM;
	if(sFile.Right(4) == ".ssc")
		loaderSSC.LoadFromSimfile( sFile, m_Song );
	else
		loaderSM.LoadFromSimfile( sFile, m_Song );

	m_Song.SetSongDir( Dirname(sFile) );
	m_Song.TidyUpData();

	GAMESTATE->m_pCurSong.Set( &m_Song );
	// Needs proper StepsType -freem
	vector<Steps*> vpSteps;
	SongUtil::GetPlayableSteps( &m_Song, vpSteps );
	ASSERT_M(vpSteps.size() > 0, "No playable steps for ScreenGameplaySyncMachine");
	Steps *pSteps = vpSteps[0];
	GAMESTATE->m_pCurSteps[GAMESTATE->GetFirstHumanPlayer()].Set( pSteps );

	GamePreferences::m_AutoPlay.Set( PC_HUMAN );

	ScreenGameplayNormal::Init();

	SO_GROUP_ASSIGN( GAMESTATE->m_SongOptions, ModsLevel_Stage, m_AutosyncType, SongOptions::AUTOSYNC_MACHINE );

	ClearMessageQueue();	// remove all of the messages set in ScreenGameplay that animate "ready", "here we go", etc.

	GAMESTATE->m_bGameplayLeadIn.Set( false );

	m_DancingState = STATE_DANCING;

	m_textSyncInfo.SetName( "SyncInfo" );
	m_textSyncInfo.LoadFromFont( THEME->GetPathF(m_sName,"SyncInfo") );
	ActorUtil::LoadAllCommands( m_textSyncInfo, m_sName );
	this->AddChild( &m_textSyncInfo );

	this->SubscribeToMessage( Message_AutosyncChanged );

	RefreshText();
}
Example #9
0
/***********************************************************
update model
***********************************************************/
void OsgObjectHandler::UpdateModel(const LbaNet::ModelInfo &mInfo)
{
	if(_uselight)
	{
		if(_OsgObject)
			OsgHandler::getInstance()->RemoveActorNode(_sceneidx, _OsgObject, true);
	}
	else
	{
		if(_OsgObjectNoLight)
			OsgHandler::getInstance()->RemoveActorNode(_sceneidx, _OsgObjectNoLight, false);
	}

	osg::ref_ptr<osg::MatrixTransform> node;
	boost::shared_ptr<DisplayTransformation> Tr(new DisplayTransformation());;
	Tr->translationX = mInfo.TransX;
	Tr->translationY = mInfo.TransY;
	Tr->translationZ = mInfo.TransZ;
	Tr->rotation = LbaQuaternion(mInfo.RotX, mInfo.RotY, mInfo.RotZ);
	Tr->scaleX = mInfo.ScaleX;
	Tr->scaleY = mInfo.ScaleY;
	Tr->scaleZ = mInfo.ScaleZ;

	if(mInfo.TypeRenderer == LbaNet::RenderSprite)
	{
		node = OsgHandler::getInstance()->CreateSpriteObject(_sceneidx, mInfo.ModelName, 
											mInfo.ColorR, mInfo.ColorG, mInfo.ColorB, mInfo.ColorA,
											Tr,	mInfo.UseLight,	mInfo.CastShadow,
											mInfo.UseBillboard);
	}
	else
	{
		if(mInfo.ModelName != "")
			node = OsgHandler::getInstance()->CreateSimpleObject(_sceneidx, mInfo.ModelName, Tr,
																mInfo.UseLight,	mInfo.CastShadow);
	}

	if(_uselight)
		_OsgObject = node;
	else
		_OsgObjectNoLight = node;


	UpdateMatrix();
	RefreshText();
}
Example #10
0
/***********************************************************
Constructor
***********************************************************/
OsgObjectHandler::OsgObjectHandler(int sceneidx, osg::ref_ptr<osg::MatrixTransform> OsgObject, bool uselight,
										const LbaNet::ObjectExtraInfo &extrainfo,
										const LbaNet::LifeManaInfo &lifeinfo,
										osg::ref_ptr<osg::Node> particle)
: _posX(0), _posY(0), _posZ(0), _displayed(true), _extrainfo(extrainfo), _uselight(uselight),
		_lifeinfo(lifeinfo), _sceneidx(sceneidx), _particle(particle)
{
	if(uselight)
	{
		_OsgObject = OsgObject;
		_OsgObjectNoLight = OsgHandler::getInstance()->AddEmptyActorNode(_sceneidx,false);
	}
	else
		_OsgObjectNoLight = OsgObject;


	#ifdef _DEBUG
		LogHandler::getInstance()->LogToFile("Created new Osg object.");
	#endif

	UpdateMatrix();
	RefreshText();
}
void ScreenGameplaySyncMachine::Update( float fDelta )
{
	ScreenGameplayNormal::Update( fDelta );
	RefreshText();
}
Example #12
0
void CScreenLineEditor::Init()
{
	InitLayout();
	InitSignalSlot();
	RefreshText();
}
Example #13
0
/*
==============
OnBtnGet

==============
*/
void CServerCtrlDlg::OnBtnGet( void ) 
{
	RefreshText();
}
Example #14
0
//---------------------------------------------------------------------------
void __fastcall TGroundGroupForm::OpenGroundGroupMobile(int X,int Y)
{

 //	int*	ctrlarray;
	char buff[50];

	if (!dialheight[0][0])
    {
    	dialheight[0][0]=Height;
        dialheight[0][1]=Panel1->Top;
        dialheight[0][2]=ButtonPanel->Top;
        int delta=GGPanel->Height;
		dialheight[1][0]=dialheight[0][0]-delta;
		dialheight[1][1]=dialheight[0][1]-delta;
		dialheight[1][2]=dialheight[0][2]-delta;
    }

    Height=dialheight[0][0];
    Panel1->Top=dialheight[0][1];
    ButtonPanel->Top=dialheight[0][2];
	info_grndgrp*	G=*Persons2::ConvertPtrUID(MissionEditor->currobj);

//	MissionEditor->FillComboBox(IDS_CENTRALPOWERS, IDS_ALLIES, NationalityComboBox,
//										G->Nationality);

	UniqueID	uidwp;

		GGAltLabel->Visible = false;
		GGEditAlt->Visible = false;

	int groupindex = -1;
	if (G->shape==ENABLE_COMPLEX_VAL)
    	if (G->shape->type==Expr::EXPR_GLOB)
            FindShapes(G->shape->UsesGlobRef(),groupindex,3);
        else
        	if (G->shape[2]->type==Expr::EXPR_GLOB)
	            FindShapes(G->shape[2]->UsesGlobRef(),groupindex,3);
            else
            	FindShapes(G->shape.Evaluate(2),groupindex,-1);
    else
        FindShapes(G->shape.Evaluate(2),groupindex,-1);
	FillUIDBandList(G->band.Evaluate());
	RefreshText();
    if (MissionEditor->loadedbfs[G->bfieldindex].name[0])
		BfieldLabel->Caption = MissionEditor->loadedbfs[G->bfieldindex].name;
    else
		BfieldLabel->Caption = MissionEditor->loadedbfs[G->bfieldindex].fname;


	UniqueIDBand	uidband;

	if ((int)G->Status.size > (int)ITEMSIZE)
	{
		grndvel = G->vel.Evaluate();
		uidwp=G->wpref;
	}else
	{
		uidwp = UID_Null;
	}

	uidband = Persons2::getbandfromUID(MissionEditor->currobj);

	 int text = MissionEditor->GetBandorShapeText(MissionEditor->currobj);
	 LoadString(HInstance,text,buff,sizeof(buff));
	 Caption = buff;

		GGPanel->Visible = true;
//		ButtonPanel->Top = 147;
//		Height = 284;		//325;

//		MissionEditor->FillComboBox(IDS_CENTRALPOWERS, IDS_ALLIES, NationalityComboBox,
//										G->nationality-1);

		GGSpeedLabel->Visible = true;
		GGSpeedData->Visible = true;
		AltSpinButton->Visible = true;
		SpdComboBox->Visible = true;
		GGFormationSizeLabel->Visible = true;
		GGFormationTypeLabel->Visible = true;
		GGFormationSpinEdit->Visible = true;
		GGFormTypeBox->Visible = true;
		ClassTypeComboBox->Visible = true;
		GG_StatusLabel->Visible = true;
		GG_StatusComboBox->Visible = true;
 //		if 	(	((int)G->shape.Evaluate(2) == (int)TRAIN3)
   //						  || ((int)G->shape.Evaluate(2) == (int)TRAIN4)
	 //		 )
	   //		GG_StatusComboBox->Enabled = false;
		//else
			GG_StatusComboBox->Enabled = true;

		GGEventMore->Visible = false;

	if ((int)G->Status.size > (int)ITEMSIZE)
//	if (uidwp != UID_Null)
	{

		GGRoute->Visible = true;
		GGRoute->Enabled = true;

		SpdComboBox->OnChange = NULL;
		RefreshSpeedInfo();
		SpdComboBox->OnChange = SpdComboBoxChange;


	   int	inform = G->inform.Evaluate();
	   if ( inform == ENABLE_COMPLEX_VAL)			//default set and never been filled in
			inform = 1;


	int maxmobiles = 6;
//		if (	((int)G->shape.Evaluate(2) == (int)BTANK)
  //			||  ((int)G->shape.Evaluate(2) == (int)GTANK)
	//	)
	  //{
		//		if ((int)uidband == (int)RedSAMBAND)
		  //	   {
			//	if ((maxmobiles+MissionEditor->RedTanksCnt-inform) > MissionEditor->RedTanksMax)
			//		maxmobiles = MissionEditor->RedTanksMax - MissionEditor->RedTanksCnt+inform;
		  //	   }else
		//	   {
	  //			if ((maxmobiles+MissionEditor->BlueTanksCnt-inform) > MissionEditor->BlueTanksMax)
	//				maxmobiles = MissionEditor->BlueTanksMax - MissionEditor->BlueTanksCnt+inform;
  //			   }
//		}else
	  {
				if ((int)uidband == (int)GermBoatBAND)
			   {
				if ((maxmobiles+MissionEditor->RedGroundMobilesCnt-inform) > MissionEditor->RedGroundMobilesMax)
					maxmobiles = MissionEditor->RedGroundMobilesMax - MissionEditor->RedGroundMobilesCnt+inform;
			   }else
			   {
				if ((maxmobiles+MissionEditor->BlueGroundMobilesCnt-inform) > MissionEditor->BlueGroundMobilesMax)
					maxmobiles = MissionEditor->BlueGroundMobilesMax - MissionEditor->BlueGroundMobilesCnt+inform;
			   }
	  }
		GGFormationSpinEdit->MaxValue = 15;//maxmobiles;
		GGFormationSpinEdit->Text = IntToStr(inform);

	   int	form = G->form.Evaluate();
	   if ( form == ENABLE_COMPLEX_VAL)			//default set and never been filled in
			form = FTT_LONGLINE;

       int	type = G->type.Evaluate();
       if (	type == ENABLE_COMPLEX_VAL)
       		type= 0;
		MissionEditor->PartFillComboBox(ENUM_Formation,+FTW_MAL,
											GGFormTypeBox,
											form,NULL);
		MissionEditor->PartFillComboBox(ENUM_Type,PT_BADMAX,ClassTypeComboBox,type,NULL);


 //		if (	((int)G->band == (int)BlueSAMBAND)
//			||	((int)G->band == (int)RedSAMBAND)
//			||	((int)G->shape.Evaluate(2) == (int)TROOPS)
//			||	((int)G->shape.Evaluate(2) == (int)TROOP1)
//		   )	
//		 {
//			GGSpeedLabel->Enabled = false;
//			SpdComboBox->Enabled = false;
//			GGSpeedData->Enabled = false;
//		 }else
//		 {
			GGSpeedLabel->Enabled = true;
			SpdComboBox->Enabled = true;  
			GGSpeedData->Enabled = true;
//		 }
			
		GGFormationSizeLabel->Enabled = true;
		GGFormationTypeLabel->Enabled = true;
		GGFormationSpinEdit->Enabled = true;

//		if (	((int)G->shape.Evaluate(2) == (int)TRAIN3)
  //			||  ((int)G->shape.Evaluate(2) == (int)TRAIN4)
	//	 )
	  //	 {
		//		GGFormTypeBox->Enabled = false;
	//		GGFormTypeBox->ItemIndex = IDS_TEXT_SINGLEFILE_FORM-IDS_TEXT_STACKED;
  //		 }
//		 else
			GGFormTypeBox->Enabled = true;
            ClassTypeComboBox->Enabled = true;
			GG_StatusComboBox->ItemIndex = 0;
	}else
	{
		GGRoute->Visible = false;
		GGRoute->Enabled = false;
		SpdComboBox->Enabled = false;
		GGSpeedLabel->Enabled = false;
		GGSpeedData->Enabled = false;
		GGFormationSizeLabel->Enabled = false;
		GGFormationTypeLabel->Enabled = false;
		GGFormationSpinEdit->Value = 1;
		GGFormationSpinEdit->Enabled = false;
		GGFormTypeBox->Enabled = false;
		ClassTypeComboBox->Enabled = false;
		GG_StatusComboBox->ItemIndex = 1;
	}
	MissionEditor->currwp = uidwp;
	int result = GroundGroupForm->ShowModal();
//	MissionEditor->PaintBox->Invalidate();
	switch (result)
	{
		case	mrOk:
		{
//				MissionEditor->MissionEdited=true;

				info_itemS*		curritem =*Persons2::ConvertPtrUID(MissionEditor->currobj);
			MissionEditor->loadedbfs[curritem->bfieldindex].changed=true;

               int shape=ShapeComboBox->ItemIndex;
                if (shape>=0)
                {
                	int shapepage=ShapeCat->ItemIndex;
                	if (shapepage==3)
                    {
                    	GlobRefExpr* gr=new GlobRefExpr(AvailableShapes[3][shape]);
						if (G->shape.complex && G->shape.complex->type==Expr::EXPR_FORM)
							G->shape[2]=gr;
						else
							G->shape = gr;
                    }
                    else
                    {
                    	shape=AvailableShapes[shapepage][shape];
						if (G->shape.complex && G->shape.complex->type==Expr::EXPR_FORM)
							G->shape[2]=shape;
						else
							G->shape = shape;
                    }
                }
 				if (curritem->shape.complex && curritem->shape.complex->type==Expr::EXPR_FORM)
					curritem->shape[2]=shape;
				else
					curritem->shape = shape;
				MissionEditor->ChangeTag(groupindex,shape);

				if ((int)curritem->Status.size > (int)ITEMSIZE)
				{
					info_grndgrp*	G=*Persons2::ConvertPtrUID(MissionEditor->currobj);

//					if (	((int)G->shape.Evaluate(2) == (int)BTANK)
  //						||  ((int)G->shape.Evaluate(2) == (int)GTANK)
	//					)
	  //		   {
		//					if ((int)uidband == (int)RedSAMBAND)
		  //				   {
			//				MissionEditor->RedTanksCnt -=  G->inform;
			  //						G->inform =GGFormationSpinEdit->Value;
			  //				MissionEditor->RedTanksCnt +=  (int)G->inform;
			//				}else
		  //				 {
		//					MissionEditor->BlueTanksCnt -=  G->inform;
	  //								G->inform =GGFormationSpinEdit->Value;
	//						MissionEditor->BlueTanksCnt +=  (int)G->inform;
  //						 }
//					}else
			   {
							if ((int)uidband == (int)GermBoatBAND)
						   {
							MissionEditor->RedGroundMobilesCnt -=  G->inform.Evaluate();
						G->inform =GGFormationSpinEdit->Value;
							MissionEditor->RedGroundMobilesCnt +=  (int)G->inform.Evaluate();
							}else
						 {
							MissionEditor->BlueGroundMobilesCnt -=  G->inform.Evaluate();
						G->inform =GGFormationSpinEdit->Value;
							MissionEditor->BlueGroundMobilesCnt +=  (int)G->inform.Evaluate();
						 }
			   }
					G->form = MissionEditor->FindOrginalIndex(0,FTW_MAL,
									GGFormTypeBox->ItemIndex,NULL);
               		G->type=MissionEditor->FindOrginalIndex(0,PT_BADMAX,
									ClassTypeComboBox->ItemIndex,NULL);
	                G->band= UIDBandList[UIDGroupCombo->ItemIndex];

					if (GGSpeedData->Visible)
					{

						if (MissionEditor->Configure_Units == METRIC)
							G->vel = (MissionEditor->ValidEdit(GGSpeedData) *+VEL_1KMH)+100;
						else if (MissionEditor->Configure_Units == IMPERIAL)
							G->vel = (MissionEditor->ValidEdit(GGSpeedData) * +VEL_1KT)+100;
						else
							G->vel = (MissionEditor->ValidEdit(GGSpeedData) * +VEL_1KMH)+100;
					 }
				}
				EditText();

				break;
		}
		case	mrRoute:
		{

			WayPointForm->ShowWpDialog( 0,0);
			break;
		}
			case	mrDelete:
			{
				AcItemForm->DeleteCurrTransItem();
				break;
			}
	}
	GGCancel->Enabled = true;
//	MissionEditor->MobileSpdButtonState();
	MissionEditor->DisableWPUsageifnecessary();	//rdh 

}
Example #15
0
//---------------------------------------------------------------------------
void __fastcall TGroundGroupForm::OpenGroundGroupStatic(int X,int Y)
{
	char buff[50];
//    UniqueID CurrUID;
	if (!dialheight[0][0])
    {
    	dialheight[0][0]=Height;
        dialheight[0][1]=Panel1->Top;
        dialheight[0][2]=ButtonPanel->Top;
        int delta=GGPanel->Height;
		dialheight[1][0]=dialheight[0][0]-delta;
		dialheight[1][1]=dialheight[0][1]-delta;
		dialheight[1][2]=dialheight[0][2]-delta;
    }

    Height=dialheight[1][0];
    Panel1->Top=dialheight[1][1];
    ButtonPanel->Top=dialheight[1][2];

		GGAltLabel->Visible = false;
		GGEditAlt->Visible = false;

	UniqueIDBand	uidband;

	uidband = Persons2::getbandfromUID(MissionEditor->currobj);
	ItemBasePtr i=Persons2::ConvertPtrUID(MissionEditor->currobj);


//	MissionEditor->FillComboBox(IDS_CENTRALPOWERS, IDS_ALLIES, NationalityComboBox,
//										i->Nationality);

	info_itemS*	I= *Persons2::ConvertPtrUID(MissionEditor->currobj);
	int groupindex = -1;

	if (I->shape==ENABLE_COMPLEX_VAL)
    	if (I->shape->type==Expr::EXPR_GLOB)
            FindShapes(I->shape->UsesGlobRef(),groupindex,3);
        else
        	if (I->shape[2]->type==Expr::EXPR_GLOB)
	            FindShapes(I->shape[2]->UsesGlobRef(),groupindex,3);
            else
            	FindShapes(I->shape.Evaluate(2),groupindex,-1);
    else
        FindShapes(I->shape.Evaluate(2),groupindex,-1);

	FillUIDBandList(I->band.Evaluate());
//	MissionEditor->FillComboBox(IDS_CENTRALPOWERS, IDS_ALLIES, NationalityComboBox,
//										I->nationality-1);

		GGPanel->Visible = false;
//		ButtonPanel->Top = 38;
//		Height = 181;		//216;

		GGSpeedLabel->Visible = false;
		GGSpeedData->Visible = false;
		AltSpinButton->Visible = false;
		SpdComboBox->Visible = false;


	RefreshText();
    if (MissionEditor->loadedbfs[I->bfieldindex].name[0])
		BfieldLabel->Caption = MissionEditor->loadedbfs[I->bfieldindex].name;
    else
		BfieldLabel->Caption = MissionEditor->loadedbfs[I->bfieldindex].fname;


	switch (uidband)
	{
		case MissileBAND:
		{
			break;
		}
//		case RedGICBAND:
  //		case BlueGICBAND:
	//	{
//		GGAltLabel->Visible = true;
  //		GGEditAlt->Visible = true;
	//	GGPanel->Visible = true;
//		ButtonPanel->Top = 144;
//		Height = 279;
//
  //
    //
//		char	altitude[50];
  //
	//	 LoadString(HInstance,TEXT_ALT,altitude,sizeof(altitude));
//
  //
	//	if (MissionEditor->Configure_Units == METRIC)
//		{
  //		 strcat(altitude,"m");
	//	  GGEditAlt->Text = IntToStr(-i->World.Y/100);
//
  //		}else if (MissionEditor->Configure_Units == IMPERIAL)
	//	{
//			strcat(altitude,"ft");
  //		  GGEditAlt->Text = IntToStr(-(i->World.Y*100-50)/3048);
	//	}else
//		{
  //			strcat(altitude,"ft");
	//	  GGEditAlt->Text = IntToStr(-(i->World.Y*100-50)/3048);
//		}
  //
	//	   GGAltLabel->Caption = altitude;
//		break;
  //		}
	 }
	 int text = MissionEditor->GetBandorShapeText(MissionEditor->currobj);
	 LoadString(HInstance,text,buff,sizeof(buff));
	 Caption = buff;


		GG_StatusLabel->Visible = true;
		GG_StatusComboBox->Visible = true;
		GGEventMore->Visible = false;
		GGRoute->Visible = false;
		GG_StatusComboBox->ItemIndex = 1;
		GG_StatusComboBox->Enabled = false;
		GGRoute->Visible = false;
		GGFormationSizeLabel->Visible = false;
		GGFormationTypeLabel->Visible = false;
		GGFormationSpinEdit->Visible = false;
		GGFormTypeBox->Visible = false;
		ClassTypeComboBox->Visible = false;
		int result = ShowModal();
	   switch (result)
	   {
		   case	mrOk:
		   {
				info_itemS* I=*i;
                MissionEditor->loadedbfs[I->bfieldindex].changed=true;
  //				MissionEditor->MissionEdited=true;
				if (GGEditAlt->Visible)
				{


					if (MissionEditor->Configure_Units == METRIC)
						I->position[0][1] = -MissionEditor->ValidEdit(GGEditAlt) * 100;
					else	if (MissionEditor->Configure_Units == IMPERIAL)
						I->position[0][1] = -MissionEditor->ValidEdit(GGEditAlt) * 3048/100;
					else
						I->position[0][1] = -MissionEditor->ValidEdit(GGEditAlt) * 3048/100;
					I->position.EvalW(I->World);
				 }

                int shape=ShapeComboBox->ItemIndex;
                if (shape>=0)
                {
                	int shapepage=ShapeCat->ItemIndex;
                	if (shapepage==3)
                    {
                    	GlobRefExpr* gr=new GlobRefExpr(AvailableShapes[3][shape]);
						if (I->shape.complex && I->shape.complex->type==Expr::EXPR_FORM)
							I->shape[2]=gr;
						else
							I->shape = gr;
                    }
                    else
                    {
                    	shape=AvailableShapes[shapepage][shape];
						if (I->shape.complex && I->shape.complex->type==Expr::EXPR_FORM)
							I->shape[2]=shape;
						else
							I->shape = shape;
                    }
                }
                I->band= UIDBandList[UIDGroupCombo->ItemIndex];

//				I->nationality= NationalityComboBox->ItemIndex+1;
				MissionEditor->ChangeTag(groupindex,shape);

				EditText();

				break;
		   }
			case	mrDelete:
			{
				AcItemForm->DeleteCurrTransItem();
				break;
			}

		}
	//MissionEditor->MobileSpdButtonState();
	MissionEditor->DisableWPUsageifnecessary();	//rdh


}
Example #16
0
/***********************************************************
update object extra info
***********************************************************/
void OsgObjectHandler::UpdateExtraInfo(const LbaNet::ObjectExtraInfo &info)
{
	_extrainfo = info;
	RefreshText();
}