|
|
#1 |
![]() Join Date: Jul 2009
Reputation: 9
Posts: 278
|
Horizontal hud to Vertical, help?
--
I'm trying to make an option for a vertical/horizontal version of the same hud, but I'm not really sure what to change how. Could somebody help me grip the basic concept behind this, doing this really hurts my brain. ![]() Here's a small snippet of the code. Code:
if ( pWeapon->GetSpriteInactive() )
{
iconWidth = pWeapon->GetSpriteInactive()->Width();
iconHeight = pWeapon->GetSpriteInactive()->Height();
x_offs = (boxWide - iconWidth) / 2;
if ( bSelected && HUDTYPE_CAROUSEL == hud_fastswitch.GetInt() )
{
// place the icon aligned with the non-selected version
y_offs = (boxTall/1.5f - iconHeight) / 2;
}
else
{
y_offs = (boxTall - iconHeight) / 2;
}
if ( !pWeapon->CanBeSelected() )
{
// unselectable weapon, display as such
col = Color(255, 0, 0, col[3]);
}
// draw the inactive version
pWeapon->GetSpriteInactive()->DrawSelf( xpos + x_offs, ypos + y_offs, iconWidth, iconHeight, col );
}
|
|
|
|
|
|
#2 |
![]() Join Date: Jul 2009
Reputation: 9
Posts: 278
|
Edit: Never mind I figured it out, was a lot simpler than I thought. Just making things harder than they are.
Last edited by BakonGuy: 09-22-2010 at 03:10 PM. |
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|