FlyingSpoon Posted April 6, 2015 Share Posted April 6, 2015 Is there any yet I really want to use it! Link to comment
WhoAmI Posted April 6, 2015 Share Posted April 6, 2015 As it is in README Note: Due to the current limitations in MTA that evolves around Lua environments and Object Orientated Programming, this GUI system only works within one resource and can only be used by one resource. We do not recommend running multiple dxGUI scripts (across different resources or within a single resource) as this may cause a significant impact to visitors of your server. We recommend that all important logic that utilises the GUI exists within a centralised resource (take care for security, keep secure scripts away from the main GUI). So it won't be any exported functions. Anyway, whole script works on OOP. OOP functions as far as I know are impossible to export. Personally I tested this script and it is really good, tho. You have to just see functions in files. For example creation window: local window = dxWindow:create ( x, y, width, height, text ) And if you want to change something window:setTitleColor ( r, g, b ) If you want to make it work this dxGUI library has to be inside your script. Link to comment
FlyingSpoon Posted April 6, 2015 Share Posted April 6, 2015 So the actual script must be made within the DxGUI resource correct? Meaning it cannot be exported. Link to comment
WhoAmI Posted April 6, 2015 Share Posted April 6, 2015 Yep. As I said, this DX library should be inside script which is goin' to use it. Link to comment
Karoffe Posted August 24, 2015 Share Posted August 24, 2015 Is there a way to make the output of GUI's relative value exactly as it is in the dimensions tab (right-click on an element>dimensions), because it outputs 0.06 instead of 0.057 and that causes me some trouble when I need something in the exact same position, I've tried searching code_generation.lua for this but found nothing... Link to comment
Remp Posted August 25, 2015 Author Share Posted August 25, 2015 You should be able to change the global decimal place variable to 3 to force it to output with an extra decimal place. It's defined in code_generation.lua, line 10 in the current version (gDecimalPlaces). It will also mean other things are output with an extra decimal place (like width/height), but that shouldn't matter. Link to comment
Karoffe Posted August 25, 2015 Share Posted August 25, 2015 I didn't expect it to be the first code line, seems that was the reason of not finding it , Thanks Link to comment
alberto2345 Posted December 18, 2015 Share Posted December 18, 2015 I noticed an issue when I was outputting my code. At first, it wouldn't show the output window at all with no errors or outputs. I then shared the code to my laptop and that showed the code output, but when I tried to view it, it came up with this error: [string "___PositionCoder___ = PositionCoder..."]:753: '}' expected near 't' I decided to copy the code to a file, then sent it to my main computer, put it in the output folder of guieditor and tried loading it from there, only the error occurred again. exact error from loading code: INFO::801 loadGUICode loading error: [string "___PositionCoder___ = PositionCoder..."]:753: '}' expected near 't' Not sure what it means, any ideas? Link to comment
Remp Posted December 18, 2015 Author Share Posted December 18, 2015 It most likely means that the gui editor can't understand some part of the code, and is erroring trying to figure it out. Is it your own (hand written) gui code that you are loading in and trying to edit, or is it something that you created entirely inside the editor? Are you using the latest version (3.1.2)? Can you send me a copy of the code you are trying to load in? Link to comment
alberto2345 Posted December 18, 2015 Share Posted December 18, 2015 I completely made the UI from guieditor without any of my own code modifications. I'm using the latest version. Sent you the code via PM. Link to comment
Remp Posted December 18, 2015 Author Share Posted December 18, 2015 I have isolated the problem to the text that is in one of your dxDrawText calls. The combination of commas and single quotation marks trips an obscure bug in how the editor loads in the data. You can work around this for now by removing the commas from the text string and adding them back in manually outside the gui editor. I will pm you more specific details, and i'll try to upload a fix for this soon. Edit (9th Jan 2016): GUI Editor 3.1.3 update (minor): - Fixed obscure bug loading in text with a specific comma/quote pattern in dx text strings MTA Community link Thanks for the report alberto2345, sorry for the delay in putting out a fix. Link to comment
RolEx Posted January 12, 2016 Share Posted January 12, 2016 I did not see the development of many that the previous release version such as this and I think Anna releases coming as the previous version we wish development and additions other things Thank you Link to comment
Tails Posted January 13, 2016 Share Posted January 13, 2016 Remp, Can you add in the following functions and fixes? - dxCreateRenderTarget - dxSetRenderTarget - guiCreateBrowser - Fix not being able to interact with dx elements after you've loaded them in with load code Thanks, love your add-on! Link to comment
Dealman Posted January 15, 2016 Share Posted January 15, 2016 Another feature request would be a sort of ruler/grid system. It should be a fairly easy implementation, and I'm sure some people will find it useful. I know I would, because I tend to set it up all the time. For example; @Tails: Adding the render target would be rather redundant. If anything, you could simply draw a rectangle to get a sort of preview of how big it would be. Then you simply draw whatever you to be drawn onto this render target. What I usually do is I draw the rectangle, then I hold ctrl and right-click the rectangle, then you will have the option to lock it. When it's locked, it won't register right-clicking so you won't accidentally move or change it. Same applies to guiCreateBrowser and createBrowser. Link to comment
Captain Cody Posted February 7, 2016 Share Posted February 7, 2016 How would I go about making gui such as this? Link to comment
Backsage Posted August 8, 2016 Share Posted August 8, 2016 Hi, I have a huge problem. Sometimes when I load lua code and it loads correctly, if I click on Output, nothing happens. Other times, this won't happen. I'm wondering if it's some sort of bug with gui editor. Link to comment
Remp Posted August 8, 2016 Author Share Posted August 8, 2016 It could be a bug with the GUI Editor, but I have not heard of it happening before. When you say nothing happens, does that mean the output window doesn't appear? Are you using the latest version (3.1.3)? Are there any errors in the debug console? There is only one code path in the "Ouptut" code, so the only way I can think that it would fail is if it is throwing an error somewhere. Do you have a code sample (that I can load in to the editor) you can send me that will cause this problem to happen? Link to comment
Dealman Posted October 20, 2016 Share Posted October 20, 2016 @Remp could we have a setting to prevent the guieditor asking whether or not I want to load code from an element? I'm working on my own DXGUI library which uses elements, which makes it impossible to resize things if I have a custom element behind it. Link to comment
Remp Posted October 21, 2016 Author Share Posted October 21, 2016 (edited) I'm not sure what you mean exactly, can you explain the problem a little more? Edited October 21, 2016 by Remp Link to comment
Dealman Posted October 21, 2016 Share Posted October 21, 2016 (edited) 17 minutes ago, Remp said: I'm not sure what you mean exactly, can you explain the problem a little more? Let's say I create a DX window with a text label using my DXGUI. I then decide to add a button, then I'd like to use your guieditor since it's easy to use and gives me a visual representation on the fly. So if I draw for example a rectangle somewhere, I can right-click it and move it around or resize it. However, as soon as I move it on top of one of my custom DX elements - if I try and right-click the rectangle, I won't get the option to manipulate the rectangle. But rather a window to load code from the element underneath the cursor.Edit: Recorded a short video to showcase what's going on. Edited October 21, 2016 by Dealman 1 Link to comment
Remp Posted October 21, 2016 Author Share Posted October 21, 2016 I see now, thanks Does it work as you want it to if you enable "Post GUI" on the rectangle? That should work for now. I could perhaps add a setting to disable loading prompts completely, i'll have to look into it Link to comment
Dealman Posted October 21, 2016 Share Posted October 21, 2016 4 minutes ago, Remp said: I see now, thanks Does it work as you want it to if you enable "Post GUI" on the rectangle? That should work for now. I could perhaps add a setting to disable loading prompts completely, i'll have to look into it Oh derp, yeah that makes sense - that works just fine. Link to comment
raynner Posted August 9, 2017 Share Posted August 9, 2017 pls add in settings > auto relative in create new item the item auto set "outPut Type" for "relative" pls 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