Jump to content

Remp

Members
  • Posts

    210
  • Joined

  • Last visited

Everything posted by Remp

  1. 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
  2. I'm not sure what you mean exactly, can you explain the problem a little more?
  3. 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?
  4. 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.
  5. 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?
  6. 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.
  7. Looks like you are right, it appears that all elements won't resize properly when testing in a resolution higher than your own. This seems to be an MTA limit, for some reason it won't allow you to create GUI elements larger than your own resolution. I tried a few variations of this in runcode, but it just disregards sizes bigger than my window: Executing client-side command: button = guiCreateButton(0, 0, 1920, 1080, "", false) Command executed! Executing client-side command: guiGetSize(button, false) Command results: 1680 [number], 1050 [number] This also effects the DX items in the GUI Editor since they are technically implemented as masks drawn over GUI elements under the hood. I'm not sure there is anything i can do about this unfortunately, unless the MTA limit can be removed or worked around (if anyone else has any information about this, i would be grateful for it). Sorry!
  8. I suppose it is technically possible, though the output code might be a little odd (especially if they are toggled relative). Keeping that parent relationship when loading dx code back in would also be very hard to do. I think the main problem with things like this is that the way the output code is designed will depend on the specific situation you are using it for and the developers coding style. For example, does it just hard code (parent position + child offset) into every single position argument (which isn't very usable/manageable for a human, and certainly not very easy to modify), or does it start creating variables that store the parent positions and pointing to them in the child position arguments. If GUI Editor starts defining local variables in its output, how extensive should that support be? It is very likely that people could design their code to fit their specific use case (and modify the output to match) in a far better way than the GUI Editor would ever be able to.
  9. Hold ctrl (either left or right) while you right click an element and the menu will have an extra "Locked" item at the bottom. Once it is locked you can't right click on it again unless you are holding ctrl. If that doesn't work, something must be wrong!
  10. GUI Editor 3.1.2 update: - Changed "Shadow" and "Outline" options of DX Rectangles to use DX lines rather than drawing an offset rectangle - Added "Set default size" menu option to DX images - Made "Outline" and "Shadow" on relative DX items output the correct code (+ improved loading relative DX a little) - Added "Locked" menu option that stops right click detecting the element (can be accessed/bypassed by holding ctrl) - Added "Set outline colour" and "Set shadow colour" to DX items with shadow/outline options - Fixed menu item overlay buttons not properly detecting mouse exit event - Fixed problem with the "Automatically resize output window" setting when generating DX code MTA Community link As usual please let me know of any bugs/errors that you get, they are very helpful in improving the GUI Editor!
  11. This is actually a really great catch, thanks for the report! It seems to be to do with the menu item overlay button handling. If you hover over the overlay button on one item (e.g. Set Start X) then move the mouse downwards onto the next item (Set Start Y) without moving the mouse left or right it will fail to properly detect that you are no longer inside the first overlay button (Set Start X). Then when you click (on the Set Start Y overlay button), it thinks you are inside both items buttons and processes both handlers. If you start at the top and go down the whole menu it will even open them all! This will be fixed in the next version.
  12. Thanks, i will look into this. The relative DX stuff is only very basic at the moment, so no promises on a solution. This should be quite easy, i will add it to my todo list and see what i can do. 6 and a half years and counting!
  13. GUI Editor 3.1.1 update: - Added font size setting - Added a submenu to the code positioning that shows shortcuts for the presets - Added highlight colour to editable fields in the right click menus - Made the copy option automatically attach the new copy to the mouse (for element movement) - Added detach/attach options to re-parent elements - Added setting to autosize the code output window to the code content width - Added Maximise/Restore titlebar options to the output window - Added highlight to elements with default variables when the output window warning is clicked - Added copy titlebar button to property "current value" window - Reworked the help documentation window to be less rubbish - Made properties option skip to the relevant properties (rather than landing on the element selection pane) - Pressing enter when using the colour picker now auto-accepts the current colour - Selecting a new colour in the colour picker is now reflected immediately in the gui element (and reversed if not saved) - Text alignment options now immediately preview changes on the gui element when changed - Added absolute/relative toggle for DX items. These are a little experimental, and relative-positioned DX won't get loaded back into the editor properly if you try to do so. - Made image/font list request error messages a little clearer - Added "Fit Parent Width" and "Fit Parent Height" resizing option that changes the width or height to fill the parent element - Added "Resize (constrained)" resizing option that keeps the same width/height proportions while resizing - Added "Parent menu" option to window menu - Fixed some undo/redo errors with setting fonts - Fixed some bugs with the code positioning error detection - Fixed xml files being left open on the server - Fixed issue with preview in resolution window incorrectly positioning elements when partially off screen MTA Community link This release is a little larger than usual, as always please let me know of any bugs/errors that you get
  14. Since i rewrote it, there is a 'Parent' right click menu option for every element that will open up a right click menu for the gui element parent of the element you click. This is useful to get access to gui elements that are usually completely covered by their children and can't be directly clicked on, like tab panels (the tab panel is just a blank element that you then add the tabs themselves onto). It doesn't make a whole lot of sense to right click on a tab and have an option to add another tab, since you don't add tabs to other tabs - you add them to tab panels This was the case for versions 3.0.0 - 3.0.2 but a lot of people seemed to get annoyed by it, so in the latest version (3.1.0) i have added the option back to the tab right click menu to make it easier If you are running 3.1.0 everything should be how it was before the rewrite
  15. GUI Editor 3.1.0 update: - added 'Move to front' right click option to the DX Element right click menus - added 'Add Tab' right click option to the tab right click menu - made dx text scale input and output a float (rather than an int) - made the 'Output basic lua code' output option default to true - reworked the snapping to allow snapping while resizing - changed snapping while moving multiple elements to snap to the edges of the group, rather than individual elements - added 'Shadow' and 'Outline' right click options to DX Rectangle / DX Text - made input mode setting more aggressive to stop 't' opening the chatbox (e.g. when another resource changes the input mode) - fixed some minor UI issues - fixed default variable names sometimes being the same as custom ones (i.e. generating 2 'GUIEditor' tables) - fixed snapping messing up positions when moving multiple elements - fixed a bug with tabs tab sizes becoming very large when resizing relative tab panels - fixed element dividers not working properly on dx items - fixed some inconsistencies with dx element re-ordering / deleting MTA Community link Please let me know of any bugs/errors that you get
  16. There is not a whole lot that is done behind the scenes when you set element text, and nothing particularly jumps out at me as potentially causing a crash. I'll need some more info to stand a chance at figuring this out - To be clear, it happens when you click this button? - What explicit mta version are you running? (inside mta, press F8, type 'ver', hit enter and post the version number here) - What version of windows are you running? - Does it crash setting text for all the different gui element types, or only specific ones? - When you set the text, are you using multi-line or single line? (if you don't know, it defaults to single line) - Do you enter some text or do you set it to nothing? - Does it crash if you set the text on dx items? - Does it crash setting other options using the input boxes? (eg: setting a property on a gui element) Ultimately, unless it is something i can work around, a crash in mta will need to be fixed in mta itself
  17. What crashes? MTA? Which mta version are you running? When exactly does it crash? (ie: when you click the menu option, when you enter a character, when you save the text, etc) csmit: I found the problem, i will update with a fix sometime this week. Thanks for the report!
  18. Is that exactly as it was output, or did you change anything by hand at any point? If it was output like that, can you tell me the exact steps you did to make it happen? (from starting the gui editor to getting that result) It is erroring because the 'GUIEditor' table is getting defined twice, with the second one overwriting the first. I can't see any way this could ever happen with just regular code output (maybe if you loaded code in and something went horribly wrong, if that is the case i would need to see the gui code that you loaded). If you change the table definition to this instead it will work: GUIEditor = { tab = {}, button = {}, edit = {}, label = {}, tabpanel = {} }
  19. - Do you mean DX gui implementations? I suppose there is no reason someone couldn't write a skinner that just reskins regular gui elements, but actually using 'dx gui' wouldn't work because the editor is so fundamentally based around things being gui elements rather than just rudimentary shapes (like dx items are) - Those text effects should be pretty easy, i will try to look at that sometime soon Relative positions can be done using the 'Position Code' option, which just does the same thing using maths. I am not sure how useful it is to be able to make dx elements size relative to something, but i will have a look at it if i can - Snapping ignores resizing deliberately, unfortunately there are various technical problems with it. Since it works by moving ('snapping') elements into line with others, if it is being resized according to your cursor position at the same time as snapping it is having it's position and size manipulated every frame by 2 completely different functions (and in 2 completely different ways). This means you end up with your elements getting badly warped out of shape and moved around the screen without actually wanting them to be, which is not very pleasant and makes the whole thing pretty much useless - Can you send me the gui code that you are trying to load so i can reproduce the problem?
  20. Is the guieditor resource running? When you are using relative file paths like that (file paths that start with :resourceName/...) to point to a font, the resource it references needs to be running for the path to work (in this case, guieditor). To avoid that just copy the font to your local resource folder and reference it there instead If that doesn't work, output the value of font_0 and see what it is
  21. 1 - it will already scan for images in the resources folder and lets you browse them, or did you mean something else? 2 - I did play around with writing an in-game code editor too so you could write click handlers and things for the gui elements, but i decided that this is fundamentally a gui editor and not a code editor - the same applies to generating things like meta.xml, which aren't really related to gui Uploaded version 3.0.2: - fixed some issues with code generation when using custom fonts on a dx text
  22. The easiest way to do this is to type: 'aclrequest allow guieditor general.ModifyOtherObjects' into the console (if you just type 'aclrequest' it will show you the command usage information) MTA will then automatically set up the acl entry for you
  23. GUI Editor 3.0 update I have rewritten the GUI Editor from the ground up, fixing some of the more clumsy design choices in the original version and introducing some extra features that should make GUI editing a bit easier. Check the community gallery for some preview images. Some of the main features now include: - completely redone 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 - more robust and complete 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) I would encourage anyone to redo the in-game tutorial to get up to speed on the new features MTA Community link The editor requires the ACL permissions: general.ModifyOtherObjects for some functions, and function.callRemote for update checking Please let me know of any bugs/errors that you get
  24. version 1.3 uploaded: - some parts of the resource have been rewritten to be faster (performance when not hanging/trying to grab especially should be a whole lot better) - players will now auto-drop if the vehicle they are hanging on to has its model changed to one that does not support hanging - changed the exported function names to be more in line with common naming standards - general code cleanups This should be completely backwards compatible with any exports/code you use with previous versions (and in my tests it is), but if you have any problems let me know
  25. Comboboxes will not be added until mta is fixed Everything else is probably doable but i don't know how hard it would be. Keep in mind that the original scope of this was never meant to handle any of this kind of stuff, the last few updates have really been hacked in and the code is not very pretty Are these things really that critical? If someone else wants to add them then feel free, i will keep it in mind but cannot promise i will have time to get them done
×
×
  • Create New...