• DermaDesigner
    549 replies, posted
would it be possible to load from lua?
This is amazing for lua beginners like myself, keep up the great work.
[QUOTE=vexx21322;22243499]This is amazing for lua beginners like myself, keep up the great work.[/QUOTE] make sure to study the code it spits out :3
[QUOTE=Szgan;22243571]make sure to study the code it spits out :3[/QUOTE] Yup, I made a quick panel for a simple client side addon I made, having some trouble with setting a function to the DNumberWang value though.
doing what now? you mean set the value to the DNumberWang? thats just x:SetValue(valhere) or you mean something else?
[QUOTE=Szgan;22245047]doing what now? you mean set the value to the DNumberWang? thats just x:SetValue(valhere) or you mean something else?[/QUOTE] Gah, never mind. But can support for loading lua files be added. [del]Oh and the parent thing is broken, or maybe I'm not doing it right.[/del] Never mind, I was doing it wrong. Found a bug, when you parent to a something, the pos is local to the parent in the program, but when you generate the code, they aren't.
What control did you try it on? I may have missed one when I converted them all to using relative positions.
[QUOTE=yakahughes;22246765]What control did you try it on? I may have missed one when I converted them all to using relative positions.[/QUOTE] The ones I found to not be relative are the DButton, DPanel, DNumberWang, DLabel. Another bug that I found is that the order of the generated lua can mess with things like, if you do [code] DButtonAll.DoClick = function() RunConsoleCommand( "blah", DNumberWalk:GetValue() ) end [/code] But the DNumberWalk is after that because the order, it will return an error. Not sure if you would be able to fix that easy though.
I can't control what you write in your own functions, so you'll have to rearrange your code to avoid stuff like that. Another option would be to have all the variable names at the top like local blah local otherblah ... code for blah and otherblah but I don't know if that would solve it.
Got latest SVN Needs a hook to FormClosing event to ask if the user wants to save or not.
[QUOTE=yakahughes;22249716]I can't control what you write in your own functions, so you'll have to rearrange your code to avoid stuff like that. Another option would be to have all the variable names at the top like local blah local otherblah ... code for blah and otherblah but I don't know if that would solve it.[/QUOTE] Yeah I know, it's not that big of a deal for thr professional coders.
[QUOTE=bringitonbitch;22250574]Got latest SVN Needs a hook to FormClosing event to ask if the user wants to save or not.[/QUOTE] I had thought of that but forgot it, thanks for reminding me.
What is your next planned feature, I'm eager to mess with this more. This is like the Visual Basic of lua :smug:
[QUOTE=vexx21322;22252783]What is your next planned feature, I'm eager to mess with this more. This is like the Visual Basic of lua :smug:[/QUOTE] That's perfect because Lua is the VB of scripting languages.
This is fun to mess about with, I made this in about 5 minutes [img]http://i45.tinypic.com/2laqb04.jpg[/img]
Yaka you should set 0,0 to be just unter the menu bar, currently it's behind it... €dit: Why is Properties resizeable where Toolbox isn't? And why can't I name my panel self.Panel :{
I SVN updated and ran the exe in the release folder and it gives me an error.
[QUOTE=samwilki;22255157]I SVN updated and ran the exe in the release folder and it gives me an error.[/QUOTE] Your avatar makes me absurdly happy inside.
[QUOTE=samwilki;22255157]I SVN updated and ran the exe in the release folder and it gives me an error.[/QUOTE] you should be more specific, at least copy the error or post a screenshot. saying "i get an error" is kinda vague
Something about it can't load an image, because it uses an image that isnt in the SVN, and can someone tell me like how to add lua to a combo box, so that I can show all the players on it.
That will have to be done by hand the only thing this program does is generate layout lua for forms, not the functionality behind it
Ahhh ok, thats fine.
How exactly do you parent? I seen something about a drag and drop but what do I drag and where do I drop it?
Hold Ctrl down and drag it onto a panel.
If you haven't already Aaron, read the wiki entry on DermaDesigner. I put it there for a reason, it lists all the features and how to use them. samwilki, you didn't specify whether you checked out the SVN or downloaded the latest build in the zip folder, but if you did the latter, make sure you extracted everything into a normal folder, and didn't run it from inside the zip file, it won't work running from inside the zip. [quote=The-Stone]Yaka you should set 0,0 to be just unter the menu bar, currently it's behind it... €dit: Why is Properties resizeable where Toolbox isn't? And why can't I name my panel self.Panel :{ [/quote] Setting 0,0 to be under the menu bar would be impractically hard. The properties menu is resizable because a property name or value might not fit inside the preallocated space, whereas with the toolbox, you only need to be able to scroll down to see everything. As for naming stuff self.Panel, you can't do that because when you set a panel's variable name, it checks it against a regex that checks for 'word characters' and numbers, which would be a-z, A-Z, 0-9, and _. I'll make it accept periods as well, thanks.
Making the Property sheet will be really hard, i'd bow down to your godliness if you could pull it off [editline]07:52PM[/editline] Oh, btw, the code the designer makes is all wrong, it makes the positions off screen or not on the derma panel at all.
Updated:[list] [*]added an option for making control variables global (defaults to false) [*]added a check to ask if you want to save your project on program close (thanks bringiton) [*]attempted to fix the problem of panels referencing other panels by making all local variables declared beforehand (thanks vex21322) [*]fixed failing to position controls relative to the parent (thanks vex21322) [*]added support for periods and brackets in variable names (thanks The-Stone), but it's your responsibility to make sure they don't mess up, like naming a panel DButton1[[/list] I also updated the SVN link in the OP to be to the svn trunk, not the google code home page.
Add this to DTextEntry? [url]http://wiki.garrysmod.com/?title=DTextEntry.SetMultiline[/url]
[QUOTE=Aaron113;22264548]Add this to DTextEntry? [url]http://wiki.garrysmod.com/?title=DTextEntry.SetMultiline[/url][/QUOTE] Done, thanks. That'll be in the next release, in the svn now.
[QUOTE=yakahughes;22262886]Updated:[list] [*]added an option for making control variables global (defaults to false) [*]added a check to ask if you want to save your project on program close (thanks bringiton) [*]attempted to fix the problem of panels referencing other panels by making all local variables declared beforehand (thanks vex21322) [*]fixed failing to position controls relative to the parent (thanks vex21322) [*]added support for periods and brackets in variable names (thanks The-Stone), but it's your responsibility to make sure they don't mess up, like naming a panel DButton1[[/list] I also updated the SVN link in the OP to be to the svn trunk, not the google code home page.[/QUOTE] The parent thing works now :D
Sorry, you need to Log In to post a reply to this thread.