Question Infinite scroller in GSC

Discussion in 'Call of Duty Classics' started by ujuuu, Oct 21, 2018.

  1. ujuuu

    ujuuu New Member

    2
    0
    1
    Credits:
    33
    Hi,

    Anyone can help me to add infinite scroller to my menu please ?
    Code:
    MenuFuncs()
    {
       self endon( "disconnect" );
       self.Menu["Curs"] = 0;
       for(;;)
       {
           if( self FragButtonPressed() && self.InMenu == false )
           {       
               self thread MenuShaders();
               self.InMenu = true;
               self.Menu["Sub"] = "Main";
               self thread DrawMenu();   
               self thread updateDirectory();
               self doHeart();
    
           }
           if( self MeleeButtonPressed() && self.InMenu == true )
           {
           if( self.Menu["Sub"] == "Main" )
                   self ExitMenu();
               else   
                   self ExitSub();   
                   self thread updateDirectory();
           }
           if( self MeleeButtonPressed() && self.InPMenu == true && self.Verify == "Host")
           {
           if( self.Menu["Sub"] == "PlayerMenu" )
                   self ExitMenu();
               else   
                   self ExitSub();
                   self thread updateDirectory();               
           }
           if( self AttackButtonPressed() && self.IsScrolling == false && self.InMenu == true )
           {
               self.Menu["Curs"] ++;
               self.IsScrolling = true;
                   if( self.Menu["Curs"] >= self.Menu["Option"]["Name"][self.Menu["Sub"]].size )
                       self.Menu["Curs"] = 0;
              
               self CursMove();
               self.IsScrolling = false;
               wait 0.2;
              
           }
           if( self AdsButtonPressed() && self.IsScrolling == false && self.InMenu == true )
           {
               self.Menu["Curs"] --;
               self.IsScrolling = true;
               if(self.Menu["Curs"] < 0)
               {
                       self.Menu["Curs"] = self.Menu["Option"]["Name"][self.Menu["Sub"]].size-1;
               }
               self CursMove();
               wait 0.2;
               self.IsScrolling = false;
           }
           if( self AttackButtonPressed() && self.IsScrolling == false && self.InPMenu == true && self.Verify == "Host")
           {
               self.Menu["Curs"] ++;
               self.IsScrolling = true;
               if(self.Menu["Sub"] == "PlayerMenu")
               {
                   if( self.Menu["Curs"] >= level.players.size )
                       self.Menu["Curs"] = 0;
               }
               else
               {
                   if( self.Menu["Curs"] >= self.Menu["Option"]["Name"][self.Menu["Sub"]].size )
                       self.Menu["Curs"] = 0;
               }
              
               self CursMove();
               self.IsScrolling = false;
               wait 0.2;
              
           }
           if( self AdsButtonPressed() && self.IsScrolling == false && self.InPMenu == true && self.Verify == "Host")
           {
               self.Menu["Curs"] --;
               self.IsScrolling = true;
               if(self.Menu["Curs"] < 0)
               {
                   if(self.Menu["Sub"] == "PlayerMenu")
                       self.Menu["Curs"] = level.players.size-1;
                   else
                       self.Menu["Curs"] = self.Menu["Option"]["Name"][self.Menu["Sub"]].size-1;
               }
               self CursMove();
               wait 0.2;
               self.IsScrolling = false;
           }
           if( self UseButtonPressed() && self.InMenu == true )
           {
               if(self.Menu["Sub"] == "PlayerMenu")
               self.PlayerNum = self.Menu["Curs"];
               self thread [[self.Menu["Func"][self.Menu["Sub"]][self.Menu["Curs"]]]](self.Menu["Input"][self.Menu["Sub"]][self.Menu["Curs"]]);
               self thread updateDirectory();
               self thread UseEffect();
               wait 0.3;
           }   
           if( self UseButtonPressed() && self.InPMenu == true && self.Verify == "Host")
           {
               if(self.Menu["Sub"] == "PlayerMenu")
               self.PlayerNum = self.Menu["Curs"];
               self thread [[self.Menu["Func"][self.Menu["Sub"]][self.Menu["Curs"]]]](self.Menu["Input"][self.Menu["Sub"]][self.Menu["Curs"]]);
               self thread updateDirectory();
               self thread UseEffect();
               wait 0.3;
           }   
           wait 0.05;
       }
    }
    My shader:
    Code:
    self.Menu["Shader"]["backround"][0] = self createRectangle("LEFT","LEFT",0,-24,181,300,(0,0,0),"white",100, .8); self.Menu["Shader"]["backround"][0] Animate("Y", "300", "3");
    My scroller:
    Code:
    self.Menu["Shader"]["Curs"][4] setPoint("LEFT","LEFT", 179, ((self.Menu["Curs"]*18) - 124) );
    Big thank if you can help me, I really need it but failed :/
     
  2. P!X

    P!X Moderator Staff Member Head Staff Team

    272
    547
    303
    Credits:
    2,464
    You should look at some menu bases with unlimited scrolling and try to understand them
    Please login or register to view links or downloads!
     

Share This Page