当前位置: 首页>>代码示例>>C++>>正文


C++ Tab::add方法代码示例

本文整理汇总了C++中Tab::add方法的典型用法代码示例。如果您正苦于以下问题:C++ Tab::add方法的具体用法?C++ Tab::add怎么用?C++ Tab::add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tab的用法示例。


在下文中一共展示了Tab::add方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: initAutoTab

Tab* initAutoTab()
{
	Tab* AutoTab = new Tab(kBottomScreen, 0, 0, AutoTab_Sprite, &FieldBackground, Controllers::autoTabController);
	
		// checkboxes (Hybrid Type)
		CheckBox* HasAuto = new CheckBox(kBottomScreen, 170, 40, HasAuto_Sprite);
		
			AutoTab->add(HasAuto);
				Controllers::autoTabController->set_HasAuto(HasAuto);
		
		// special boxes (score type)
		
		RBGroup* AutoStrategy = new RBGroup();
		
			RadioButton* AutoDefense = new RadioButton(kBottomScreen, 32, 64, Defense_Sprite);
			RadioButton* AutoAssist = new RadioButton(kBottomScreen, 96, 64, AutoAssist_Sprite);
			RadioButton* Other = new RadioButton(kBottomScreen, 160, 64, Other_Sprite);
		
		AutoStrategy->add(AutoDefense);
		AutoStrategy->add(AutoAssist);
		AutoStrategy->add(Other);
		
			AutoTab->add(AutoStrategy);
				Controllers::autoTabController->set_AutoStrategy(AutoStrategy);
		
		// number_sprites (Score Locations)
		NumberSprite* RackScore = new NumberSprite(kBottomScreen, 140, 106, Rack_Sprite);
		NumberSprite* TroughScore = new NumberSprite(kBottomScreen, 140, 128, Trough_Sprite);
		NumberSprite* ZoneScore = new NumberSprite(kBottomScreen, 140, 150, Zone_Sprite);
		
			AutoTab->add(RackScore);
				Controllers::autoTabController->set_RScore(RackScore);
			
			AutoTab->add(TroughScore);
				Controllers::autoTabController->set_TScore(TroughScore);
			
			AutoTab->add(ZoneScore);
				Controllers::autoTabController->set_ZScore(ZoneScore);
	
	return AutoTab;
}
开发者ID:Biosonic42,项目名称:RoboEI-2012-GreenGame,代码行数:41,代码来源:AutoTab.cpp

示例2: initTeleTab

Tab* initTeleTab()
{	
	Tab* TeleTab = new Tab(kBottomScreen, 64, 0, TeleTab_Sprite, &BGTele, Controllers::teleTabController);
	
		// checkboxes (If Occured)
		CheckBox* Disabled = new CheckBox(kBottomScreen, 137, 44, Disabled_Sprite);
		
			TeleTab->add(Disabled);
				Controllers::teleTabController->set_Disabled(Disabled);
		
		CheckBox* CanLowerBridge = new CheckBox(kBottomScreen, 90, 76, CanLowerBridge_Sprite);
		
			TeleTab->add(CanLowerBridge);
				Controllers::teleTabController->set_LowerBridge(CanLowerBridge);
		
		CheckBox* TravelAcrossBar = new CheckBox(kBottomScreen, 218, 76, TravelAcrossBar_Sprite);
		
			TeleTab->add(TravelAcrossBar);
				Controllers::teleTabController->set_TravelBar(TravelAcrossBar);
		
		// number sprites (Score Locations and Balls PU)
		NumberSprite* BallsPU = new NumberSprite(kBottomScreen, 100, 127, BALLS_Sprite);
		NumberSprite* TopScoreTele = new NumberSprite(kBottomScreen, 218, 100, Top_Sprite);
		NumberSprite* MidScoreTele = new NumberSprite(kBottomScreen, 218, 127, Mid_Sprite);
		NumberSprite* LowScoreTele = new NumberSprite(kBottomScreen, 218, 154, Low_Sprite);
		
			TeleTab->add(BallsPU);
				Controllers::teleTabController->set_BallsPU(BallsPU);
			
			TeleTab->add(TopScoreTele);
				Controllers::teleTabController->set_TScore(TopScoreTele);
			
			TeleTab->add(MidScoreTele);
				Controllers::teleTabController->set_MScore(MidScoreTele);
			
			TeleTab->add(LowScoreTele);
				Controllers::teleTabController->set_LScore(LowScoreTele);
		
		// disabled counter display
		NumberSprite* DisabledCounter = new NumberSprite(kBottomScreen, 170, 36, BlankTitle_Sprite);
			
			TeleTab->add(DisabledCounter);
				Controllers::teleTabController->set_DisabledCounter(DisabledCounter);

	return TeleTab;
}
开发者ID:Biosonic42,项目名称:RoboEI-Wifi,代码行数:46,代码来源:TeleTab.cpp

示例3: initEndTab

Tab* initEndTab()
{
	Tab* EndTab = new Tab(kBottomScreen, 192, 0, EndTab_Sprite, &BGEnd, Controllers::endTabController);
	
		CheckBox* Defensive = new CheckBox(kBottomScreen, 100, 60, Defensive_Sprite);
		
			EndTab->add(Defensive);
				Controllers::endTabController->set_Defensive(Defensive);
		
		CheckBox* Assist = new CheckBox(kBottomScreen, 100, 92, Assist_Sprite);
		
			EndTab->add(Assist);
				Controllers::endTabController->set_Assist(Assist);
		
		NumberSprite* Technical = new NumberSprite(kBottomScreen, 224, 60, Technical_Sprite);
		NumberSprite* Regular = new NumberSprite(kBottomScreen, 224, 92, Regular_Sprite);
		
			EndTab->add(Technical);
				Controllers::endTabController->set_Technical(Technical);
			
			EndTab->add(Regular);
				Controllers::endTabController->set_Regular(Regular);
		
		SpecialBox* YellowPenalty = new SpecialBox(kBottomScreen, 146, 114, yellow_penalty_Sprite);
		
			EndTab->add(YellowPenalty);
				Controllers::endTabController->set_YellowPenalty(YellowPenalty);
		
		SpecialBox* RedPenalty = new SpecialBox(kBottomScreen, 42, 114, red_penalty_Sprite);
		
			EndTab->add(RedPenalty);
				Controllers::endTabController->set_RedPenalty(RedPenalty);
		
		SpecialBox* Finish = new SpecialBox(kBottomScreen, 160, 156, Finish_Sprite);
		
			EndTab->add(Finish);
				Controllers::endTabController->set_Finish(Finish);
	
	return EndTab;
}
开发者ID:duanem,项目名称:RoboEI,代码行数:40,代码来源:EndTab.cpp


注:本文中的Tab::add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。