|
||
|
|||||||
| Third Party Program Support Misc support forum and advertisment forum for all RunUO related third party Utilities. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
|
I've got screenshots of my new totally rewritten gump editor.
http://tkpups.com/screen1.JPG http://tkpups.com/screen2.JPG http://tkpups.com/screen3.JPG |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
|
New Features:
1.All properties are edited through the Visual Studio Property Editor (you do not need to have visual studio) 2. Hue and GumpID properties ahve thier own porperty value browsers integrated with the VS Property Grid. 3. Full Drag, Drop, and resizing mouse support 4. The ability to group elements together, so they are treated as one single object 5. The ability to import to export groups to files that can be used as prebuilt templates, or exchanged with others over the web. 6. Users can create Element plugins for making thier own custom elements. 7. Scripting plugins that allow the Gump Designer to generate Emulator scripts in any lnaguge (and emulator) |
|
|
|
|
|
#5 (permalink) |
|
Join Date: Mar 2003
Location: Near a lava pool
Age: 8
Posts: 1,012
|
Yep it looks great! If it's not too much asking, would you consider adding a snap-to-grid like feature when positioning items using the mouse?
__________________
Oxygen should be regarded as a drug. |
|
|
|
|
|
#6 (permalink) |
|
Forum Novice
|
Looks Great, keep up the good work
![]()
__________________
OrBSydia DevNetwork |
|
|
|
|
|
#10 (permalink) | |
|
Forum Expert
|
Quote:
Currently it would be good for laying out a form, but it can't generate script yet. There are also a few other Element types I want to implement. The plugin system is working, but I'm currently having a problem gettings objects loaded from extrenal DLLs to deserialize correctly, so it needs some work. If anyone wants to help test what I have so far, and make suggestions contact me via ICQ and I can send you a current copy to look over. |
|
|
|
|
|
|
#12 (permalink) |
|
Join Date: Mar 2003
Location: Near a lava pool
Age: 8
Posts: 1,012
|
Here's another suggestion (or request depending on how you look at it
). I like to write most of the code by myself, and use software only for the gump generation part. I'd love to have an option to quickly copy to the clipboard a method that will only create the gump itself without the need of specifying namespace, class name and saving it to a script I'm not going to use. I'll try to stop now Thanks!
__________________
Oxygen should be regarded as a drug. |
|
|
|
|
|
#14 (permalink) | |
|
Forum Expert
|
Quote:
|
|
|
|
|
|
|
#16 (permalink) |
|
Join Date: Mar 2003
Location: Near a lava pool
Age: 8
Posts: 1,012
|
Glad to hear, I guess I didn't notice the plug-in part
![]() Spider, that's true. My sig is just a quote I found funny though, I'm not trying to make oxygen illegal or something ![]()
__________________
Oxygen should be regarded as a drug. |
|
|
|
|
|
#21 (permalink) | |
|
Quote:
![]() |
||
|
|
|
|
|
#23 (permalink) |
|
Forum Expert
|
This is the source code for a Gump Studio plugin. It is actually 2 plugins working together to create the snap to grid feature.
The first plugin, SnapToGrid, Adds a menu "Show Grid" that toggles on or off the grid of dots in the designer. It also hooks into the mouse movement code to watch for element dragging, and alters the mouse coord to snap it to the grid when the shift key is held down. It also installs another plugin, SnapToGridExtender, which gets placed into each type of Element. This plugin adds the "snap to grid" context menu to elements when they are right clicked. The code would be compiled into a DLL, and placed into the "Plugins" folder next to the GumpDesigner.exe. I'll try to come up with a better tutorial on creating plugins once I officially release the edit. [code:1]Imports Gump_Designer Imports Gump_Designer.Plugins Imports System.Drawing Public Class SnapToGrid Inherits BasePlugin Protected mDesigner As DesignerForm Protected mExtender As SnapToGridExtender Protected mShowGrid As Boolean = False Protected mShowGridMenu As System.Windows.Forms.MenuItem Public Overrides Function GetPluginInfo() As Gump_Designer.Plugins.PluginInfo Dim Info As New PluginInfo Info.AuthorEmail = "**********" Info.AuthorName = "Bradley Uffner" Info.Description = "Allows elements to be snapped to an 8x8 grid." Info.PluginName = "SnapToGrid" Info.Version = "1.0" Return Info End Function Public Overrides Sub Load(ByVal frmDesigner As Gump_Designer.DesignerForm) mDesigner = frmDesigner If mExtender Is Nothing Then mExtender = New SnapToGridExtender(mDesigner) mShowGridMenu = New System.Windows.Forms.MenuItem("Show Grid", AddressOf DoToggleGridMenu) frmDesigner.mnuPlugins.MenuItems.Add(mShowGridMenu ) AddHandler mDesigner.PreRender, AddressOf RenderGrid End Sub Public Overrides ReadOnly Property Name() As String Get Return GetPluginInfo.PluginName End Get End Property Public Overrides Sub InitializeElementExtenders(ByVal Element As Gump_Designer.Elements.BaseElement) Element.AddExtender(mExtender) End Sub Public Overrides Sub MouseMoveHook(ByRef e As Gump_Designer.Plugins.MouseMoveHookEventArgs) If e.MoveMode = MoveModeType.Move AndAlso CBool(e.Keys And Windows.Forms.Keys.Shift) Then e.MouseLocation = mExtender.SnapToGrid(e.MouseLocation, mExtender.GridSize) End If End Sub Public Sub DoToggleGridMenu(ByVal sender As System.Object, ByVal e As System.EventArgs) mShowGrid = Not mShowGrid mShowGridMenu.Checked = mShowGrid mDesigner.picCanvas.Refresh() End Sub Public Sub RenderGrid(ByVal Target As Bitmap) If mShowGrid Then For x As Integer = 0 To mDesigner.picCanvas.Width - 1 Step mExtender.GridSize.Width 'DrawGird For y As Integer = 0 To mDesigner.picCanvas.Height - 1 Step mExtender.GridSize.Height Target.SetPixel(x, y, Color.LightGray) Next Next End If End Sub End Class Public Class SnapToGridExtender Inherits Plugins.ElementExtender Public GridSize As Size = New Size(8, 8) Protected mDesigner As DesignerForm Public Sub New(ByVal Designer As DesignerForm) mDesigner = Designer End Sub Public Overridable Sub DoSnapToGridMenu(ByVal sender As System.Object, ByVal e As System.EventArgs) For Each o As Object In mDesigner.ElementStack.GetSelectedElements Dim Element As Elements.BaseElement = CType(o, Elements.BaseElement) Element.Location = SnapToGrid(Element.Location, GridSize) Next End Sub Public Function SnapToGrid(ByVal Position As Point, ByVal GridSize As Size) As Point Dim NewPoint As Point = Position NewPoint.X = CInt(NewPoint.X \ GridSize.Width) * GridSize.Width NewPoint.Y = CInt(NewPoint.Y \ GridSize.Height) * GridSize.Height Return NewPoint End Function Public Overrides Sub AddContextMenus(ByRef GroupMenu As System.Windows.Forms.MenuItem, ByRef PositionMenu As System.Windows.Forms.MenuItem, ByRef OrderMenu As System.Windows.Forms.MenuItem, ByRef MiscMenu As System.Windows.Forms.MenuItem) If PositionMenu.MenuItems.Count > 1 Then PositionMenu.MenuItems.Add(New System.Windows.Forms.MenuItem("-")) End If PositionMenu.MenuItems.Add(New System.Windows.Forms.MenuItem("Snap to Grid", AddressOf DoSnapToGridMenu)) End Sub End Class[/code:1] |
|
|
|
|
|
#25 (permalink) |
|
Forum Expert
Join Date: Oct 2003
Location: Spokane Valley, WA
Age: 24
Posts: 1,529
|
its not done read the whole thread before asking hehe
__________________
Creator of Genesis :: genesisworlds.com -- Genesis is the next replacement program for UO Landscaper & Dragon |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |