• DermaDesigner
    549 replies, posted
[QUOTE=Map in a box;22138530]On this virus-filled computer I'm on (i use 2), it wont save. Also, can you add my DNumPad update in it? ^^[/QUOTE] Does it give an error message of some sort? Are you running it as administrator? [editline]11:33PM[/editline] Also I am not in possession of your DNumPad update.
Maybe it has something to do with it, being virus filled?
[QUOTE=c-unit;22138559]Maybe it has something to do with it, being virus filled?[/QUOTE] Highly unlikely. Viruses have no intent to block file access from a graphical IDE for a game.
No but, how do you know the virus hasn't infected files on his desktop/saving place, and that file has now become a drone to infect other files on his desktop..just a theory.
yes its the virus, but it stops the updater too. I'll give you the data and my update. Then again, it could be that this computer doesnt have .Net Framework 3.5. Its missing System.Core. ignorable [url=http://www.mediafire.com/download.php?fwntynktuzt]Numpad Update w/ resources & source file[/url]
Gbps' update will be integrated into the main build tomorrow, along with snap to grid and DNumPad.
i found some errors :p when you use 2 lines in a label, you have to manualy put them on one line with \n between them allso, i can't parent the controlls to the form :(
[QUOTE=Szgan;22141298]i found some errors :p when you use 2 lines in a label, you have to manualy put them on one line with \n between them allso, i can't parent the controlls to the form :([/QUOTE] -snip- Also, move the control over the form while holding ctrl.
oh ok sweet :D ok, its working awesome now :3 now all we need are all controls :D Allso, one more bug, but its a small annoyance, whenever you save it as a .ddproj file, then it comes up asking if you want to create the file since it doesn't exist and sometimes (don't know the exact circumstances) the toolbox and property window appears to have allways on top enabled
The file create dialogue was probably put there on purpose but since it's not needed, it'll be removed. It's better to have a warning that asks you to overwrite a file rather than having one to ask if you want to create a file. As for the weirdness with the panel focus, because of the way it works where when the main form loses or gets focus it brings the other two windows with it, when you click on a window behind the main one, the other two can stay visible while the main one is invisible. Just give focus to the main window and downsize it to fix the problem, it's just something that's there.
yakahughes this DermaDesigner helped me discover some functions i've never come into contact with before, but are very useful :D
[QUOTE=yakahughes;22144324]The file create dialogue was probably put there on purpose but since it's not needed, it'll be removed. It's better to have a warning that asks you to overwrite a file rather than having one to ask if you want to create a file. As for the weirdness with the panel focus, because of the way it works where when the main form loses or gets focus it brings the other two windows with it, when you click on a window behind the main one, the other two can stay visible while the main one is invisible. Just give focus to the main window and downsize it to fix the problem, it's just something that's there.[/QUOTE] hmm i see well its a good app none the less :) only notice, which is a bit more serious, after adding 4 or so controls, the performance plumets D: might be my pc, had to reinstall anyway but il keep you posted about that :) (or you didn't optimized yet :p)
Well great job to everyone involved in developing this, while I'll always prefer writing derma from scratch rather than click and drag, the interface for the program is simple, easy to use, parenting and everything works, its all smooth and well laid out, and the code generates and runs perfectly. Kudos to you guys, this is great!
[QUOTE=Kopimi;22147854]Well great job to everyone involved in developing this, while I'll always prefer writing derma from scratch rather than click and drag, the interface for the program is simple, easy to use, parenting and everything works, its all smooth and well laid out, and the code generates and runs perfectly. Kudos to you guys, this is great![/QUOTE] I don't understand why one would want to write their own from scratch when you can obviously layout your menu in this and make it dynamic yourself.
because some people like the control, or self checking (if something is bugged, then its your fault, so kinda 1 less problem to look at)
[B][Beta 3 Build 15 Released] [/B][INDENT]* Dragging and manipulating has been sped up by almost 50x what it was * General saving/loading fixes * Variables will now clamp instead of alerting you of an invalid value [/INDENT]Get the build here: [URL="http://dermadesignerb.googlecode.com/svn/branches/Gbps/DermaDesigner/DermaDesigner/bin/Release/Build015Beta3.zip"]Build015Beta3.zip[/URL]
This is coming along quite nicely, there's still quite a lot more things to add, but the speed at which you are doing it is phenomenal.
I copied the controls file for DImage and edited it to make SpawnIcons. It probably doesn't work seeing as I know virtually nothing about this. I just changed all instances of DImage to SpawnIcons and changed imagepath to modelpath. I also edited a couple of help strings so they say the right thing. If it helps then I am happy, if not I wasted my time. [code]using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; using System.Drawing; // Thanks to SnakeFace for this control namespace DermaDesigner { class SpawnIcons : Panel { private static string respath = "resources/DImage/"; // painting resources private static Image paletteimg = Derma.LoaSpawnIcons(respath + "DImage_palette.png"); public static new Image thumbnail = Derma.LoaSpawnIcons(respath + "DImage_32.png"); private static Color whitecolor = Color.FromArgb(255, 241, 241, 241); private static SolidBrush squareimgBrush = new SolidBrush(whitecolor); private static Color blackcolor = Color.FromArgb(255, 0, 0, 0); private static SolidBrush blackBrush = new SolidBrush(blackcolor); // class vars public static int numOfThisType = 0; public override string type { get { return "SpawnIcons"; } } private SizeF textSize = Derma.GetTextSize(""); // Lua variables public string modelpath = ""; #region Properties [CategoryAttribute("Lua Attributes"), DescriptionAttribute("The path to the model file to use in-game (relative to 'models/')")] public string Filepath { get { return modelpath; } set { this.modelpath = value; this.textSize = Derma.GetTextSize(this.modelpath); Derma.Repaint(); } } #endregion Properties public SpawnIcons(int x, int y) : base(x, y, 50, 50) { numOfThisType++; if (!this.SetVarName(type + numOfThisType.ToString())) while (!this.SetVarName(type + numOfThisType.ToString() + Derma.RandomString(4, false))) continue; } public override void PopulateProperties() { Derma.prop.propertyGrid.SelectedObject = this; } public override void ControlPaint(object sender, System.Windows.Forms.PaintEventArgs p) { if (this.parent) p.Graphics.Clip = new Region(new Rectangle(parent.x, parent.y, parent.width, parent.height)); else p.Graphics.Clip = new Region(new Rectangle(this.x, this.y, this.width, this.height)); p.Graphics.FillRectangle(squareimgBrush, this.x, this.y, this.width, this.height); if (parent) { int a, b, c, d; Point relpos = this.GetPosRelativeToParent(); a = (this.x >= parent.x) ? this.x : parent.x; b = (this.y >= parent.y) ? this.y : parent.y; c = (this.x + this.width > parent.x + parent.width) ? parent.width - relpos.X : this.width; d = (this.y + this.height > parent.y + parent.height) ? parent.height - relpos.Y : this.height; p.Graphics.Clip = new Region(new Rectangle(a, b, c, d)); } p.Graphics.DrawImage(paletteimg, this.x + this.width / 2 - 32, this.y + this.height / 2 - 32, 64, 64); p.Graphics.DrawString(this.modelpath, Derma.DefaultFont, blackBrush, (this.x + (this.width / 2) - (this.textSize.Width / 2)), (this.y + this.height - (this.height / 4 ) + 12)); } public override string GenerateLua() { StringBuilder code = new StringBuilder("\n"); code.AppendFormat("local {0} = vgui.Create('SpawnIcons')\n", this.varname); if (this.parent != null) code.AppendFormat("{0}:SetParent({1})\n", this.varname, parent.varname); code.AppendFormat("{0}:SetSize({1}, {2})\n", this.varname, this.width, this.height); if (this.ShouldCenter()) code.AppendFormat("{0}:Center()\n", this.varname); else code.AppendFormat("{0}:SetPos({1}, {2})\n", this.varname, this.GetPosRelativeToParent().X, this.GetPosRelativeToParent().Y); code.AppendFormat("{0}:SetModel('{1}')\n", this.varname, this.modelpath); code.AppendFormat("{0}:SizeToContents()\n", this.varname); if (!this.visible) code.AppendFormat("{0}:SetVisible(false)\n", this.varname); return code.ToString(); } public static void Register() { Derma.RegisterPanel("SpawnIcons", typeof(SpawnIcons), thumbnail); } } } [/code]
[QUOTE=Gbps;22149625]I don't understand why one would want to write their own from scratch when you can obviously layout your menu in this and make it dynamic yourself.[/QUOTE] As soon as you guys add autoalign (Like in Visual Basic) so that everything can be perfectly aligned and sized, I'll be using this for my Derma. Until then I'll be doing the math in my head and writing the code myself.
[QUOTE=Kopimi;22154516]As soon as you guys add autoalign (Like in Visual Basic) so that everything can be perfectly aligned and sized, I'll be using this for my Derma. Until then I'll be doing the math in my head and writing the code myself.[/QUOTE] There'll be a snap grid in the next release. Yay 800 posts. I'm very sorry for the inconvenience, but due to the fact that I took an almost 8 feet fall and landed basically on my knee, the next update to the main version will be either tomorrow or wednesday. Until then of course, feel free to use Gbps' branch.
[QUOTE=ryan1271;22152234]I copied the controls file for DImage and edited it to make SpawnIcons. It probably doesn't work seeing as I know virtually nothing about this. I just changed all instances of DImage to SpawnIcons and changed imagepath to modelpath. I also edited a couple of help strings so they say the right thing. If it helps then I am happy, if not I wasted my time. [code]using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; using System.Drawing; // Thanks to SnakeFace for this control namespace DermaDesigner { class SpawnIcons : Panel { private static string respath = "resources/DImage/"; // painting resources private static Image paletteimg = Derma.LoaSpawnIcons(respath + "DImage_palette.png"); public static new Image thumbnail = Derma.LoaSpawnIcons(respath + "DImage_32.png"); private static Color whitecolor = Color.FromArgb(255, 241, 241, 241); private static SolidBrush squareimgBrush = new SolidBrush(whitecolor); private static Color blackcolor = Color.FromArgb(255, 0, 0, 0); private static SolidBrush blackBrush = new SolidBrush(blackcolor); // class vars public static int numOfThisType = 0; public override string type { get { return "SpawnIcons"; } } private SizeF textSize = Derma.GetTextSize(""); // Lua variables public string modelpath = ""; #region Properties [CategoryAttribute("Lua Attributes"), DescriptionAttribute("The path to the model file to use in-game (relative to 'models/')")] public string Filepath { get { return modelpath; } set { this.modelpath = value; this.textSize = Derma.GetTextSize(this.modelpath); Derma.Repaint(); } } #endregion Properties public SpawnIcons(int x, int y) : base(x, y, 50, 50) { numOfThisType++; if (!this.SetVarName(type + numOfThisType.ToString())) while (!this.SetVarName(type + numOfThisType.ToString() + Derma.RandomString(4, false))) continue; } public override void PopulateProperties() { Derma.prop.propertyGrid.SelectedObject = this; } public override void ControlPaint(object sender, System.Windows.Forms.PaintEventArgs p) { if (this.parent) p.Graphics.Clip = new Region(new Rectangle(parent.x, parent.y, parent.width, parent.height)); else p.Graphics.Clip = new Region(new Rectangle(this.x, this.y, this.width, this.height)); p.Graphics.FillRectangle(squareimgBrush, this.x, this.y, this.width, this.height); if (parent) { int a, b, c, d; Point relpos = this.GetPosRelativeToParent(); a = (this.x >= parent.x) ? this.x : parent.x; b = (this.y >= parent.y) ? this.y : parent.y; c = (this.x + this.width > parent.x + parent.width) ? parent.width - relpos.X : this.width; d = (this.y + this.height > parent.y + parent.height) ? parent.height - relpos.Y : this.height; p.Graphics.Clip = new Region(new Rectangle(a, b, c, d)); } p.Graphics.DrawImage(paletteimg, this.x + this.width / 2 - 32, this.y + this.height / 2 - 32, 64, 64); p.Graphics.DrawString(this.modelpath, Derma.DefaultFont, blackBrush, (this.x + (this.width / 2) - (this.textSize.Width / 2)), (this.y + this.height - (this.height / 4 ) + 12)); } public override string GenerateLua() { StringBuilder code = new StringBuilder("\n"); code.AppendFormat("local {0} = vgui.Create('SpawnIcons')\n", this.varname); if (this.parent != null) code.AppendFormat("{0}:SetParent({1})\n", this.varname, parent.varname); code.AppendFormat("{0}:SetSize({1}, {2})\n", this.varname, this.width, this.height); if (this.ShouldCenter()) code.AppendFormat("{0}:Center()\n", this.varname); else code.AppendFormat("{0}:SetPos({1}, {2})\n", this.varname, this.GetPosRelativeToParent().X, this.GetPosRelativeToParent().Y); code.AppendFormat("{0}:SetModel('{1}')\n", this.varname, this.modelpath); code.AppendFormat("{0}:SizeToContents()\n", this.varname); if (!this.visible) code.AppendFormat("{0}:SetVisible(false)\n", this.varname); return code.ToString(); } public static void Register() { Derma.RegisterPanel("SpawnIcons", typeof(SpawnIcons), thumbnail); } } } [/code][/QUOTE] That's ok, I've got spawnicons, however, that looks like it would work, however you never got any of the major things such as the setting of model, but, good job!(never in the exporting process) scary, i took a nap and fell asleep for 8 hours. I guess I was tired
[QUOTE=Map in a box;22155283]That's ok, I've got spawnicons, however, that looks like it would work, however you never got any of the major things such as the setting of model, but, good job!(never in the exporting process) scary, i took a nap and fell asleep for 8 hours. I guess I was tired[/QUOTE] This doesn't work to set the model? code.AppendFormat("{0}:SetModel('{1}')\n", this.varname, this.modelpath); Oh, well, SpawnIcons aren't checked off in the OP and it is quite similar to DImage so I figured I would have a go. Practice makes perfect so why not start now.
I was doing it, but fell asleep, and i didnt see that you had that. Thanks though! (not to sound like a evil dark little gopher) [editline]09:30PM[/editline] OH and you skipped some important functions
I have just been trying to get this working under mono and with a couple changes to the code, mostly those windows interops i have managed to get this working under Linux, no use to this but it is cool never the less [img_thumb]http://dl.dropbox.com/u/2014606/dermadesigner.jpg[/img_thumb]
[QUOTE=Vbits;22158659]I have just been trying to get this working under mono and with a couple changes to the code, mostly those windows interops i have managed to get this working under Linux, no use to this but it is cool never the less [img_thumb]http://dl.dropbox.com/u/2014606/dermadesigner.jpg[/img_thumb][/QUOTE] [url]http://en.wikipedia.org/wiki/Cocoa_Sharp[/url] :3 so it has use ^^ besides, less OS dependencies, the better :D
Updated:[list] [*]Added project saving and loading. [*]Added a grid to which panels will snap on movement or resizing [/list] When the grid is on, you can ignore it and make your panels not snap to it by holding the tab key.
[QUOTE=yakahughes;22165059]Updated:[list] [*]Added project saving and loading. [*]Added a grid to which panels will snap on movement or resizing [/list] When the grid is on, you can ignore it and make your panels not snap to it by holding the tab key.[/QUOTE] It would appear that in an effort to satisfy my own needs for this project, the developers will do whatever I wish.. Ahem, yes well, this grid snapping is alright, but it lacks a copy of Metro 2033. Then, and only then, will I use this program.
The grid was conceptualized the moment I started the project. No Metro 2033 for you.
:p Kopimi also asked for another function, as this is programmed in C#/VB you should have seen this in the visual studio designer move some buttons close to each other, or on the same height, then youl see what i mean, if you could get this function in, then that would be epic :D
What the hell? I thought by grid, you mean't you were gonna make it so there is a grid ONTOP of the DFrame...
Sorry, you need to Log In to post a reply to this thread.