GSC [Release] Illusion V1 Colour Editor!

[nobody@CCM:]

Member
Messages
95
Reaction score
86
Points
18
Hello cabconmodding I just thought to release my Illusion V1 colour editor on this site to try and help the site grow a little more :grinning: enjoy.

89bffdd481d660dca2b02a16b5531bbe.png

This function is for what huds you want to change, change "self.menu["ui"]["barTop"]" to one of the huds you are using.
EditTopPanel()
{
self thread colorEditor(self.menu["ui"]["barTop"]);
}

This is the actual function that allows you too change the colour of your hud etc.
colorEditor(hud)
{
self endon("disconnect");
self endon("death");
self EnableInvulnerability();
//Menu Close Function Here :grinning:
wait 0.3;
self freezecontrols(true);
self setBlur(4, .4);
self setClientUiVisibilityFlag("hud_visible", 0);
menu = [];
menu["bg"] = self CreateShaderDesign("CENTER", "CENTER", 0, -185, 250, 105, (0,0,0), "white", 1, (1/1.7));
posX = strTok("-15;0;15;-15;0;15;-15;0;15", ";");
posY = strTok("-200;-200;-200;-185;-185;-185;-170;-170;-170", ";");
menu["box"] = [];
for(m = 0; m < 9; m++)
menu["box"][m] = self CreateShaderDesign("CENTER", "CENTER", int(posX[m]), int(posY[m]), 10, 10, (randomInt(255)/255, randomInt(255)/255, randomInt(255)/255), "white", 3, 1);
menu["scroller"] = self CreateShaderDesign("CENTER", "CENTER", menu["box"][0].x, menu["box"][0].y, 16, 16, (1, 1, 1), "white", 2, 1);
self.instruct = CreateTextString("default",1.5,"CENTER","CENTER",0,0,1,5,"Press [{+attack}]/[{+speed_throw}] To Switch Color\nPress [{+activate}] To Select\nPress [{+melee}] To Cancel\n\n\n^5Illusion V1 By Extinct^7");
menu["curs"] = 0;
colour = (0,0,0);
wait .4;
for(;:wink:
{
if(self attackButtonPressed() || self adsButtonPressed())
{
menu["curs"]+= self attackButtonPressed();
menu["curs"]-= self adsButtonPressed();
if(menu["curs"] > menu["box"].size-1) menu["curs"] = 0;
if(menu["curs"] < 0) menu["curs"] = menu["box"].size-1;
menu["scroller"] setPoint("CENTER", "CENTER", menu["box"][menu["curs"]].x, menu["box"][menu["curs"]].y);
wait .2;
}
if(self useButtonPressed())
{
colour = menu["box"][menu["curs"]].color;
if(hud==self.Menu["Shader"]["Curs"]){self.customcolorpickscroller=colour;self.customcolor=true;}
if(hud==self.Menu["Shader"]["backround"]){self.customcolorpickshader=colour;self.customcolorshader=true;}
if(hud==self.Menu["Text"]){self.customtextcolor=true;self.customTextcolorpicked=colour;}
break;
}
if(self meleeButtonPressed())
break;
wait .05;
}
self freezecontrols(false);
self.instruct destroy();
for(m = 0; m < menu["box"].size; m++)
menu["box"][m] destroy();
keys = getArrayKeys(menu);
for(i = 0; i < keys.size; i++)
menu[keys] destroy();
menu["box"][m] destroy();
menu["bg"] destroy();
menu["scroller"] destroy();
self setBlur(0, .4);
self DisableInvulnerability();
self setClientUiVisibilityFlag("hud_visible", 1);
wait .05;
hud.color=colour;
}

Hud and text spawning Functions (I recommend using your own hud and text spawning functions you have in the menu base you are using since I would save up room in your menu and will stop other issues) but either way I will give you mine.
CreateTextString(font,fontscale,align,relative,x,y,alpha,sort,text)
{
CreateText=createFontString(font,fontscale);
CreateText setPoint(align,relative,x,y);
CreateText.alpha=alpha;
CreateText.sort=sort;
CreateText setText(text);
return CreateText;
}
CreateValueString(font,fontscale,align,relative,x,y,alpha,sort,text)
{
self.CreateText=createFontString(font,fontscale);
self.CreateText setPoint(align,relative,x,y);
self.CreateText.alpha=alpha;
self.CreateText.sort=sort;
self.CreateText setValue(text);
return self.CreateText;
}
CreateShaderDesign(Align,Relative,X,Y,Width,Height,Colour,Shader,Sort,Alpha)
{
CShader=newClientHudElem(self);
CShader.children=[];
CShader.elemType="bar";
CShader.sort=Sort;
CShader.color=Colour;
CShader.alpha=Alpha;
CShader setParent(level.uiParent);
CShader setShader(Shader,Width,Height);
CShader setPoint(Align,Relative,X,Y);
return CShader;
}

If you have any questions or you need any help reply to this thread and I will try and get back to you soon as possible.

Thanks
~ Extinct
 
Last edited:
Top