Files
itgmania212121/stepmania/src/DifficultyIcon.h
T

53 lines
1007 B
C++
Raw Normal View History

2002-06-14 22:25:22 +00:00
#pragma once
2002-01-16 10:01:32 +00:00
/*
-----------------------------------------------------------------------------
2002-06-14 22:25:22 +00:00
Class: DifficultyIcon
2002-01-16 10:01:32 +00:00
2002-06-14 22:25:22 +00:00
Desc: A graphic displayed in Select Music above the Groove Radar.
2002-01-16 10:01:32 +00:00
2002-05-19 01:59:48 +00:00
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
2002-06-14 22:25:22 +00:00
Chris Danford
2002-01-16 10:01:32 +00:00
-----------------------------------------------------------------------------
*/
#include "Sprite.h"
2002-08-23 00:49:09 +00:00
#include "Notes.h"
#include "ThemeManager.h"
2002-01-16 10:01:32 +00:00
class DifficultyIcon : public Sprite
{
public:
DifficultyIcon()
{
Load( THEME->GetPathTo("Graphics","select music difficulty icons") );
2002-01-16 10:01:32 +00:00
StopAnimating();
2002-05-19 01:59:48 +00:00
SetFromNotes( NULL );
2002-01-16 10:01:32 +00:00
};
2002-08-23 00:49:09 +00:00
void SetFromNotes( const Notes* pNotes )
2002-01-16 10:01:32 +00:00
{
2002-05-19 01:59:48 +00:00
if( pNotes != NULL )
2002-02-02 05:11:12 +00:00
{
SetDiffuse( D3DXCOLOR(1,1,1,1) );
2002-09-29 05:06:18 +00:00
switch( pNotes->m_Difficulty )
2002-06-27 17:49:10 +00:00
{
2002-09-29 05:06:18 +00:00
case DIFFICULTY_EASY: SetState( 0 ); break;
case DIFFICULTY_MEDIUM: SetState( 1 ); break;
case DIFFICULTY_HARD: SetState( 2 ); break;
2002-06-27 17:49:10 +00:00
}
2002-02-02 05:11:12 +00:00
}
else
{
SetDiffuse( D3DXCOLOR(1,1,1,0) );
2002-06-27 17:49:10 +00:00
SetState( 0 );
2002-02-02 05:11:12 +00:00
}
2002-01-16 10:01:32 +00:00
};
private:
};