Remp

[REL] GUI Editor 3.1.3

Recommended Posts

9208.png

GUI Editor is a resource designed to allow creation and manipulation of GUI elements in-game, with the ability to generate the corresponding Lua code and output it to a file.

Basic features:

- right click menu based navigation

- tight integration of GUI attributes and their individual right click menus

- creation of all GUI elements (including comboboxes)

- loading of existing GUI into the editor

- Loading of Lua code

- ability to preview what your GUI will look like in any resolution

- ability to use basic Lua code to position your gui elements (ie: to always be in the middle of the screen)

To begin using the GUI Editor, start the resource and press shift + g (or type /guied).

There is an in-game tutorial that can be used to familiarise you with the basic functions of the GUI Editor

For further help, there is also extensive help documentation that can be accessed with the main right click menu

Download: http://community.mtasa.com/index.php?p= ... ils&id=141

The editor requires the ACL permissions: general.ModifyOtherObjects for some functions, and function.callRemote for update checking

Feel free to use/modify any of the code from the GUI Editor for your own projects

Edited by Guest

Share this post


Link to post

9208.png

GUI Editor is a resource designed to allow creation and manipulation of GUI elements in-game, with the ability to generate the corresponding Lua code and output it to a file.

Basic features:

- right click menu based navigation

- tight integration of GUI attributes and their individual right click menus

- creation of all GUI elements (including comboboxes)

- loading of existing GUI into the editor

- Loading of Lua code

- ability to preview what your GUI will look like in any resolution

- ability to use basic Lua code to position your gui elements (ie: to always be in the middle of the screen)

To begin using the GUI Editor, start the resource and press shift + g (or type /guied).

There is an in-game tutorial that can be used to familiarise you with the basic functions of the GUI Editor

For further help, there is also extensive help documentation that can be accessed with the main right click menu

Download: http://community.mtasa.com/index.php?p= ... ils&id=141

The editor requires the ACL permissions: general.ModifyOtherObjects for some functions, and function.callRemote for update checking

Feel free to use/modify any of the code from the GUI Editor for your own projects

Edited by Guest

Share this post


Link to post

Nice, very very nice just test it.

And it works AWESOME really great job, i always want a gui editor (since i play MTA)

Thanks for sharing this with us, it is a very nice script resource.

Cya arround,

Alexander (from the netherlands)

Share this post


Link to post

Nice, very very nice just test it.

And it works AWESOME really great job, i always want a gui editor (since i play MTA)

Thanks for sharing this with us, it is a very nice script resource.

Cya arround,

Alexander (from the netherlands)

Share this post


Link to post

Haven't tried it, but good job. I'll have a play with it when I get a moment. Why not use buttons on screen rather than console commands? Much easier for users :)

Share this post


Link to post

Haven't tried it, but good job. I'll have a play with it when I get a moment. Why not use buttons on screen rather than console commands? Much easier for users :)

Share this post


Link to post

it seems to be, if you set a variable that the window wont be saved anymore.

And in guieditor_s.lua replace it with:

  
--[[ GUI Editor (server) ]]-- 
  
function OutputGUIToFile(text) 
    local file = fileOpen("GUIEditor_output.txt")  
    if not file then 
        file = fileCreate("GUIEditor_output.txt") 
    end 
     
    if file then       
        local size = fileGetSize(file) 
        fileSetPos(file,size) 
        fileWrite(file,"\r\n",text,"\r\n--- --- --- --- ---\r\n") 
        fileClose(file) 
        outputChatBox("Succesfully saved to GUIEditor_output.txt",source) 
    end 
end 
addEvent("OutputGUIToFile",true) 
addEventHandler("OutputGUIToFile",getRootElement(),OutputGUIToFile) 
  

Share this post


Link to post

it seems to be, if you set a variable that the window wont be saved anymore.

And in guieditor_s.lua replace it with:

 --[[ GUI Editor (server) ]]-- function OutputGUIToFile(text)    local file = fileOpen("GUIEditor_output.txt")     if not file then        file = fileCreate("GUIEditor_output.txt")    end        if file then              local size = fileGetSize(file)        fileSetPos(file,size)        fileWrite(file,"\r\n",text,"\r\n--- --- --- --- ---\r\n")        fileClose(file)        outputChatBox("Succesfully saved to GUIEditor_output.txt",source)    endendaddEvent("OutputGUIToFile",true)addEventHandler("OutputGUIToFile",getRootElement(),OutputGUIToFile) 

Share this post


Link to post

eAi: by its very nature a GUI editor would require as much free screen real estate as possible to work with, i just didnt like the idea of already having buttons on the screen getting in the way. i'll add options into the right click menus to output/print the code in the next version

Alexander: ive never had that problem, can you tell me the exact steps to replicate it?

GUIEditor_output.txt is shipped in the package so unless you delete it yourself it should always exist, i'll add that code for the next update though

Share this post


Link to post

eAi: by its very nature a GUI editor would require as much free screen real estate as possible to work with, i just didnt like the idea of already having buttons on the screen getting in the way. i'll add options into the right click menus to output/print the code in the next version

Alexander: ive never had that problem, can you tell me the exact steps to replicate it?

GUIEditor_output.txt is shipped in the package so unless you delete it yourself it should always exist, i'll add that code for the next update though

Share this post


Link to post

The problem exactly:

I was busy with a registration system with three tabs: Agreement, register form, extra information. I've made all the labels, edit boxes and memos and all of that, after that i give everything an variable, and type the commando /guioutput nothing happends then i told the system /guiprint nothing shows up.

And maybe for the next version create a variable: new_line = '\n'. Why, windows doesn't see \n as an new line but \r\n :)

Share this post


Link to post

The problem exactly:

I was busy with a registration system with three tabs: Agreement, register form, extra information. I've made all the labels, edit boxes and memos and all of that, after that i give everything an variable, and type the commando /guioutput nothing happends then i told the system /guiprint nothing shows up.

And maybe for the next version create a variable: new_line = '\n'. Why, windows doesn't see \n as an new line but \r\n :)

Share this post


Link to post

ive been unable to find any reason for setting the variable to cause it to break like that, however i found a (quite large) bug with the deletion code which could have caused what you are describing. Hopefully fixing that will sort out your problem

new version uploaded: http://community.mtasa.com/index.html?p ... ils&id=141

Share this post


Link to post

ive been unable to find any reason for setting the variable to cause it to break like that, however i found a (quite large) bug with the deletion code which could have caused what you are describing. Hopefully fixing that will sort out your problem

new version uploaded: http://community.mtasa.com/index.html?p ... ils&id=141

Share this post


Link to post

Why not use bound keys? Or buttons that appear when you hover over an area of the screen (e.g. move your mouse to the top or bottom). This is commonly done in many programs - showing the menu bar in full screen for example, or showing the taskbar if you have it hidden when putting your cursor at the bottom of the screen. You could also use a key for toggling the buttons on and off (like we do in the editor)... Having a bar that appears when you put your mouse at the edge of the screen only reduces your usable area by 1 pixel in width or height, and the usability will be significantly improved (plus it'll look cool!)

Share this post


Link to post

Why not use bound keys? Or buttons that appear when you hover over an area of the screen (e.g. move your mouse to the top or bottom). This is commonly done in many programs - showing the menu bar in full screen for example, or showing the taskbar if you have it hidden when putting your cursor at the bottom of the screen. You could also use a key for toggling the buttons on and off (like we do in the editor)... Having a bar that appears when you put your mouse at the edge of the screen only reduces your usable area by 1 pixel in width or height, and the usability will be significantly improved (plus it'll look cool!)

Share this post


Link to post

with the exception of the command to start/stop the editor it is all controlled with GUI already (right click menus)

Share this post


Link to post

with the exception of the command to start/stop the editor it is all controlled with GUI already (right click menus)

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.