• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetAction函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetAction函数的典型用法代码示例。如果您正苦于以下问题:C++ GetAction函数的具体用法?C++ GetAction怎么用?C++ GetAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: GetAction

void CGUIPanelContainer::OnLeft()
{
  CGUIAction action = GetAction(ACTION_MOVE_LEFT);
  bool wrapAround = action.GetNavigation() == GetID() || !action.HasActionsMeetingCondition();
  if (m_orientation == VERTICAL && MoveLeft(wrapAround))
    return;
  if (m_orientation == HORIZONTAL && MoveUp(wrapAround))
    return;
  CGUIControl::OnLeft();
}
开发者ID:Montellese,项目名称:xbmc,代码行数:10,代码来源:GUIPanelContainer.cpp


示例2: while

void SDLInput::OnTick(const natU64 _dt)
{
	SDL_Event event;

	while ( SDL_PollEvent(&event) ) {
		switch (event.type) {
			case SDL_QUIT:
				GetEntity()->GetKernel()->SetShutdown();
				break;
			case SDL_KEYDOWN:
				{
					 SDLKey key = event.key.keysym.sym;
					 Input::eAction action = GetAction(static_cast<natU32>(key));
					 ChangeState(action, true);
				}
				break;
			case SDL_KEYUP:
				{
					 SDLKey key = event.key.keysym.sym;
					 Input::eAction action = GetAction(static_cast<natU32>(key));
					 ChangeState(action, false);
				}
				break;
			case SDL_MOUSEBUTTONDOWN:
				{
					natU8 button = event.button.button;
					Input::eAction action = GetAction(static_cast<natU8>(button));
					ChangeState(action, true);
				}
				break;
			case SDL_MOUSEBUTTONUP:
				{
					natU8 button = event.button.button;
					Input::eAction action = GetAction(static_cast<natU8>(button));
					ChangeState(action, false);
				}
				break;
			default:
				break;
		}
	}
}
开发者ID:ricklesauceur,项目名称:dukecorporation,代码行数:42,代码来源:sdlinput.cpp


示例3: Damage

func Damage(int change, int cause)
{
	if (cause == FX_Call_DmgBlast)
	{
		// Explosions knock the hoist off the rail
		if (GetAction() == "OnRail")
			DisengageRail();
		if (pickup)
			DropVehicle();
	}
}
开发者ID:Fulgen301,项目名称:openclonk,代码行数:11,代码来源:Script.c


示例4: GetAAction

CPDF_Action CPDFSDK_BAAnnot::GetAAction(CPDF_AAction::AActionType eAAT) {
  CPDF_AAction AAction = GetAAction();

  if (AAction.ActionExist(eAAT))
    return AAction.GetAction(eAAT);

  if (eAAT == CPDF_AAction::ButtonUp)
    return GetAction();

  return CPDF_Action();
}
开发者ID:andoma,项目名称:pdfium,代码行数:11,代码来源:fsdk_baseannot.cpp


示例5: GetAction

//------------------------------------------------------------------------
int CScriptBind_UIAction::DisableAction( IFunctionHandler *pH, const char * actionName )
{
	IUIAction* pAction = GetAction( actionName );
	if ( pAction )
	{
		pAction->SetEnabled( false );
		return pH->EndFunction( true );
	}
	UIACTION_WARNING( "LUA: UIAction %s does not exist", actionName );
	return pH->EndFunction( false );
}
开发者ID:aronarts,项目名称:FireNET,代码行数:12,代码来源:ScriptBind_UIAction.cpp


示例6: GetAction

void CGUIPanelContainer::OnRight()
{
  CGUIAction action = GetAction(ACTION_MOVE_RIGHT);
  bool wrapAround = action.GetNavigation() == GetID() || !action.HasActionsMeetingCondition();
  if (GetGlobalWrapDisable())
    wrapAround = false;
  if (m_orientation == VERTICAL && MoveRight(wrapAround))
    return;
  if (m_orientation == HORIZONTAL && MoveDown(wrapAround))
    return;
  return CGUIControl::OnRight();
}
开发者ID:AndyPeterman,项目名称:mrmc,代码行数:12,代码来源:GUIPanelContainer.cpp


示例7: Wind2Turn

private func Wind2Turn()
{
  // Zielobjekt verloren
  if (!GetActionTarget())
    return(RemoveObject());
  // Drehgeschwindigkeit
  var turn = BoundBy(GetWind()/20 +5, 1, 9);
  if(!(GetAction() eq Format("Turn%d", turn)))
    SetAction(Format("Turn%d", turn));
  // Energieerzeugung
  DoEnergy(GetActMapVal("Delay", Format("Turn%d", turn))*30, GetActionTarget());
}
开发者ID:ckanibal,项目名称:clonk-content,代码行数:12,代码来源:Script.c


示例8: UIACTION_WARNING

//------------------------------------------------------------------------
int CScriptBind_UIAction::RegisterActionListener( IFunctionHandler *pH, SmartScriptTable pTable, const char* actionName, const char* eventName, const char* callback )
{
	if (!pTable)
	{
		UIACTION_WARNING( "LUA: RegisterActionListener received non-valid script table!");
		return pH->EndFunction( false );
	}

	IUIAction* pAction = strlen(actionName) > 0 ? GetAction( actionName ) : NULL;
	m_ActionCallbacks.AddCallback(pTable, callback, SUILuaCallbackInfo<IUIAction>::CreateInfo(pAction, eventName ? eventName : ""));
	return pH->EndFunction(true);
}
开发者ID:aronarts,项目名称:FireNET,代码行数:13,代码来源:ScriptBind_UIAction.cpp


示例9: OnDocumentComplete

void CSinaSvr::OnDocumentComplete(CString URL)
{
	SimpleBrowser::OnDocumentComplete(URL);

	if (GetAction() == ACT_LOGIN_SINA)
	{
		m_ActionStatus = SINA_LOGINING;
		CheckLoginStatus(URL);
		
	}

}
开发者ID:shzhqiu,项目名称:weibo,代码行数:12,代码来源:SinaBrowserTool.cpp


示例10: sizeof

//-----------------------------------------------------------------------------
// Purpose: 
// Output : Returns true if changes were effected
//-----------------------------------------------------------------------------
bool CBaseActionWithStopTimeDialog::OnSaveChanges( void )
{
	bool bret = BaseClass::OnSaveChanges();

	char stoptype[ 512 ];
	m_pStopType->GetText( stoptype, sizeof( stoptype ) );

	char stop[ 512 ];
	m_pStop->GetText( stop, sizeof( stop ) );

	float fstop = (float)atof( stop );
	int	 istop = (int)atoi( stop );

	if ( !Q_strcasecmp( stoptype, "TimeUseFrame" ) )
	{
		if ( GetAction()->m_nStopFrame != istop )
		{
			bret = true;
			GetAction()->SetStopFrame( istop );
			GetAction()->SetStopTime( -1.0f );
		}
	}
	else
	{
		if ( GetAction()->m_flStopTime != fstop )
		{
			bret = true;
			GetAction()->SetStopTime( fstop );
			GetAction()->SetStopFrame( -1 );
		}
	}

	return bret;
}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:38,代码来源:cl_demoactioneditors.cpp


示例11: GetAction

//-----------------------------------------------------------------------------
// Purpose: 
// Output : Returns true on success, false on failure.
//-----------------------------------------------------------------------------
bool CBaseActionTextMessageStartDialog::OnSaveChanges( void )
{
	bool bret = BaseClass::OnSaveChanges();

	client_textmessage_t *tm = GetAction()->GetTextMessage();
	bret |= SaveDifferingFloat( m_pFadeInTime, &tm->fadein );
	bret |= SaveDifferingFloat( m_pFadeOutTime, &tm->fadeout );
	bret |= SaveDifferingFloat( m_pHoldTime, &tm->holdtime );
	bret |= SaveDifferingFloat( m_pFXTime, &tm->fxtime );

	bret |= SaveDifferingFloat( m_pX, &tm->x );
	bret |= SaveDifferingFloat( m_pY, &tm->y );

	bret |= SaveDifferingColor( m_pColor1, &tm->r1, &tm->g1, &tm->b1, &tm->a1 );
	bret |= SaveDifferingColor( m_pColor2, &tm->r2, &tm->g2, &tm->b2, &tm->a2 );

	char sz[ 1024 ];
	m_pEffectType->GetText( sz, sizeof( sz ) );
	int iEffect = EffectTypeForName( sz );
	if ( iEffect != tm->effect )
	{
		tm->effect = iEffect;
		bret = true;
	}

	m_pMessageText->GetText( sz, sizeof( sz ) );
	if ( Q_strcasecmp( sz, GetAction()->GetMessageText() ) )
	{
		GetAction()->SetMessageText( sz );
		bret = true;
	}

	m_pFontName->GetText( sz, sizeof( sz ) );
	if ( Q_strcasecmp( sz, GetAction()->GetFontName() ) )
	{
		GetAction()->SetFontName( sz );
		bret = true;
	}
	return bret;
}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:44,代码来源:cl_demoactioneditors.cpp


示例12: sizeof

//-----------------------------------------------------------------------------
// Purpose: 
// Output : Returns true if changes were effected
//-----------------------------------------------------------------------------
bool CBaseActionSkipAheadDialog::OnSaveChanges( void )
{
	bool bret = BaseClass::OnSaveChanges();

	char skiptype[ 512 ];
	m_pSkipType->GetText( skiptype, sizeof( skiptype ) );

	char skipto[ 512 ];
	m_pSkip->GetText( skipto, sizeof( skipto ) );

	float fskip = (float)atof( skipto );
	int	 iskip = (int)atoi( skipto );

	if ( !Q_strcasecmp( skiptype, "TimeUseTick" ) )
	{
		if ( GetAction()->m_nSkipToTick != iskip )
		{
			bret = true;
			GetAction()->SetSkipToTick( iskip );
			GetAction()->SetSkipToTime( -1.0f );
		}
	}
	else
	{
		if ( GetAction()->m_flSkipToTime != fskip )
		{
			bret = true;
			GetAction()->SetSkipToTime( fskip );
			GetAction()->SetSkipToTick( -1 );
		}
	}

	return bret;
}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:38,代码来源:cl_demoactioneditors.cpp


示例13: Check

func Check() {
  var clnk;
  if(GetAction()S="Falling") return(Falling());
    
  while(clnk=FindObject(0,-25,0,50,100,OCF_CrewMember(),0,0,0,clnk)) 
    if(GetAlive(clnk) && !Random(2)) { 
      Sound("Earthquake"); 
      SetAction("Falling");
      SetPhase(phase);
      RemoveVertex(0);
      RemoveVertex(0);
    }
}
开发者ID:ckanibal,项目名称:clonk-content,代码行数:13,代码来源:Script.c


示例14: GetAction

std::string CalendarAction::GetDebugString() const
{
    std::ostringstream data;

    data << "CalendarAction::"
        << " Action: " << GetAction()
        << " Guid: " << GetPlayer()->GetGUID()
        << " Invite Id: " << GetInviteId()
        << " Extra data: " << GetExtraData()
        << " Event: " << Event.GetDebugString()
        << " Invite: " << Invite.GetDebugString();

    return data.str();
}
开发者ID:16898500,项目名称:SkyFireEMU,代码行数:14,代码来源:Calendar.cpp


示例15: GetAction

void CGUIBaseContainer::OnRight()
{
  CGUIAction action = GetAction(ACTION_MOVE_RIGHT);
  bool wrapAround = action.GetNavigation() == GetID() || !action.HasActionsMeetingCondition();
  if (m_orientation == HORIZONTAL && MoveDown(wrapAround))
    return;
  else if (m_orientation == VERTICAL)
  {
    CGUIListItemLayout *focusedLayout = GetFocusedLayout();
    if (focusedLayout && focusedLayout->MoveRight())
      return;
  }
  CGUIControl::OnRight();
}
开发者ID:FernetMenta,项目名称:xbmc,代码行数:14,代码来源:GUIBaseContainer.cpp


示例16: GetAction

// 设置场景操作句柄
void CGrowPointEditDlg::SetSceneManipulator(WX::SceneManipulator* sceneManipulator)
{
	m_pSceneManipulator = sceneManipulator;
	
	if(m_pSceneManipulator)
	{
		m_pSceneManipulator->addSceneListener(this);
		
		// 得到底层的action
		GetAction();
		SetActionMeshType();
		SetActive(false);
	}
}
开发者ID:brock7,项目名称:TianLong,代码行数:15,代码来源:GrowPointDlg.cpp


示例17: Piccheck

func Piccheck()
{
  if(FindContents(ZPM_))
  {
   SetVisibility(VIS_All());
   SetAction(GetAction(FindContents(ZPM_)));
  }
  else
  {
   SetAction("Inactive");
   SetVisibility(VIS_None());
  }
  return(1);
}
开发者ID:maxmitti,项目名称:SGGP,代码行数:14,代码来源:Script.c


示例18: actionsMgr

bool HUDWindow::on_key_press_event( GdkEventKey* event )
{
	bool return_value = false;

	auto actionsMgr(GetActionsMgr().lock());
	assert(actionsMgr);

	switch( event->keyval )
	{
		case GDK_h:
			if( event->state & GDK_CONTROL_MASK )
			{
				motk::ToggleActionPtr showHUDAction = motk::ToggleActionPtr::cast_dynamic( actionsMgr->GetAction( "View::ShowHUD" ) );
				showHUDAction->set_active( false );
				return_value = true;
			}
			break;

		case GDK_F:
			if( event->state & GDK_CONTROL_MASK )
			{
				motk::ActionPtr changeHUDFont = motk::ActionPtr::cast_dynamic( actionsMgr->GetAction( "HUD::ChangeFont" ) );
				changeHUDFont->activate();
			}
			break;
	}

	// Call base class, to allow normal handling,
	// such as allowing the row to be selected by the right-click:
	//
	if( !return_value )
	{
		return_value = Gtk::Window::on_key_press_event(event);
	}

	return return_value;
}
开发者ID:m2osw,项目名称:turnwatcher,代码行数:37,代码来源:HUDWindow.cpp


示例19: ReadAction

static ACTION ReadAction( void )
/******************************/

/* Read an action from the terminal.
 * Return the action code.
 */
{
    char buffer[80];

    if( gets( buffer ) == NULL ) {
        perror( "Error reading action" );
        abort();
    }
    return( GetAction( buffer ) );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:15,代码来源:memos.c


示例20: GetAAction

CPDF_Action	CPDFSDK_Annot::GetAAction(CPDF_AAction::AActionType eAAT)
{
	CPDF_AAction AAction = GetAAction();
	
	if (AAction.ActionExist(eAAT))
	{
		return AAction.GetAction(eAAT);
	}
	else if (eAAT == CPDF_AAction::ButtonUp)
	{
		return GetAction();
	}
	
	return NULL;
}
开发者ID:witwall,项目名称:pdfium,代码行数:15,代码来源:fsdk_baseannot.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetActiveChild函数代码示例发布时间:2022-05-30
下一篇:
C++ GetAchievementStore函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap