All pastes #770429 Raw Edit

Someone

public cpp v1 · immutable
·published 2007-11-12 08:39 UTC
rendered paste body
//callbacks window 3void WindowBGRedCallback( int p, int c ){	window_info_s *window = m_pGui->GetWindow( p );	statusbar_info_s *status = m_pGui->GetStatusBar( p, c );	//i decided to handle a click in my callback	int m_iNewPercent = m_pGui->GetCompletionFromPoint( window, status, m_pGui->m_mouse.x, m_pGui->m_mouse.y );	//DONT DO BAD THING!!!!!!!!!! 0mgz	if( m_iNewPercent < 0 || m_iNewPercent > 100 )		return;	//set the status bar completion	status->m_iCompletion = m_iNewPercent;	//go through all the windows	for( int i = 0; i < ( int )m_pGui->vGuiWindows.size( ); i++ )	{		window_info_s *colorwindow = m_pGui->GetWindow( i );		//convert 0/100 percent to RGB format color		colorwindow->colors.bg.r = m_pGui->GetValueFromPercent( 255, status->m_iCompletion, 100 );	}}