Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- writeMenu()
- {
- (isDefined(self.menu["sub"]))
- {
- (self.menu["animateMenu"])
- {
- self.menu["UI"]["Title"] thread hudMoveY(self.menu["UI"]["Title"].y-100,.3);
- self.menu["UI"]["Status"] thread hudMoveY(self.menu["UI"]["Status"].y+100,.3);
- self.menu["UI"]["Background"] thread hudScaleOverTime(.3,self.menu["width"]-18,225);
- self.menu["OPT"]["Title"] = self createText(self.menu["TitleFont"],self.menu["Title & Status_Fontscale"],self.menu["Title_Alignment"],"LEFT",self.menu["UI"]["Title"].x+self.menu["title_x"],self.menu["UI"]["Title"].y,10,0,self.menu["main"]["title"],self.menu["Title & Status_Color"]);
- self.menu["OPT"]["Status"] = self createText(self.menu["TitleFont"],self.menu["Title & Status_Fontscale"],self.menu["Title_Alignment"],"LEFT",self.menu["OPT"]["Title"].x,self.menu["UI"]["Status"].y,10,0,"Status: ^2"+self.menu["Status"],self.menu["Title & Status_Color"]);
- self.menu["OPT"]["Title"] setText(level.patch);
- self thread KRDR(self.menu["KRDR_Color"],self.menu["OPT"]["Title"],level.patch);
- for(a=0;a<5;a++)
- {
- number = revaluePointer(self.menu[self getCurrentMenu()+"_POINTER"]-2+a);
- if(!isDefined(self buildFromMenu()["main"]["option"][number])) continue;
- self.menu["UI"][number] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x+5,self.menu["positioning_Y"],self.menu["width"]-23,20,self.menu["Tab_Color"],self.menu["Tab_Shader"],4,self.menu["Tab_Alpha"]);
- self.menu["OPT"][number] = self createText(self.menu["MenuFont"],self.menu["Menu_Fontscale"],self.menu["Menu_Alignment"],"LEFT",self.menu["UI"]["Background"].x+self.menu["x"],self.menu["positioning_Y"],5,1,self buildFromMenu()[self getCurrentMenu()]["option"][number],self.menu["Menu_Color"]);
- if(a == 2) continue;
- self.menu["UI"][number] thread hudMoveY(self.menu["positioning_Y"]-70+35*a,.3);
- self.menu["OPT"][number] thread hudMoveY(self.menu["UI"][number].y,.3);
- }
- self.menu["UI"]["Scroller"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x+self.menu["width"]-20,self.menu["positioning_Y"],2,1,self.menu["Scroller_Color"],self.menu["Scroller_Shader"],5,1);
- self.menu["UI"]["Scroller"] thread hudScaleOverTime(.3,2,20);
- wait .25;
- self.menu["OPT"]["Title"] thread hudFade(self.menu["Title & Status_Alpha"],.4);
- self.menu["OPT"]["Status"] thread hudFade(self.menu["Title & Status_Alpha"],.4);
- }
- else
- {
- self.menu["UI"]["Title"] thread hudMoveY(self.menu["UI"]["Title"].y-101,.4);
- self.menu["UI"]["Status"] thread hudMoveY(self.menu["UI"]["Status"].y+101,.4);
- wait .45;
- self.menu["UI"]["Edging"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Title"].x-0,self.menu["positioning_Y"],1,236,self.menu["Edging_Color"],self.menu["Edging_Shader"],-10,self.menu["Edging_Alpha"]);
- self.menu["UI"]["Edging"] thread hudScaleOverTime(.4,self.menu["width"]+2,236); wait .2;
- self.menu["UI"]["Background"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Title"].x,self.menu["positioning_Y"],1,173,self.menu["Background_Color"],self.menu["Background_Shader"],5,self.menu["Background_Alpha"]);
- wait .25;
- self.menu["UI"]["Background"] thread hudScaleOverTime(.4,self.menu["width"],173); wait .4;
- self.menu["OPT"]["Title"] = self createText(self.menu["TitleFont"],self.menu["Title & Status_Fontscale"],self.menu["Title_Alignment"],"LEFT",self.menu["UI"]["Title"].x-80,self.menu["UI"]["Title"].y,10,0,self.menu["main"]["title"],self.menu["Title & Status_Color"]);
- self.menu["OPT"]["Status"] = self createText(self.menu["TitleFont"],self.menu["Title & Status_Fontscale"],self.menu["Title_Alignment"],"LEFT",self.menu["OPT"]["Title"].x,self.menu["UI"]["Status"].y,10,0,"Status: ^2"+self.menu["Status"],self.menu["Title & Status_Color"]);
- self.menu["OPT"]["Title"] thread hudFade(self.menu["Title & Status_Alpha"],.15);
- self.menu["OPT"]["Status"] thread hudFade(self.menu["Title & Status_Alpha"],.15);
- self.menu["OPT"]["Title"] thread hudMoveX(self.menu["UI"]["Title"].x+self.menu["title_x"],.5);
- self.menu["OPT"]["Status"] thread hudMoveX(self.menu["UI"]["Title"].x+self.menu["title_x"],.5);
- wait .15;
- self.menu["UI"]["Scroller"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x,self.menu["positioning_Y"],2,1,self.menu["Scroller_Color"],self.menu["Scroller_Shader"],6,self.menu["Scroller_Alpha"]);
- self.menu["UI"]["Scroller"] thread hudScaleOverTime(.4,2,30);
- self thread drawText(self.menu["UI"]["Background"].x,0,true);
- wait .15;
- }
- }
- else
- self drawText(self.menu["UI"]["Background"].x,0);
- }
- createFullMenu()
- {
- if(self.menu["animateMenu"])
- {
- self.menu["UI"]["Title"] = self createRectangle("LEFT","LEFT",self.menu["safeArea_X"],self.menu["positioning_Y"]-100,self.menu["width"],25,self.menu["Banner_Color"],self.menu["Banner_Shader"],8,self.menu["Banner_Alpha"]);
- self.menu["UI"]["Status"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Title"].x,self.menu["positioning_Y"]+100,self.menu["width"],25,self.menu["Banner_Color"],self.menu["Banner_Shader"],8,self.menu["Banner_Alpha"]);
- self.menu["UI"]["Background"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Title"].x+9,self.menu["positioning_Y"],self.menu["width"]-18,225,self.menu["Background_Color"],self.menu["Background_Shader"],2,self.menu["Background_Alpha"]);
- }
- else
- {
- self.menu["UI"]["Title"] = self createRectangle("LEFT","LEFT",self.menu["safeArea_X"],self.menu["positioning_Y"]-101,self.menu["width"],30,self.menu["Banner_Color"],self.menu["Banner_Shader"],8,self.menu["Banner_Alpha"]);
- self.menu["UI"]["Status"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Title"].x,self.menu["positioning_Y"]+101,self.menu["width"],30,self.menu["Banner_Color"],self.menu["Banner_Shader"],8,self.menu["Banner_Alpha"]);
- self.menu["UI"]["Edging"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Title"].x-0,self.menu["positioning_Y"],self.menu["width"]+2,236,self.menu["Edging_Color"],self.menu["Edging_Shader"],-10,self.menu["Edging_Alpha"]);
- self.menu["UI"]["Background"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Title"].x,self.menu["positioning_Y"],self.menu["width"],173,self.menu["Background_Color"],self.menu["Background_Shader"],5,self.menu["Background_Alpha"]);
- }
- self.menu["OPT"]["Title"] = self createText(self.menu["TitleFont"],self.menu["Title & Status_Fontscale"],self.menu["Title_Alignment"],"LEFT",self.menu["UI"]["Title"].x+self.menu["title_x"],self.menu["UI"]["Title"].y,10,self.menu["Title & Status_Alpha"],self.menu["main"]["title"],self.menu["Title & Status_Color"]);
- self.menu["OPT"]["Status"] = self createText(self.menu["TitleFont"],self.menu["Title & Status_Fontscale"],self.menu["Title_Alignment"],"LEFT",self.menu["OPT"]["Title"].x,self.menu["UI"]["Status"].y,10,self.menu["Title & Status_Alpha"],"Status: ^2"+self.menu["Status"],self.menu["Title & Status_Color"]);
- if(self.menu["animateMenu"])
- {
- self.menu["OPT"]["Title"] setText(level.patch);
- self thread KRDR(self.menu["KRDR_Color"],self.menu["OPT"]["Title"],level.patch);
- for(a=0;a<5;a++)
- {
- number = revaluePointer(self.menu[self getCurrentMenu()+"_POINTER"]-2+a);
- self.menu["UI"][number] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x+5,self.menu["positioning_Y"]-70+35*a,self.menu["width"]-23,20,self.menu["Tab_Color"],self.menu["Tab_Shader"],4,self.menu["Tab_Alpha"]);
- self.menu["OPT"][number] = self createText(self.menu["MenuFont"],self.menu["Menu_Fontscale"],self.menu["Menu_Alignment"],"LEFT",self.menu["UI"]["Background"].x+self.menu["x"],self.menu["UI"][number].y,5,1,self buildFromMenu()[self getCurrentMenu()]["option"][number],self.menu["Menu_Color"]);
- }
- }
- if(!self.menu["animateMenu"])
- self.menu["UI"]["Scroller"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x,self.menu["positioning_Y"],2,30,self.menu["Scroller_Color"],self.menu["Scroller_Shader"],6,self.menu["Scroller_Alpha"]);
- else
- self.menu["UI"]["Scroller"] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x+self.menu["width"]-20,self.menu["positioning_Y"],2,20,self.menu["Scroller_Color"],self.menu["Scroller_Shader"],5,1);
- if(!self.menu["animateMenu"])
- {
- self thread drawText(self.menu["UI"]["Background"].x,self.menu["Menu_Alpha"]);
- wait .15;
- }
- }
- newOpen(menu)
- {
- self.menu["DISABLE_MENU_CONTROLS"] = true;
- if(!isDefined(self.menu["sub"]))
- {
- self thread continueKRDR();
- self.menu["UI"]["Title"] thread hudMoveX(self.menu["UI"]["Title"].x+(self.menu["width"]-3),.3);
- self.menu["UI"]["Status"] thread hudMoveX(self.menu["UI"]["Title"].x,.3);
- self.menu["OPT"]["Title"] thread hudMoveX(self.menu["OPT"]["Title"].x+(self.menu["width"]-3),.3);
- self.menu["OPT"]["Status"] thread hudMoveX(self.menu["OPT"]["Title"].x,.3);
- self scrollPreLoads(100,75,4,3);
- self.menu["UI"]["Background"] thread hudScaleOverTime(.3,self.menu["width"]-18,20);
- for(a=0;a<self buildFromMenu()[self getCurrentMenu()]["option"].size;a++)
- {
- if(a == self revaluePointer(self getPointer())) continue;
- self.menu["UI"][a] thread hudMoveY(self.menu["positioning_Y"],.3);
- self.menu["OPT"][a] thread hudMoveY(self.menu["UI"][a].y,.3);
- self.menu["UI"][a] thread hudFadenDestroy(self.menu["UI"][a].y,1);
- self.menu["OPT"][a] thread hudFadenDestroy(self.menu["UI"][a].y,.3);
- }
- self.menu["UI"]["Tab"] = self.menu["UI"][self revaluePointer(self getPointer())];
- self.menu["OPT"][self revaluePointer(self getPointer())] destroy();
- self setCurrentMenu(menu);
- self.menu["TITLE"] = self createText(self.menu["MenuFont"],self.menu["Menu_Fontscale"],"CENTER","LEFT",self.menu["UI"]["Background"].x+((self.menu["width"]-18)/2),self.menu["positioning_Y"],5,self.menu["Menu_Alpha"],self buildFromMenu()[self getCurrentMenu()]["title"],self.menu["Menu_Color"]);
- self.menu["UI"]["Scroller"] thread hudFade(self.menu["Scroller_Alpha"],1);
- self.menu["UI"]["Scroller"] thread hudMoveX(self.menu["UI"]["Background"].x+self.menu["width"]-12,.2); wait .2;
- self.menu["UI"]["Scroller"] thread hudScaleOverTime(.3,2,180); wait .34;
- self.menu["UI"]["Scroller"] thread hudScaleOverTime(.3,self.menu["width"],180); wait .3;
- self.menu["sub"] = true;
- self writeMenu(); wait .1;
- }
- else
- {
- self scrollPreLoads(102,70,3,2,true);
- self thread destroyMenu();
- self.menu["UI"]["Scroller"] thread hudFade(1,1);
- self.menu["UI"]["Scroller"] thread hudScaleOverTime(.3,2,180); wait .34;
- self.menu["UI"]["Scroller"] thread hudScaleOverTime(.3,2,20); wait .2;//.3
- //self.menu["UI"]["Scroller"] thread hudMoveX(self.menu["UI"]["Background"].x+127,.2);
- self thread continueKRDR();
- self.menu["UI"]["Title"] thread hudMoveX(self.menu["UI"]["Title"].x-(self.menu["width"]-3),.3);
- self.menu["UI"]["Status"] thread hudMoveX(self.menu["UI"]["Title"].x,.3);
- self.menu["OPT"]["Title"] thread hudMoveX(self.menu["OPT"]["Title"].x-(self.menu["width"]-3),.3);
- self.menu["OPT"]["Status"] thread hudMoveX(self.menu["OPT"]["Title"].x,.3);
- self setCurrentMenu(menu);//Needed for revaluePointer() function
- self.menu["UI"]["Background"] thread hudScaleOverTime(.3,self.menu["width"]-18,173);
- for(a=0;a<5;a++)
- {
- number = revaluePointer(self.menu["main_POINTER"]-2+a);
- if(a == 2 || !isDefined(self buildFromMenu()["main"]["option"][number])) continue;
- self.menu["UI"][number] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x+5,self.menu["positioning_Y"],self.menu["width"]-23,20,self.menu["Tab_Color"],self.menu["Tab_Shader"],4,self.menu["Tab_Alpha"]);
- self.menu["OPT"][number] = self createText(self.menu["MenuFont"],self.menu["Menu_Fontscale"],self.menu["Menu_Alignment"],"LEFT",self.menu["UI"]["Background"].x+self.menu["x"],self.menu["positioning_Y"],5,0,self buildFromMenu()["main"]["option"][number],self.menu["Menu_Color"]);
- self.menu["OPT"][number] thread hudFade(self.menu["Menu_Alpha"],.3);
- self.menu["UI"][number] thread hudMoveY(self.menu["positioning_Y"]-70+35*a,.3);
- self.menu["OPT"][number] thread hudMoveY(self.menu["UI"][number].y,.3);
- }
- self.menu["TITLE"] destroy();
- self.menu["UI"][self revaluePointer(self getPointer())] = self.menu["UI"]["Tab"];
- self.menu["OPT"][self revaluePointer(self getPointer())] = self createText(self.menu["MenuFont"],self.menu["Menu_Fontscale"],self.menu["Menu_Alignment"],"LEFT",self.menu["UI"]["Background"].x+self.menu["x"],self.menu["positioning_Y"],5,self.menu["Menu_Alpha"],self buildFromMenu()[self getCurrentMenu()]["option"][self revaluePointer(self getPointer())],self.menu["Menu_Color"]);
- self.menu["sub"] = undefined; wait .1;
- self.menu["UI"]["Scroller"] thread hudMoveX(self.menu["UI"]["Background"].x+(self.menu["width"]-20),.2); wait .1;
- }
- self.menu["DISABLE_MENU_CONTROLS"] = undefined;
- }
- //USED FOR WHEN A PLAYER CHANGES ANOTHER STATUS (AND THEY ARE INSIDE OF THE ANIMATED MENU DESIGN)
- animatedMenuRefresh()
- {
- for(a=0;a<18;a++)
- {
- self.menu["UI"][a] destroy();
- self.menu["OPT"][a] destroy();
- }
- for(a=0;a<5;a++)
- {
- number = revaluePointer(self.menu["main_POINTER"]-2+a);
- if(!isDefined(self buildFromMenu()["main"]["option"][number])) continue;
- self.menu["UI"][number] = self createRectangle("LEFT","LEFT",self.menu["UI"]["Background"].x+5,self.menu["positioning_Y"]-70+35*a,self.menu["width"]-23,20,self.menu["Tab_Color"],self.menu["Tab_Shader"],4,self.menu["Tab_Alpha"]);
- self.menu["OPT"][number] = self createText(self.menu["MenuFont"],self.menu["Menu_Fontscale"],self.menu["Menu_Alignment"],"LEFT",self.menu["UI"]["Background"].x+self.menu["x"],self.menu["UI"][number].y,5,self.menu["Menu_Alpha"],self buildFromMenu()["main"]["option"][number],self.menu["Menu_Color"]);
- }
- }
- exitMenu()
- {
- self thread forgeExit();
- if(!self inMenu()) return;
- self notify("menuExit");
- if(!self.menu["hideMenu"])
- {
- if(self.menu["animateMenu"])
- {
- self.menu["UI"]["Background"] thread hudScaleOverTime(.3,self.menu["width"]-18,20);
- self.menu["UI"]["Scroller"] thread hudScaleOverTime(.3,2,1);
- self thread continueKRDR();
- self.menu["UI"]["Title"] thread hudMoveY(self.menu["positioning_Y"],.3);
- self.menu["UI"]["Status"] thread hudMoveY(self.menu["positioning_Y"],.3);
- self.menu["OPT"]["Title"] thread hudMoveY(self.menu["positioning_Y"],.3);
- self.menu["OPT"]["Status"] thread hudMoveY(self.menu["positioning_Y"],.3);
- self.menu["OPT"]["Title"] thread hudFadenDestroy(0,.4);
- self.menu["OPT"]["Status"] thread hudFadenDestroy(0,.4);
- self.menu["OPT"][self getPointer()] thread hudFade(0,.25);
- for(a=0;a<self buildFromMenu()[self getCurrentMenu()]["option"].size;a++)
- {
- if(a == self revaluePointer(self getPointer())) continue;
- self.menu["UI"][a] thread hudMoveY(self.menu["positioning_Y"],.25);
- self.menu["OPT"][a] thread hudMoveY(self.menu["positioning_Y"],.25);
- self.menu["UI"][a] thread hudFadenDestroy(0,1);
- self.menu["OPT"][a] thread hudFadenDestroy(0,.4);
- }
- wait .34;
- }
- else
- {
- self.menu["OPT"]["Title"] thread hudMoveX(self.menu["UI"]["Title"].x-80,.35);
- self.menu["OPT"]["Status"] thread hudMoveX(self.menu["UI"]["Title"].x-80,.35);
- self.menu["OPT"]["Title"] thread hudFadenDestroy(0,.3);
- self.menu["OPT"]["Status"] thread hudFadenDestroy(0,.3);
- for(a=0;a<self buildFromMenu()[self getCurrentMenu()]["option"].size;a++)
- self.menu["OPT"][a] thread hudFadenDestroy(0,.3);
- self.menu["UI"]["Scroller"] thread hudScaleOverTime(.4,2,1);
- self.menu["UI"]["Scroller"] thread destroyAfter(.3);
- wait .35;
- self.menu["UI"]["Background"] thread hudScaleOverTime(.4,1,173);
- self.menu["UI"]["Background"] thread destroyAfter(.45);
- wait .4;
- self.menu["UI"]["Edging"] thread hudScaleOverTime(.4,1,236);
- self.menu["UI"]["Edging"] thread destroyAfter(.45);
- wait .45;
- self.menu["UI"]["Title"] thread hudMoveY(self.menu["positioning_Y"],.4);
- self.menu["UI"]["Status"] thread hudMoveY(self.menu["positioning_Y"],.4);
- wait .5;
- }
- }
- self.menu["IN_MENU"] = undefined;
- self instructions();
- self destroyAll(self.menu["UI"]);
- self destroyAll(self.menu["OPT"]);
- if(self.menu["hideMenu"]) wait .25;
- self thread startMenu();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement