SteveDunn / Gleed2D

Generic Level Editor 2D
83 stars 28 forks source link

Relative content root path? #31

Closed jessechounard closed 3 years ago

jessechounard commented 12 years ago

When saving the a level, would it be possible to convert the content root path to a relative path? (Relative to where the level file was saved.) I'm worried about using absolute paths, as that may cause problems when working with collaborators.

When using the old Gleed2d years ago, I actually removed the idea of a content root path completely, and all stored paths were relative to where the level file was saved. I could do that again, but I think the relative path idea might cause fewer headaches.

SteveDunn commented 12 years ago

Hi Jesse, Thanks for the feedback. I added a related feature a while back: when you load a level where the content root folder doesn't exist, it displays thiss

message:

Content root folder not found.

The level file has a content root folder that does not exist.

It says the content root is at "c:\project". Images specified in this level file are relative to this folder so you should change it in order to load this level file correctly.

Would you like to change it?

Yes No

If you click yes, you can change the content root folder.

Saying that, I can see the benefit of it defaulting to the location where the level is loaded from. Perhaps we can add to the message something like 'Would you like to change it or default to '[c:\wherever the level loaded from']' and add a 'Remember my choice' check-box.

On 26 March 2012 17:52, Jesse Chounard < reply@reply.github.com

wrote:

When saving the a level, would it be possible to convert the content root path to a relative path? (Relative to where the level file was saved.) I'm worried about using absolute paths, as that may cause problems when working with collaborators.

When using the old Gleed2d years ago, I actually removed the idea of a content root path completely, and all stored paths were relative to where the level file was saved. I could do that again, but I think the relative path idea might cause fewer headaches.


Reply to this email directly or view it on GitHub: https://github.com/SteveDunn/Gleed2D/issues/31