Jump to content

[REL] GUI Editor 3.1.3


Remp

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: https://community.multitheftauto.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
Link to comment

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: https://community.multitheftauto.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
Link to comment

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) 
  

Link to comment

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) 

Link to comment

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

Link to comment

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

Link to comment

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 :)

Link to comment

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 :)

Link to comment

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!)

Link to comment

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!)

Link to comment
  • 2 weeks later...

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.
×
×
  • Create New...