Adam's Lair Forum

game development and casual madness
It is currently 2017/03/23, 18:23

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2017/01/13, 00:55 
Forum Adept
Forum Adept
User avatar

Joined: 2015/03/15, 02:49
Posts: 351
Location: Out there
Role: Hobbyist
Hi guys!

I am developing a .tmx importer. All is going good, I have a system set up that parses the file, and imports the tileset .png's, converting them to tilesets that Duality can use.

I just need to be able to edit the tile sizes, but I'll get there.

Now, I just want to be able to drag and drop the .tmx into the scene viewer, but can't seem to get how that particular event is triggered.

Could someone point me in the right direction?

I was able to figure the rest out on my own by perusing some other source files of other plugins, but the drag and drop operation eludes me.

I have even setup a github project, so you know I'm serious! For some reson, my friend's internet failed me, and I was unable to sync the project to it's latest form, so some code is weird if you dare to look at it and manage to survive. Rest assured, it
gets the possible multiple tilesets, layers and stuff, though it doesn't actually do anything for now.

Tomorrow I'll do it properly, promise.

_________________
Hello there! Nice to meet you!
I have github. Apologies in advance for bad coding practices.


Top
 Profile  
 
PostPosted: 2017/01/13, 10:47 
Veteran Member
Veteran Member
User avatar

Joined: 2015/10/04, 15:48
Posts: 153
Location: Germany
Role: Hobbyist
Hey ^^

For the drag and drop thing, you need inherit from the DataConverter-Class.

I'm also writing a Tmx-Plugin. On github you can see, how I solved your problem:

https://github.com/ChristianGreiner/dua ... FromTmx.cs

Here is my github project page:
https://github.com/ChristianGreiner/duality-tiled

This is my first editor plugin... so maybe there is a better way to implement this tmx-importer :]

_________________
Twitter | GitHub | Join Duality on Discord | itch.io


Top
 Profile  
 
PostPosted: 2017/01/13, 12:11 
Forum Adept
Forum Adept
User avatar

Joined: 2015/03/15, 02:49
Posts: 351
Location: Out there
Role: Hobbyist
Oh, you are doing it already!

Guess I'll move on over to other things, then. Funnily, I had the feeling it was the DataConverter class. I just didn't know how it was triggered.

Guess I'll find other things to train. :)

Thanks for the heads up ^^

_________________
Hello there! Nice to meet you!
I have github. Apologies in advance for bad coding practices.


Top
 Profile  
 
PostPosted: 2017/01/16, 15:55 
Forum Adept
Forum Adept
User avatar

Joined: 2015/03/15, 02:49
Posts: 351
Location: Out there
Role: Hobbyist
Just a heads up. Considering that a .tmx importer is already underway, I used the skeleton of my plugin to make an OGMO Level Editor importer.

Though it is a bit more obscure than Tiled, some features make it an amazing tool and sometimes a better alternative than Tiled.

Edit: For that, of course, I've set up a github page for the project so you all can point and laugh at my coding. :D

_________________
Hello there! Nice to meet you!
I have github. Apologies in advance for bad coding practices.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group