[Release] Anik's GUI Editor

Started by Anik, May 01, 2017, 07:44 AM

Previous topic - Next topic

Anik

► Fixed AddChild bug.
► Fixed the game crash while adding child.

Thanks to @zeus for pointing out the bug.

Anik

Quote from: sseebbyy on May 02, 2017, 06:54 PMSounds too good to be true. :D
Wish you the best ! I like your motivation.
Thanks mate.

EK.IceFlake

Did you seriously make a publicly released script _memed? You're just encouraging people to be selfish and keep their client scripts to themselves and their players PCs but not the players themselves. Despite the fact that the players own their PCs and whatsoever is on it.

Anik

Quote from: EK.IceFlake on May 14, 2017, 01:23 PMDid you seriously make a publicly released script _memed? You're just encouraging people to be selfish and keep their client scripts to themselves and their players PCs but not the players themselves. Despite the fact that the players own their PCs and whatsoever is on it.
The _mem was added when I was making it. I forgot to remove the _mem when released it. Thanks for pointing out. Will be removed on next update

luchgox

Hey Anik,
              I'm very pleased to your this GUI Editor.I like to suggest you a idea.

-How about,If color mode should be changed from "Page up and down" to a cmd ("/changecolour (R/G/B)"). Because I'm tired to tap tap the page up and down button.Suppose if people want to paste their own colour (according rgb) they can do easily (/changecolour 124 155 100)?.

I hope you understand me
Strength does not come from wining.Your struggles develop your strengths.

Anik

Quote from: luchgox on Jun 19, 2017, 03:05 PMHey Anik,
              I'm very pleased to your this GUI Editor.I like to suggest you a idea.

-How about,If color mode should be changed from "Page up and down" to a cmd ("/changecolour (R/G/B)"). Because I'm tired to tap tap the page up and down button.Suppose if people want to paste their own colour (according rgb) they can do easily (/changecolour 124 155 100)?.

I hope you understand me
Thanks for your suggestion. Will be added in future update.

longhackmc

How to use / addchild
Give me an example
tks

Anik


longhackmc


Anik

Quote from: longhackmc on Jul 04, 2017, 03:05 PMand Element list, where it?
Uhh!! Watch the video. By the way, you can use /elements in game to get a list of all elements.

MEGAMIND

Quote from: longhackmc on Jul 04, 2017, 03:05 PM
Quote from: Anik on Jul 04, 2017, 01:49 PM
Quote from: longhackmc on Jul 04, 2017, 12:59 PMHow to use / addchild
Give me an example
tks
Watch the video
and Element list, where it?

doesnt works game crashes when using /elements

EnForcer

Sorry for Bumping topic but some players will complain that they add button after exporting script they got GUIWindow instead of GUI Button

Mistake :
else if ( element == "GUIButton" ) scriptdata += ""+CurrentProject+"."+name+" = GUIWindow( VectorScreen( sX * "+x+", sY * "+y+" ), VectorScreen( sX * "+SizeX+", sY * "+SizeY+" ), Colour( "+colour[0]+", "+colour[1]+", "+colour[2]+" ), \""+txt+"\" );\r\n"+CurrentProject+"."+name+".TextColour = Colour( "+txtcolour[0]+", "+txtcolour[1]+", "+txtcolour[2]+" );\r\n"+CurrentProject+"."+name+".FontSize = "+fontsize+";\r\n\r\n";
Just Change "GUIWindow" to "GUIButton"
Fixed Code Given below:

else if( cmd == "exportproject" )
{
if( CurrentProject != "" )
{
if( ElementCreated == 0 )
{
QuerySQL( Projects, "DROP TABLE " + CurrentProject.tolower() + "" );
CurrentProject = "";
return MessagePlayer( "[#ffffff][PROJECT]: [#00CC00]The project has been [#ffffff]closed & deleted [#00CC00]as no elements were created.", player );
}

SendDataToClient( null, 7, "" );
SendDataToClient( null, 1, "" );
local arraydata = "/* \r\n\t Code Generated Using Anik's GUI Editor\r\n https://www.youtube.com/watch?v=g2W-ueXB7is \r\n*/\r\nsX <- GUI.GetScreenSize().X;\r\nsY <- GUI.GetScreenSize().Y;\n\r\n"+CurrentProject+" <-\r\n{",
scriptdata = "",
childdata = "",
q = QuerySQL( Projects, "SELECT * FROM "+CurrentProject.tolower() );
while( GetSQLColumnData( q, 0 ) )
{
local element = GetSQLColumnData( q, 1 ), name = GetSQLColumnData( q, 2 ), x = GetSQLColumnData( q, 3 ), y = GetSQLColumnData( q, 4 ), SizeX = GetSQLColumnData( q, 5 ), SizeY = GetSQLColumnData( q, 6 ), childof = GetSQLColumnData( q, 7 ), txt = GetSQLColumnData( q, 8 ), fontsize = GetSQLColumnData( q, 9 ), colour = split( GetSQLColumnData( q, 10 ), "," ), txtcolour = split( GetSQLColumnData( q, 11 ), "," );
arraydata += "\r\n "+name+" = null";
if( element == "GUILabel" ) scriptdata += ""+CurrentProject+"."+name+" = GUILabel( VectorScreen( sX * "+x+", sY * "+y+" ), Colour( "+colour[0]+", "+colour[1]+", "+colour[2]+" ), \""+txt+"\" );\r\n"+CurrentProject+"."+name+".FontSize = "+fontsize+";\r\n\r\n";
else if ( element == "GUIWindow" ) scriptdata += ""+CurrentProject+"."+name+" = GUIWindow( VectorScreen( sX * "+x+", sY * "+y+" ), VectorScreen( sX * "+SizeX+", sY * "+SizeY+" ), Colour( "+colour[0]+", "+colour[1]+", "+colour[2]+" ), \""+txt+"\" );\r\n"+CurrentProject+"."+name+".TextColour = Colour( "+txtcolour[0]+", "+txtcolour[1]+", "+txtcolour[2]+" );\r\n"+CurrentProject+"."+name+".FontSize = "+fontsize+";\r\n\r\n";
else if ( element == "GUIButton" ) scriptdata += ""+CurrentProject+"."+name+" = GUIButton( VectorScreen( sX * "+x+", sY * "+y+" ), VectorScreen( sX * "+SizeX+", sY * "+SizeY+" ), Colour( "+colour[0]+", "+colour[1]+", "+colour[2]+" ), \""+txt+"\" );\r\n"+CurrentProject+"."+name+".TextColour = Colour( "+txtcolour[0]+", "+txtcolour[1]+", "+txtcolour[2]+" );\r\n"+CurrentProject+"."+name+".FontSize = "+fontsize+";\r\n\r\n";
if( childof != "none" ) childdata += ""+CurrentProject+"."+childof+".AddChild( "+CurrentProject+"."+name+" );\r\n";
GetSQLNextRow( q );
}
arraydata += "\r\n}\r\n\n\n"+scriptdata+"\r\n\n"+childdata;

exportMapToFile( CurrentProject, arraydata );
CurrentProject = "";
ElementCreated = 0;

Message( "[#00CC00][PROJECT]: [#ffffff]" + player.Name + " has exported the project!" );
FreeSQLQuery( q );
}
}