Files
itgmania212121/stepmania/src/WheelItemBase.cpp
T

90 lines
2.5 KiB
C++
Raw Normal View History

#include "global.h"
#include "WheelItemBase.h"
WheelItemBaseData::WheelItemBaseData( WheelItemDataType type, RString sText, RageColor color )
{
m_Type = type;
m_sText = sText;
m_color = color;
}
2005-09-09 03:23:10 +00:00
WheelItemBase::WheelItemBase( const WheelItemBase &cpy ):
ActorFrame( cpy ),
2008-12-26 12:32:48 +00:00
m_pData( cpy.m_pData ),
m_bExpanded( cpy.m_bExpanded )
2005-09-09 03:23:10 +00:00
{
// FIXME
//if( cpy.m_pGrayBar == cpy.m_sprBar )
// m_pGrayBar = m_sprBar;
2005-09-09 03:23:10 +00:00
}
2006-01-22 01:00:06 +00:00
WheelItemBase::WheelItemBase(RString sType)
{
2005-05-03 01:05:11 +00:00
SetName( sType );
m_pData = NULL;
m_bExpanded = false;
m_pGrayBar = NULL;
2005-05-03 01:05:11 +00:00
Load(sType);
}
2006-01-22 01:00:06 +00:00
void WheelItemBase::Load( RString sType )
2005-05-03 01:05:11 +00:00
{
2006-04-25 08:46:43 +00:00
m_colorLocked = RageColor(0,0,0,0);
}
void WheelItemBase::LoadFromWheelItemData( const WheelItemBaseData* pWID, int iIndex, bool bHasFocus )
{
ASSERT( pWID != NULL );
m_pData = pWID;
}
void WheelItemBase::DrawGrayBar( Actor& bar )
2005-05-05 02:48:46 +00:00
{
2006-04-25 08:46:43 +00:00
if( m_colorLocked.a == 0 )
2005-05-05 02:48:46 +00:00
return;
RageColor glow = bar.GetGlow();
RageColor diffuse = bar.GetDiffuse();
2006-04-25 08:46:43 +00:00
bar.SetGlow( m_colorLocked );
2005-05-05 02:48:46 +00:00
bar.SetDiffuse( RageColor(0,0,0,0) );
2005-05-05 02:48:46 +00:00
bar.Draw();
bar.SetGlow( glow );
bar.SetDiffuse( diffuse );
2005-05-05 02:48:46 +00:00
}
void WheelItemBase::DrawPrimitives()
{
ActorFrame::DrawPrimitives();
if( m_pGrayBar != NULL )
DrawGrayBar( *m_pGrayBar );
}
/*
* (c) 2001-2004 Chris Danford, Chris Gomez, Glenn Maynard, Josh Allen
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, and/or sell copies of the Software, and to permit persons to
* whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/