Page 1 of 1

Linking a level with a theme doesn't work in v0.4

PostPosted: 06 Aug 2012, 23:14
by leovilok
I'm trying to make a levelpack in wich each level has an associated theme, but in M&MS v0.4 it doesn't seems to work. Besides the binary (I use the fedora 32bits one) doesn't provide any console output when loading the levels.
I tryied with my custom themes (that I put in ~/.local/share/meandmyshadow/themes/ and i also tried in BINARYDIRS/../data/themes/) : they appeared in the M&Ms options and can be chosen from here but the levels won't launch their own themes. Same thing for the default "classic" theme.
I upload a dummy level that is supposed to be linked to the "classic" theme.
dummy.map.tar.gz
dummy level that is supposed to be linked to the "classic" theme
(784 Bytes) Downloaded 385 times

Also my option "Level themes" in checked.

Is it a bug ? Is this feature not ready yet ? Is it just me ?
I hope it can be solved :)

Re: Linking a level with a theme doesn't work in v0.4

PostPosted: 07 Aug 2012, 06:04
by Edward_Lii
Hello leovilok,

leovilok {l Wrote}:Is it a bug ? Is this feature not ready yet ? Is it just me ?

It was working once, long ago, but never really maintained.
Looking at the code it turns out that instead of the name of the path it needs the full path to the theme.
So for the classic theme that would be %DATA%/themes/classic.

But there's another problem, there's a bug in the code where the wrong string is used for the custom theme loading.
So I'm afraid there's no way to get it working in V0.4. :(
I could fix this in svn but we're already planning on a better integration of levelpacks and themes.

Re: Linking a level with a theme doesn't work in v0.4

PostPosted: 07 Aug 2012, 14:50
by leovilok
Ok, will the new implementation keep the same formating (theme=stuff in the .map files) ?

Re: Linking a level with a theme doesn't work in v0.4

PostPosted: 09 Aug 2012, 06:18
by Edward_Lii
Hello leovilok,

leovilok {l Wrote}:Ok, will the new implementation keep the same formating (theme=stuff in the .map files) ?

That's hard to tell, I'm afraid it will change since we want to give the levelmaker more control over the theme.
I think the structure will become something similar to this:
{l Code}: {l Select All Code}
theme(name) {
    key = value
    ...
}

Re: Linking a level with a theme doesn't work in v0.4

PostPosted: 09 Aug 2012, 12:38
by leovilok
The theme config file will be in the .map file ? This is even more flexible :)