[Source Patcher] Colorful Progressbar (Simple )

Results 1 to 13 of 13
  1. #1
    Account Upgraded | Title Enabled! Tweek is online now
    MemberRank
    Dec 2009 Join Date
    AustriaLocation
    207Posts

    [Source Patcher] Colorful Progressbar (Simple )

    go to BetaPatchClientDlg.cpp
    sreach
    PHP Code:
    // Progress 
    paste under this
    Code:
    m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0)); 
    m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(36, 0, 255));
    Complie


  2. #2
    Apprentice mtcpadmin is offline
    MemberRank
    Jul 2012 Join Date
    Rotterdam, NethLocation
    21Posts

    Re: [Source Patcher] Colorful Progressbar (Simple )

    Nice!

  3. #3
    Account Upgraded | Title Enabled! Ratpack is offline
    MemberRank
    May 2011 Join Date
    311Posts

    Re: [Source Patcher] Colorful Progressbar (Simple )

    nice.

    how can i change the normal GreenBlockDesign to a Colored Line (red 0% -> green 100%)?

  4. #4
    Apprentice JustCinek is offline
    MemberRank
    Jan 2014 Join Date
    DenmarkLocation
    16Posts

    Re: [Source Patcher] Colorful Progressbar (Simple )

    Make IFs or loops in source of patcher based on progressbar percentage

  5. #5
    Apprentice mtcpadmin is offline
    MemberRank
    Jul 2012 Join Date
    Rotterdam, NethLocation
    21Posts

    Re: [Source Patcher] Colorful Progressbar (Simple )

    i think something like this
    Code:
    	for (int i;i<100;i++)
    	{
    		int value=(255/(100/i));
    m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0)); 
    m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(value, 0, 255));
    	}

  6. #6
    Account Upgraded | Title Enabled! Ratpack is offline
    MemberRank
    May 2011 Join Date
    311Posts

    Re: [Source Patcher] Colorful Progressbar (Simple )

    im not a pro coder...learning...hmmmm......this works fine:

    // Progress ÃʱâÈ­
    m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(0, 153, 0));
    m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0));
    m_File_Progress.SetPos(0);
    m_Total_Progress.SetPos(0);


    but this gives an error (warning C4700: local variable 'i' used without having been initialized)

    // Progress ÃʱâÈ­
    for (int i;i<100;i++)
    {
    int value=(255/(100/i));
    m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0));
    m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(value, 0, 255));
    }
    m_File_Progress.SetPos(0);
    m_Total_Progress.SetPos(0);

    Can anyone help pls?

  7. #7
    RE:ℓσα∂є∂ Fenris is offline
    MemberRank
    Sep 2011 Join Date
    RE:ℓσα∂Location
    595Posts

    Re: [Source Patcher] Colorful Progressbar (Simple )

    Quote Originally Posted by Ratpack View Post
    (warning C4700: local variable 'i' used without having been initialized)

    for (int i;i<100;i++)
    i was not initialized meaning i is still an open variable. You need to make i = something first before using it.

    Code:
    int i;
    for( i = 0; i < 100; i++)
    Secondly, you need to make this run on the % of how much is completed, which it isn't. It's just a random i loop currently, I think.


    If you wanted it to be random upon start up with the division that you currently have it set to, you could do this:
    Code:
    	int RNG = ( 255 / ( 101 / (( rand() % 100 ) + 1)) );
    	m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0)); 
    	m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(RNG, 0, 255));
    Last edited by Fenris; 21-02-14 at 07:12 PM.

  8. #8
    One word! Im Fawkin Pro! Xakzi is offline
    MemberRank
    Jul 2010 Join Date
    SwedenLocation
    1,356Posts

    Re: [Source Patcher] Colorful Progressbar (Simple )

    or simply
    for (int i = 0; etc etc)

    this is basics in programming

  9. #9
    Account Upgraded | Title Enabled! Ratpack is offline
    MemberRank
    May 2011 Join Date
    311Posts

    Re: [Source Patcher] Colorful Progressbar (Simple )

    @Xakzi: ya ik! but it gives me an exe crash after compiling

    // Progress ÃʱâÈ­
    for ( int i = 0; i < 100; i++ )
    {
    int value=(255/(100/i));
    m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0));
    m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(value, 0, 255));
    }
    m_File_Progress.SetPos(0);
    m_Total_Progress.SetPos(0);

    My Source is in VS2003, it is important?

  10. #10
    Account Upgraded | Title Enabled! Ratpack is offline
    MemberRank
    May 2011 Join Date
    311Posts

    Re: [Source Patcher] Colorful Progressbar (Simple )

    how can i do this?

  11. #11
    Account Upgraded | Title Enabled! Ratpack is offline
    MemberRank
    May 2011 Join Date
    311Posts

    Re: [Source Patcher] Colorful Progressbar (Simple )

    #bump #

  12. #12
    Account Upgraded | Title Enabled! Ratpack is offline
    MemberRank
    May 2011 Join Date
    311Posts

    Re: [Source Patcher] Colorful Progressbar (Simple )

    #bump #

  13. #13
    Novice Omar Martinez is offline
    MemberRank
    May 2013 Join Date
    4Posts

    Re: [Source Patcher] Colorful Progressbar (Simple )

    ._. Just do

    int i;
    for ( int i = 0; i < 100; i++ )
    {
    int value=(255/(100/i));
    m_Total_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(255, 0, 0));
    m_File_Progress.SendMessage(PBM_SETBARCOLOR, 0, (LPARAM)RGB(value, 0, 255));
    }
    m_File_Progress.SetPos(0);
    m_Total_Progress.SetPos(0);



Advertisement