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


C++ GetAction函数代码示例

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


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


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