void C_ListBox::LocalFunction(short ID,long P[],_TCHAR *,C_Handler *Hndlr) { switch(ID) { case CLBP_SETUP: Setup(P[0],(short)P[1],Hndlr); break; case CLBP_ADDITEM: AddItem(P[0],(short)P[1],P[2]); break; case CLBP_ADDSCROLLBAR: AddScrollBar(P[0], P[1], P[2], P[3], P[4], P[5]); break; case CLBP_SETITEMFLAGS: SetItemFlags(P[0],P[1]); break; case CLBP_SETBGIMAGE: SetBgImage(P[0]); break; case CLBP_SETBGFILL: SetBgFill((short)P[0],(short)P[1],(short)P[2],(short)P[3]); break; case CLBP_SETBGCOLOR: SetBgColor(P[0] | (P[1] << 8) | (P[2] << 16)); break; case CLBP_SETNORMALCOLOR: SetNormColor(P[0] | (P[1] << 8) | (P[2] << 16)); break; case CLBP_SETSELCOLOR: SetSelColor(P[0] | (P[1] << 8) | (P[2] << 16)); break; case CLBP_SETBARCOLOR: SetBarColor(P[0] | (P[1] << 8) | (P[2] << 16)); break; case CLBP_SETLABELCOLOR: SetLabelColor(P[0] | (P[1] << 8) | (P[2] << 16)); break; case CLBP_SETVALUE: SetValue(P[0]); break; case CLBP_ITEMGROUP: SetItemGroup(P[0],P[1]); break; case CLBP_ITEMCLUSTER: SetItemCluster(P[0],P[1]); break; case CLBP_ITEMUSERDATA: SetItemUserData(P[0],(short)P[1],P[2]); break; case CLBP_SETDROPDOWN: SetDropDown(P[0]); break; } }
//------------------------------------------------------------------------- bool CWeapon::OnActionModify(EntityId actorId, const ActionId& actionId, int activationMode, float value) { if (IsZoomed() || IsZoomingInOrOut()) return false; if (CanModify() && ((!IsReloading() && !IsBusy()) || AreAnyItemFlagsSet(eIF_Modifying))) { if (m_fm) m_fm->StopFire(); if (AreAnyItemFlagsSet(eIF_Modifying)) { m_enterModifyAction = 0; PlayAction(GetFragmentIds().leave_modify, 0); s_dofSpeed = fres(-g_pGameCVars->i_weapon_customisation_transition_time); s_dofValue = 1.0f; s_focusValue = -1.0f; GetScheduler()->TimerAction(g_pGameCVars->i_weapon_customisation_transition_time, CSchedulerAction<ScheduleLayer_Leave>::Create(this), false); SetItemFlags( eIF_Transitioning ); ClearItemFlags( eIF_Modifying ); GetGameObject()->InvokeRMI(CItem::SvRequestLeaveModify(), CItem::EmptyParams(), eRMI_ToServer); } else { gEnv->p3DEngine->SetPostEffectParam("Dof_Active", 1.0f); gEnv->p3DEngine->SetPostEffectParam("Dof_UseMask", 0.f); gEnv->p3DEngine->SetPostEffectParam("Dof_FocusRange", -1.f); gEnv->p3DEngine->SetPostEffectParam("Dof_FocusMin", 0.5f); gEnv->p3DEngine->SetPostEffectParam("Dof_FocusMax", 1.0f); gEnv->p3DEngine->SetPostEffectParam("Dof_FocusLimit", 1.5f); gEnv->p3DEngine->SetPostEffectParam("Dof_FocusMinZ", 0.0f); gEnv->p3DEngine->SetPostEffectParam("Dof_FocusMinZScale", 0.0f); m_itemLowerMode = eILM_Raised; TagState tagState = TAG_STATE_EMPTY; m_enterModifyAction = new CItemAction(PP_PlayerAction, GetFragmentIds().enter_modify, tagState); PlayFragment(m_enterModifyAction); s_dofSpeed = fres(g_pGameCVars->i_weapon_customisation_transition_time); s_dofValue = 0.0f; SetItemFlags(eIF_Transitioning); GetScheduler()->TimerAction(g_pGameCVars->i_weapon_customisation_transition_time, CSchedulerAction<ScheduleLayer_Enter>::Create(this), false); SetItemFlags(eIF_Modifying); CPlayer *pPlayer = static_cast<CPlayer*>(GetOwnerActor()); if (pPlayer) { SPlayerStats *pStats = static_cast<SPlayerStats*>(pPlayer->GetActorStats()); assert(pStats); pStats->bIgnoreSprinting = true; } GetGameObject()->InvokeRMI(CItem::SvRequestEnterModify(), CItem::EmptyParams(), eRMI_ToServer); } } return true; }