当前位置: 首页>>代码示例>>C++>>正文


C++ RageColor函数代码示例

本文整理汇总了C++中RageColor函数的典型用法代码示例。如果您正苦于以下问题:C++ RageColor函数的具体用法?C++ RageColor怎么用?C++ RageColor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了RageColor函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: RageColor

void LifeMeterTime::Load( const PlayerState *pPlayerState, PlayerStageStats *pPlayerStageStats )
{
	LifeMeter::Load( pPlayerState, pPlayerStageStats );

	const RString sType = "LifeMeterTime";

	m_sprBackground.Load( THEME->GetPathG(sType,"background") );
	m_sprBackground->SetName( "Background" );
	m_sprBackground->ZoomToWidth( METER_WIDTH );
	m_sprBackground->ZoomToHeight( METER_HEIGHT );
	this->AddChild( m_sprBackground );

	m_quadDangerGlow.ZoomToWidth( METER_WIDTH );
	m_quadDangerGlow.ZoomToHeight( METER_HEIGHT );
	// hardcoded effects...
	m_quadDangerGlow.SetEffectDiffuseShift();
	m_quadDangerGlow.SetEffectColor1( RageColor(1,0,0,0.8f) );
	m_quadDangerGlow.SetEffectColor2( RageColor(1,0,0,0) );
	m_quadDangerGlow.SetEffectClock( Actor::CLOCK_BGM_BEAT );
	this->AddChild( &m_quadDangerGlow );

	m_pStream = new StreamDisplay;
	bool bExtra = GAMESTATE->IsAnExtraStage();
	m_pStream->Load( bExtra ? "StreamDisplayExtra" : "StreamDisplay" );
	this->AddChild( m_pStream );

	RString sExtra = bExtra ? "extra " : "";
	m_sprFrame.Load( THEME->GetPathG(sType,sExtra+"frame") );
	m_sprFrame->SetName( "Frame" );
	this->AddChild( m_sprFrame );

	m_soundGainLife.Load( THEME->GetPathS(sType,"GainLife") );
}
开发者ID:SamDecrock,项目名称:stepmania5-http-post-scores,代码行数:33,代码来源:LifeMeterTime.cpp

示例2: switch

void ScreenPlayerOptions::HandleScreenMessage( const ScreenMessage SM )
{
	if( m_bAskOptionsMessage )
	{
		switch( SM )
		{
		case SM_BeginFadingOut: // when the user accepts the page of options
			{
				m_bAcceptedChoices = true;

				float fShowSeconds = m_Out.GetLengthSeconds();

				// show "hold START for options"
				m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
				m_sprOptionsMessage.BeginTweening( 0.15f );     // fade in
				m_sprOptionsMessage.SetZoomY( 1 );
				m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,1) );
				m_sprOptionsMessage.BeginTweening( fShowSeconds-0.3f ); // sleep
				m_sprOptionsMessage.BeginTweening( 0.15f );     // fade out
				m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
				m_sprOptionsMessage.SetZoomY( 0 );
			}
			break;
		}
	}

	ScreenOptionsMaster::HandleScreenMessage( SM );
}
开发者ID:Fighter19,项目名称:PSPMania,代码行数:28,代码来源:ScreenPlayerOptions.cpp

示例3: RageColor

void ScreenMiniMenu::AfterLineChanged()
{
	m_textLabel[m_iCurLine].SetEffectGlowShift( 1.0f, RageColor(0,0.5f,0,1), RageColor(0,1,0,1) );
	m_textAnswer[m_iCurLine].SetEffectGlowShift( 1.0f, RageColor(0,0.5f,0,1), RageColor(0,1,0,1) );
	m_textLabel[m_iCurLine].SetZoom( ZOOM_SELECTED );
	m_textAnswer[m_iCurLine].SetZoom( ZOOM_SELECTED );
}
开发者ID:augustg,项目名称:stepmania-3.9,代码行数:7,代码来源:ScreenMiniMenu.cpp

示例4: RageColor

void ScreenSelectDifficulty::UpdateSelectableChoices()
{
    for( int page=0; page<NUM_PAGES; page++ )
    {
        /* XXX: If a player joins during the tween-in, this diffuse change
         * will be undone by the tween.  Hmm. */
        for( unsigned i=0; i<m_GameCommands[page].size(); i++ )
        {
            /* If the icon is text, use a dimmer diffuse, or we won't be
             * able to see the glow. */
            if( m_GameCommands[page][i].IsPlayable() )
            {
                m_sprInfo[page][i].SetDiffuse( RageColor(1,1,1,1) );
                m_sprPicture[page][i].SetDiffuse( RageColor(1,1,1,1) );
            }
            else
            {
                m_sprInfo[page][i].SetDiffuse( DISABLED_COLOR );
                m_sprPicture[page][i].SetDiffuse( DISABLED_COLOR );
            }
        }
    }

    // I'm not sure why this was here -- but there seem no ill effects
    // of it's removal.
    //
    //FOREACH_HumanPlayer( p )
    //	{
    //		MenuRight( p );
    //		MenuLeft( p );
    //	}
}
开发者ID:BitMax,项目名称:openitg,代码行数:32,代码来源:ScreenSelectDifficulty.cpp

示例5: RageColor

void ScreenSelectStyle::AfterChange()
{
	m_sprIcon[m_iSelection].RunCommands( ICON_GAIN_FOCUS_COMMAND );
	m_textIcon[m_iSelection].RunCommands( ICON_GAIN_FOCUS_COMMAND );
	m_sprPicture[m_iSelection].SetDiffuse( RageColor(1,1,1,1) );
	m_sprInfo[m_iSelection].SetDiffuse( RageColor(1,1,1,1) );
	m_sprPicture[m_iSelection].SetZoom( 1 );
	m_sprInfo[m_iSelection].SetZoom( 1 );
	SET_XY_AND_ON_COMMAND( m_sprPicture[m_iSelection] );
	SET_XY_AND_ON_COMMAND( m_sprInfo[m_iSelection] );
}
开发者ID:BitMax,项目名称:openitg,代码行数:11,代码来源:ScreenSelectStyle.cpp

示例6: RageColor

void OptionsCursor::SetCanGo( bool bCanGoLeft, bool bCanGoRight )
{
	if( m_sprCanGoLeft )
	{
		m_sprCanGoLeft->EnableAnimation( bCanGoLeft );
		m_sprCanGoRight->EnableAnimation( bCanGoRight );

		m_sprCanGoLeft->SetDiffuse( bCanGoLeft ? RageColor(1,1,1,1) : RageColor(1,1,1,0) );
		m_sprCanGoRight->SetDiffuse( bCanGoRight ? RageColor(1,1,1,1) : RageColor(1,1,1,0) );
	}
}
开发者ID:Highlogic,项目名称:stepmania-event,代码行数:11,代码来源:OptionsCursor.cpp

示例7: ROW_Y

void EditCoursesSongMenu::ChangeToRow( Row newRow )
{
	m_SelectedRow = newRow;

	for( int i=0; i<2; i++ )
		m_sprArrows[i].SetY( ROW_Y(newRow) );
	m_sprArrows[0].SetDiffuse( CanGoLeft()?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
	m_sprArrows[1].SetDiffuse( CanGoRight()?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
	m_sprArrows[0].EnableAnimation( CanGoLeft() );
	m_sprArrows[1].EnableAnimation( CanGoRight() );
}
开发者ID:DataBeaver,项目名称:openitg,代码行数:11,代码来源:EditCoursesSongMenu.cpp

示例8: abs

void ScreenNetRoom::UpdateRoomsList()
{
	int difference = 0;
	RoomWheelItemData* itemData = NULL;

	difference = m_RoomWheel.GetNumItems() - m_Rooms.size();

	if( !m_RoomWheel.IsEmpty() )
	{
		if( difference > 0 )
			for( int x = 0; x < difference; ++x )
				m_RoomWheel.RemoveItem( m_RoomWheel.GetNumItems() - 1 );
		else
		{
			difference = abs( difference );
			for( int x = 0; x < difference; ++x )
				m_RoomWheel.AddItem( new RoomWheelItemData(WheelItemDataType_Generic, "", "", RageColor(1,1,1,1)) );
		}
	}
	else
	{
		for ( unsigned int x = 0; x < m_Rooms.size(); ++x)
				m_RoomWheel.AddItem( new RoomWheelItemData(WheelItemDataType_Generic, "", "", RageColor(1,1,1,1)) );
	}

	for( unsigned int i = 0; i < m_Rooms.size(); ++i )
	{
		itemData = m_RoomWheel.GetItem( i );

		itemData->m_sText = m_Rooms[i].Name();
		itemData->m_sDesc = m_Rooms[i].Description();
		itemData->m_iFlags = m_Rooms[i].GetFlags();

		switch( m_Rooms[i].State() )
		{
		case 0:
			itemData->m_color = THEME->GetMetricC( m_sName, "OpenRoomColor");
			break;
		case 2:
			itemData->m_color = THEME->GetMetricC( m_sName, "InGameRoomColor");
			break;
		default:
			itemData->m_color = THEME->GetMetricC( m_sName, "OpenRoomColor");
			break;
		}

		if ( m_Rooms[i].GetFlags() % 2 )
			itemData->m_color = THEME->GetMetricC( m_sName, "PasswdRoomColor");
	}

	m_RoomWheel.RebuildWheelItems();
}
开发者ID:SamDecrock,项目名称:stepmania5-http-post-scores,代码行数:52,代码来源:ScreenNetRoom.cpp

示例9: ROW_Y

void EditCoursesMenu::ChangeToRow( Row newRow )
{
	m_SelectedRow = newRow;

	const float fRowY = ROW_Y(newRow);
	const bool bCanGoLeft = CanGoLeft(), bCanGoRight = CanGoRight();
	m_sprArrows[0].SetY( fRowY );
	m_sprArrows[1].SetY( fRowY );
	m_sprArrows[0].SetDiffuse( bCanGoLeft?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
	m_sprArrows[1].SetDiffuse( bCanGoRight?RageColor(1,1,1,1):RageColor(0.2f,0.2f,0.2f,1) );
	m_sprArrows[0].EnableAnimation( bCanGoLeft );
	m_sprArrows[1].EnableAnimation( bCanGoRight );
}
开发者ID:Fighter19,项目名称:PSPMania,代码行数:13,代码来源:EditCoursesMenu.cpp

示例10: LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND

void ScreenStatsOverlay::Init()
{
	Screen::Init();
	
 	m_textStats.LoadFromFont( THEME->GetPathF(m_sName,"stats") );
	m_textStats.SetName( "Stats" );
	LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_textStats ); 
	this->AddChild( &m_textStats );

	/* "Was that a skip?"  This displays a message when an update takes
	 * abnormally long, to quantify skips more precisely, verify them
	 * when they're subtle, and show the time it happened, so you can pinpoint
	 * the time in the log. */
	m_LastSkip = 0;

	SHOW_SKIPS.Load( m_sName, "ShowSkips" );
	if( SHOW_SKIPS )
	{
		SKIP_X.Load( m_sName, "SkipX" );
		SKIP_Y.Load( m_sName, "SkipY" );
		SKIP_SPACING_Y.Load( m_sName, "SkipSpacingY" );
		SKIP_WIDTH.Load( m_sName, "SkipWidth" );
		
		RectF rectSkips = RectF(
			SKIP_X-SKIP_WIDTH/2, 
			SKIP_Y-(SKIP_SPACING_Y*NUM_SKIPS_TO_SHOW)/2 - 10, 
			SKIP_X+SKIP_WIDTH/2, 
			SKIP_Y+(SKIP_SPACING_Y*NUM_SKIPS_TO_SHOW)/2 + 10
			);
		m_quadSkipBackground.StretchTo( rectSkips );
		m_quadSkipBackground.SetDiffuse( RageColor(0,0,0,0.4f) );
		this->AddChild(&m_quadSkipBackground);

		for( int i=0; i<NUM_SKIPS_TO_SHOW; i++ )
		{
			/* This is somewhat big.  Let's put it on the right side, where it'll
			 * obscure the 2P side during gameplay; there's nowhere to put it that
			 * doesn't obscure something, and it's just a diagnostic. */
			m_textSkips[i].LoadFromFont( THEME->GetPathF("Common","normal") );
			m_textSkips[i].SetX( SKIP_X );
			m_textSkips[i].SetY( 
				SCALE( i, 0, NUM_SKIPS_TO_SHOW-1, rectSkips.top + 10, rectSkips.bottom - 10 ) 
				);
			m_textSkips[i].SetDiffuse( RageColor(1,1,1,0) );
			m_textSkips[i].SetShadowLength( 0 );
			this->AddChild( &m_textSkips[i] );
		}
	}

	this->SubscribeToMessage( "ShowStatsChanged" );
}
开发者ID:goofwear,项目名称:stepmania,代码行数:51,代码来源:ScreenStatsOverlay.cpp

示例11: RageVector3

void Actor::TweenState::Init()
{
	pos	= RageVector3( 0, 0, 0 );
	rotation = RageVector3( 0, 0, 0 );
	quat = RageVector4( 0, 0, 0, 1 );
	scale = RageVector3( 1, 1, 1 );
	crop = RectF( 0,0,0,0 );
	fade = RectF( 0,0,0,0 );
	fadecolor = RageColor( 1, 1, 1, 0 );
	for(int i=0; i<4; i++) 
		diffuse[i] = RageColor( 1, 1, 1, 1 );
	glow = RageColor( 1, 1, 1, 0 );
	glowmode = GLOW_WHITEN;
}
开发者ID:augustg,项目名称:stepmania-3.9,代码行数:14,代码来源:Actor.cpp

示例12: RageColor

void ScreenStatsOverlay::AddTimestampLine( const RString &txt, const RageColor &color )
{
	m_textSkips[m_LastSkip].SetText( txt );
	m_textSkips[m_LastSkip].StopTweening();
	m_textSkips[m_LastSkip].SetDiffuse( RageColor(1,1,1,1) );
	m_textSkips[m_LastSkip].BeginTweening( 0.2f );
	m_textSkips[m_LastSkip].SetDiffuse( color );
	m_textSkips[m_LastSkip].BeginTweening( 3.0f );
	m_textSkips[m_LastSkip].BeginTweening( 0.2f );
	m_textSkips[m_LastSkip].SetDiffuse( RageColor(1,1,1,0) );

	m_LastSkip++;
	m_LastSkip %= NUM_SKIPS_TO_SHOW;
}
开发者ID:goofwear,项目名称:stepmania,代码行数:14,代码来源:ScreenStatsOverlay.cpp

示例13: GetBrightnessColor

static RageColor GetBrightnessColor( float fBrightnessPercent )
{
	RageColor cBrightness = RageColor( 0,0,0,1-fBrightnessPercent );
	RageColor cClamp = RageColor( 0.5f,0.5f,0.5f,CLAMP_OUTPUT_PERCENT );

	// blend the two colors above as if cBrightness is drawn, then cClamp drawn on top
	cBrightness.a *= (1-cClamp.a);	// premultiply alpha

	RageColor ret;
	ret.a = cBrightness.a + cClamp.a;
	ret.r = (cBrightness.r * cBrightness.a + cClamp.r * cClamp.a) / ret.a;
	ret.g = (cBrightness.g * cBrightness.a + cClamp.g * cClamp.a) / ret.a;
	ret.b = (cBrightness.b * cBrightness.a + cClamp.b * cClamp.a) / ret.a;
	return ret;
}
开发者ID:KingMew,项目名称:stepmania,代码行数:15,代码来源:Background.cpp

示例14: RageColor

void FadingBanner::BeforeChange()
{
	m_Banner[m_iIndexFront].SetDiffuse( RageColor(1,1,1,1) );

	m_iIndexFront = GetBackIndex();

	m_Banner[m_iIndexFront].SetDiffuse( RageColor(1,1,1,1) );
	m_Banner[m_iIndexFront].StopTweening();
	m_Banner[m_iIndexFront].BeginTweening( FADE_SECONDS );		// fade out
	m_Banner[m_iIndexFront].SetDiffuse( RageColor(1,1,1,0) );

	/* We're about to load a banner.  It'll probably cause a frame skip or
	 * two.  Skip an update, so the fade-in doesn't skip. */
	m_bSkipNextBannerUpdate = true;
}
开发者ID:augustg,项目名称:stepmania-3.9,代码行数:15,代码来源:FadingBanner.cpp

示例15: LifeMeterStream

	LifeMeterStream()
	{
		METER_WIDTH.Refresh();
		METER_HEIGHT.Refresh();
		DANGER_THRESHOLD.Refresh();
		NUM_CHAMBERS.Refresh();
		NUM_STRIPS.Refresh();


		bool bExtra = GAMESTATE->IsExtraStage()||GAMESTATE->IsExtraStage2();

		m_quadMask.SetDiffuse( RageColor(0,0,0,1) );
		m_quadMask.SetZ( 1 );
		m_quadMask.SetBlendMode( BLEND_NO_EFFECT );
		m_quadMask.SetUseZBuffer( true );

		CString sGraphicPath;
		RageTextureID ID;
		ID.bStretch = true;

		sGraphicPath = ssprintf("LifeMeterBar %snormal", bExtra?"extra ":"");
		ID.filename = THEME->GetPathToG(sGraphicPath);
		m_sprStreamNormal.Load( ID );
		m_sprStreamNormal.SetUseZBuffer( true );

		sGraphicPath = ssprintf("LifeMeterBar %shot", bExtra?"extra ":"");
		ID.filename = THEME->GetPathToG(sGraphicPath);
		m_sprStreamHot.Load( ID );
		m_sprStreamHot.SetUseZBuffer( true );

		sGraphicPath = ssprintf("LifeMeterBar %sframe", bExtra?"extra ":"");
		ID.filename = THEME->GetPathToG(sGraphicPath);
		m_sprFrame.Load( ID );
	}
开发者ID:augustg,项目名称:stepmania-3.9,代码行数:34,代码来源:LifeMeterBar.cpp


注:本文中的RageColor函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。