Beispiel #1
0
void CHUDDamageDir::UpdateLayout()
{
	//if we haven't initialized our layout info
	if (!m_hLayout)
	{
		m_hLayout = g_pLayoutDB->GetHUDRecord("HUDDamageDir");
	}

	CHUDItem::UpdateLayout();

	m_nInnerRadius = g_pLayoutDB->GetInt32(m_hLayout,LDB_HUDAddInt,0);
	m_nOuterRadius = g_pLayoutDB->GetInt32(m_hLayout,LDB_HUDAddInt,1);

	for (int i =0; i < kNumDamageSectors; i++)
	{
		DrawPrimSetRGBA(m_Poly[i],argbWhite);
		SetupQuadUVs(m_Poly[i], m_hIconTexture, 0.0f,0.0f,1.0f,1.0f);
	}

	m_fMinAlpha = g_pLayoutDB->GetFloat(m_hLayout,LDB_HUDAddFloat,0);
	m_fMaxAlpha = g_pLayoutDB->GetFloat(m_hLayout,LDB_HUDAddFloat,1);

	g_vtDamageShowAll.Init(g_pLTClient, "DamageShowAll", NULL, 0.0f);

	ScaleChanged();

}
Beispiel #2
0
void SceneNode::SetAbsoluteScale(const sf::Vector2f& scale)
{
    m_relative.scale=m_absolute.scale=scale;
    if(m_parent)
    {
        m_relative.scale.x/=m_parent->m_absolute.scale.x;
        m_relative.scale.y/=m_parent->m_absolute.scale.y;
    }
    ScaleChanged();
}
Beispiel #3
0
bool CHUDDebugInput::Init()
{

	UpdateLayout();
	ScaleChanged();

	wchar_t szTemp[64];
	LTSNPrintF(szTemp,LTARRAYSIZE(szTemp),L"%s: ",LoadString("IDS_DEBUGMSG"));
	m_Text.SetText(szTemp);

	return true;
}
Beispiel #4
0
bool CHUDArmor::Init()
{
	g_vtHUDArmorRender.Init( g_pLTClient, "HUDArmorRender", NULL, 1.0f );

	m_nFadeThreshold = 0;
	m_nLastValue = 0;
	UpdateLayout();
	ScaleChanged();
	SetSourceString( LoadString("HUD_Number_Chars"));

	return true;
}
Beispiel #5
0
bool CHUDAmmo::Init()
{
	g_vtHUDAmmoRender.Init( g_pLTClient, "HUDAmmoRender", NULL, 1.0f );

	UpdateLayout();

	m_Text.SetDropShadow(2);

	ScaleChanged();

	SetSourceString(LoadString("HUD_Ammo_Chars"));

	return true;
}
Beispiel #6
0
bool CHUDControlPointBar::CHUDControlPoint::Init( CHUDControlPointBar const& parentBar )
{
	m_pHUDControlPointBar = &parentBar;

	m_Text.SetDropShadow(2);

	ScaleChanged();

	SetSourceString(LoadString("HUD_Ammo_Chars"));

	m_hLayout = parentBar.GetLayoutRecord();

	SetUseBasePosFromLayout( false );

	if( !Init( ))
		return false;

	UpdateLayout( );

	return true;
}
Beispiel #7
0
bool CHUDControlPointBar::Init()
{
	//if we haven't initialized our layout info
	if (!m_hLayout)
	{
		m_hLayout = g_pLayoutDB->GetHUDRecord("HUDControlPointBar");
	}

	if( !CHUDItem::Init())
		return false;

	UpdateLayout();

	// Init our bar.
	m_FriendlyMeter.Init( *this, true );
	m_EnemyMeter.Init( *this, false );

	// Init the CP icon.
	m_ControlPoint.Init( *this );

	ScaleChanged();

	return true;
}
Beispiel #8
0
bool CHUDActivate::Init()
{
	UpdateLayout();
	ScaleChanged();
	return true;
}
void CMovableObject::Scale(nReal x, nReal y, nReal z)
{
	mScale = Vector3f(x, y, z);

	ScaleChanged();
}
Beispiel #10
0
bool CHUDSprintBoost::Init()
{
	UpdateLayout();
	ScaleChanged();
	return true;
}
Beispiel #11
0
void CHUDScores::SetBasePos( LTVector2n vBasePos )
{
    CHUDItem::SetBasePos( vBasePos );
    ScaleChanged();
}