karlis Posted April 14, 2010 Share Posted April 14, 2010 First of all i think its important to understand the distinction between designing the gui and actually running the gui. The editor will allow you to design the gui but will not actually implement it in a script. For that, you will need to copy the code for the gui you made (from guieditor_output) into a clientside resource .lua file, then start that resource on your server. Once you have the gui running in-game, you can use the "Load GUI" option in the gui editor to continue editing it if you want toI suggest you take a look at the gui tutorials on the wiki (starting here with a general scripting tutorial, then onto some gui tutorials for some more in depth guidance on scripting gui okay that makes pefect sense. so far what ive learned is i need a meta.xml to load the lua. so far so good, but how should i code the lua so that when it loads as a resourse, it will pop open when i press F6 for example? Edit: i loaded a gui from a help resurce i downloaded from my clan's server. i managed to load it up right, but after ive made a few edits, i see no option for outputting the code... now how do i save this? its very unclear to me =(. i suggest you to move to scripting section, and describe problem there Link to comment
TheDeftGamer Posted April 14, 2010 Share Posted April 14, 2010 First of all i think its important to understand the distinction between designing the gui and actually running the gui. The editor will allow you to design the gui but will not actually implement it in a script. For that, you will need to copy the code for the gui you made (from guieditor_output) into a clientside resource .lua file, then start that resource on your server. Once you have the gui running in-game, you can use the "Load GUI" option in the gui editor to continue editing it if you want toI suggest you take a look at the gui tutorials on the wiki (starting here with a general scripting tutorial, then onto some gui tutorials for some more in depth guidance on scripting gui i loaded a gui from a help resurce i downloaded from my clan's server. i managed to load it up right, but after ive made a few edits, i see no option for outputting the code... now how do i save this? its very unclear to me =(. i suggest you to move to scripting section, and describe problem there Link to comment
TheDeftGamer Posted April 14, 2010 Share Posted April 14, 2010 okay but why wont "guieditor" let me output the code after i used to loadgui command? i tried using /guioutput but the txt file only makes a 1-line of text iin the txt file that is no where long enough to program an entire gui =( Link to comment
Remp Posted April 15, 2010 Author Share Posted April 15, 2010 It should do, can you tell me the exact steps you are using? make sure when you use the "Load GUI" option you click on the element at the top of the tree (so the element that all the others are attached to, usually a window) Link to comment
TheDeftGamer Posted April 15, 2010 Share Posted April 15, 2010 It should do, can you tell me the exact steps you are using?make sure when you use the "Load GUI" option you click on the element at the top of the tree (so the element that all the others are attached to, usually a window) Its loading the gui i pick just fine. I can alter the gui and add elements like buttons and labels etc... the problem is i cant output the code anywhere. If i start from scrach with a gui and i right click off of that window i get the option to output the code. But i just dont get that option with a gui i loaded with loadgui. If i do print date: it just tells me: (in console) ----------- Relative ----------- x: 0.0000 y: 0.0000 width: 1.0000 height: 1.0000 ----------- Absolute ----------- x: 0.0000 y: 0.0000 width: 1280.0000 height: 960.0000 so i tried using /guioutput but that isnt working right, it only outputs one line of text: Succesfully saved to GUIEditor_output.txt with absolute screen and absolute children. but what the GUIEditor_output.txt has in it is only: --- --- --- --- --- do you understand what i mean, im having the problem of loading... saving....loading... saving.... after a loaded gui is loaded i cant save it again. i just dont have the right clik menu option. Link to comment
Remp Posted April 15, 2010 Author Share Posted April 15, 2010 The options to output code ('Print code' / 'Output code') are always there, just right click on any empty part of the screen Are you sure you are actually loading it? (right click on the screen -> select 'Load GUI' -> left click on the gui you want to load) Does it output a message in the chat saying that it has successfully loaded? the only reasons it would output nothing into guieditor_output.txt are either you havent actually loaded anything, or it has tried to load it and errored somewhere along the way are there any errors in debugscript? (/debugscript 3) Link to comment
TheDeftGamer Posted April 16, 2010 Share Posted April 16, 2010 The options to output code ('Print code' / 'Output code') are always there, just right click on any empty part of the screenAre you sure you are actually loading it? (right click on the screen -> select 'Load GUI' -> left click on the gui you want to load) Does it output a message in the chat saying that it has successfully loaded? the only reasons it would output nothing into guieditor_output.txt are either you havent actually loaded anything, or it has tried to load it and errored somewhere along the way are there any errors in debugscript? (/debugscript 3) Im sorry im bugging you, i think i should take a step back and start from scratch. i'm obviously the one doing something wrong. I will learn the basics of scripting the gui and everything and then learn how to use your program to steamline the process once i get to that level. my own noobish desire asks for 2 things in a future update to help us noobies. 1. auto output as a lua file. 2. a setting allowing you to load a gui by file name. 3. a setting to allow the window to be opened by keypress which would also be saved in the lua, like commandhandler etc. i dunno. but i am sorry to bug you with my problems when i dont even have enough knowledge to use this yet. If anyone can help btw, i started a thread asking for some help here: https://forum.multitheftauto.com/viewtopic.php?f=91&t=27332&p=308165#p308165 Link to comment
Remp Posted April 17, 2010 Author Share Posted April 17, 2010 ideally the editor should be usable by anyone, so any problems you have with it are good to know about 1: outputting a full lua file could definitely be done 2: it might be possible to load the gui in via resource name, im not sure, i will have to look into it 3: this is something ive thought about a lot, but ive never been able to come up with a powerful/flexible way of doing it through the game. i think this sort of thing is just better suited to manual coding Link to comment
Taalasmaa Posted April 22, 2010 Share Posted April 22, 2010 This is awesome resource.. More than awesome Link to comment
Remp Posted May 2, 2010 Author Share Posted May 2, 2010 Uploaded version 2.4.0 Based on some of the recent feedback: - Various misc fixes - Added the ability to load guieditor_output.txt directly. This will attempt to load the raw code back into the editor (which will also, unlike when using 'Load GUI', try and maintain variable names and misc settings) making it easier to just save and come back later - Added ability to generate basic onClientResourceStart() lua code with your GUI - Added Undo/Redo functions (not every function of the editor can be undone, but most things relating to position/size and visual appearance can be) - Added 'Share' allowing you to individually share the GUI you are working on with other people on the server by taking a 'snapshot' of your GUI and sending it to them (note the gridlist highlight colours only work in mta 1.0.4 and above) Link to comment
karlis Posted May 2, 2010 Share Posted May 2, 2010 make sure dxDrawImageSection() is ready for 1.0.4 , but ncie work! Link to comment
djlobo Posted May 3, 2010 Share Posted May 3, 2010 Excellent work, the "Share" idea and the concept is completly awesome, opens you many possibilities while building your own gui and sharing with others, no more screenshot previews, just go ingame and see that user View ( he must to share with you ofc. ). Link to comment
[M2S]moe Posted May 16, 2010 Share Posted May 16, 2010 Any chance you will add textlib integration in the future? Link to comment
Remp Posted May 17, 2010 Author Share Posted May 17, 2010 integration how? outputting textlib styled code? might be nice if textlib was expanded to include some more dx items as well Link to comment
Xierra Posted May 19, 2010 Share Posted May 19, 2010 Sweet!! Thanks very very much R3mp, making GUI has never been easier without this! I sucessfully made a real time script with DX text & rectangles! Anyway, Moe has been using guieditor all along with his AAD I think. Link to comment
darkdreamingdan Posted May 22, 2010 Share Posted May 22, 2010 integration how? outputting textlib styled code?might be nice if textlib was expanded to include some more dx items as well I also made a textlib "spinoff", called imagelib which is used in the killmessages resource. It's not as useful as textlib which adds a couple of useful features like text styling, but it's main function is to just objectify images. I'm not sure anything else would require a library. Link to comment
izstas Posted August 30, 2010 Share Posted August 30, 2010 Community is down now, please make a download mirror Link to comment
Remp Posted August 30, 2010 Author Share Posted August 30, 2010 http://remp.sparksptpm.co.uk/mta/GUIEditor.zip Link to comment
Fabio(GNR) Posted September 8, 2010 Share Posted September 8, 2010 http://remp.sparksptpm.co.uk/mta/GUIEditor.zip Thanks its easy to create the GUI, but then i gotta script myself hahah Thought that was possible with this but still Thanks! it works great for GUI! Link to comment
Xierra Posted September 8, 2010 Share Posted September 8, 2010 Me too, I should thank r3mp for all of his job, leading to the making of my alternate_hud. (This HUD would be reuploaded soon) Link to comment
Impereal Posted January 11, 2011 Share Posted January 11, 2011 And how to save the gui window can be? Advice please! Link to comment
Castillo Posted January 11, 2011 Share Posted January 11, 2011 what do you mean? if you want to get the code of your GUI elements then click "Output code" and a .TXT file will be created at guieditor's folder. Link to comment
Impereal Posted January 11, 2011 Share Posted January 11, 2011 Yes, I meant it! Thank you very much! Link to comment
MaddDogg Posted January 13, 2011 Share Posted January 13, 2011 First of all, great script and very handy! Good job! But I found several bugs, which i would like to report; here are some of them (also some trivial feature requests): - The "Created: " lines in GUIEditor_output.txt have a little "bug" at the date. The month value of getRealTime() is always between 0-11, but since you would normally expect it to be 1-12, you should add +1 to it, so that it doesn't say 13.00.2011 for today's date. Respective line would be in guieditor_s.lua, line 21. - Any image, which is created, when loading code from the output file, is the mtalogo.png. I don't know, if it's a bug or deliberately done like this for debug reasons and forgotten about, but the respective line is found at load_gui_c.lua, line 259. - When wanting to create an image by using "Create image" from the context menu, sometimes just nothing happens, when you try to drag the area for the image after selecting the source image. I don't know, why and when it won't work from time to time, but just mentioning it. - When changing the title of a with dxDrawText created text, the old text isn't shown in the editbox, where you enter the new title, as it is when editing guiCreateLabel titles. Maybe this feature is just missing because you can't really retrieve the text from a drawn text like you could with guiGetText(), but you could save the titles in a table. - You should really add the possibility to create scrollbars and scrollpanes, since it's a pain in the butt to create them manually. And with 1.1, there are also the comboboxes, to which it would be great, if you could add support for them, too. - The horizontal and vertical alignment is not restored for the first dxDrawText to load, when loading code from the output file. If you have 2 dxDrawText lines to restore, just the first one won't have the correct alignment. - I don't know if it's possible to do, but you could add the feature to change the item text for gridlist rows, but this might not be easy to do, since it seems that when you click a row, the clicked item is actually just the gridlist itself. I found some more bugs, which I can't recall anymore, also the share feature seems to be quite buggy still (especially for the other one viewing your gui), but I hope you find this helpful and good job again! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now