Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Extending Dark Age World Editor with C#

Extending Dark Age World Editor with C#

Black Knight
Under a ShadowyTree · · 1 min read
1,524 3
I am pretty tired of doing all the GUI work in pure win32 so I wanted to use c# for the world editor.Converting all of it to C# isn't really an option because there is just too much code in it.So I decided to implement new dialogs with C# and run them from the C++ code with shell execute.

For example for an item editor or dialog editor I create a new c# application with one form then I modify this forms properties so that it looks like a popup window.Then I run it from the world editor.The changes I made to the form are as follows :
1-MinimizeBox = false
2-ShowIcon = false
3-ShowInTaskBar = false
4-Topmost = true

These settings make it look like a normal popup inside the editor.The only problem is it can be run multiple times and when the main application closes these popups stay open.I think I can find an elegant way to restrict only one app per world editor and send a close message to the c# apps when the world editor closes.

This will enable me to make much more advanced GUI elements in the world editor and hopefully speed up the progress of it.

Here is a screenshot showing the new c# dialog.The dialog on the top right is the regular win32 one the new one has a listview and a datagrid.

I will use c# apps for things that don't need data from the main application so that I won't have to deal with passing data around.For example the item editor can be done this way.It will read the item data from the disk and modify everything.The world editor is using IDs to add items so it just needs to reload the item list which holds ids and it should be all good [smile]

Discussion

Loading comments...