首页 > REDM设计器教程 > REDM设计器教程12-增加主题包
2016十二月27

REDM设计器教程12-增加主题包

[隐藏]

  修改前的MyTest下载–>  

  

MyTest.zip

   修改后的MyTest+图片下载–>  

tempimg.zip

MyTest.zip

  

1.主题包简介

  

主题包保存了皮肤对应的图片资源,DM库的皮肤内置查找图片资源方式如下:

优先从默认主题包中查找图片资源,如果未找到,则遍历所有的主题包查找图片资源(可以禁止遍历)

  

 例如Skin名为QQ的皮肤,它的查找顺序是:(以修改后的MyRes包为例)

1.MyRes\layout\xml\global.xml中记录了皮肤,src="png:QQ"

<imglist id="QQ" src="png:QQ" states="1" bvert="0" btitle="0" />

  

2.MyRes\themes\dmindex.xml中记录了所有的主题包,name指定了默认主题包名(如果没有默认的name,取第一个为默认主题包),这里取了theme1

<resource>
	<themes name="theme1">// name指定了默认主题包名theme1
		<file name="theme0" path="themes\theme0\dmindex.xml" />
		<file name="theme1" path="themes\theme1\dmindex.xml" />
	</themes>
</resource>

 

3.从\MyRes\themes\theme1\dmindex.xml中查找src="png:QQ"

	<png>
	        .......
		<file name="QQ" path="themes\theme1\QQ.png" />
	</png>

OK,找到图片资源路径为\MyRes\ + themes\theme1\QQ.png(如果未找到,则顺序从其他主题包查找)

 

4.如果2中name为theme0,则从从\MyRes\themes\theme0\dmindex.xml中查找src="png:QQ"

<png>	
		<file name="QQ" path="themes\theme0\image\QQ.png" />
	</png>

OK,找到图片路径为\MyRes\ + themes\theme0\image\QQ.png(如果未找到,则顺序从其他主题包查找)

  

 我们可以看出,通过改过默认主题包,实现skin图片资源的变化,从而大面积实现换肤

    

   

   

2.新建主题包

  

步骤如下:

1.右击主题包列表,选择"增加主题包",主题名和文件夹名都设置为themem1(此时会在themes文件夹下新建一个theme1文件夹)

2.右击theme1,选择增加img类型,增加"gif"和"png"两个类型(和theme0对应相同的类型)

1.gif

  

为主题包增加img,按前面的介绍,我们只需要在theme1主题包中加入对应的img,保持它们name和theme0的name相同,就可以实现换肤了(切换主题包)

2.gif

    

最后,记得ctrl+s保存下

   

  下一节教程:REDM基础教程18-换肤的几种方式

    

  

文章作者:hgy413
本文地址:http://hgy413.com/3910.html
版权所有 © 转载时必须以链接形式注明作者和原始出处!

27 Responses to “REDM设计器教程12-增加主题包”

  1. Its not my first time to visit this web page, i am visiting this web site dailly and obtain good
    facts from here everyday.

  2. #2 descargar facebook 回复 | 引用 Post:2019-08-19 02:16

    This is a topic which is near to my heart…
    Take care! Where are your contact details though?

  3. #3 quest bars cheap 回复 | 引用 Post:2019-08-24 03:37

    This is my first time pay a visit at here and i am in fact happy to read all at
    single place.

  4. #4 quest bars cheap 回复 | 引用 Post:2019-08-24 07:05

    Thanks for some other excellent article. The place else could anyone get that
    kind of info in such a perfect way of writing? I’ve a presentation next week, and I am on the search for such info.

  5. #5 minecraft games 回复 | 引用 Post:2019-09-04 09:02

    Greetings! Very helpful advice in this particular article! It is the little
    changes that produce the largest changes. Thanks for sharing!

  6. #6 quest bars cheap 回复 | 引用 Post:2019-09-06 05:36

    What i don’t realize is in reality how you are now not really a lot more neatly-liked than you might be right
    now. You’re very intelligent. You understand thus considerably in terms of this matter, made me in my opinion consider it from so many numerous angles.
    Its like men and women don’t seem to be involved except it is one thing to do with Lady
    gaga! Your own stuffs outstanding. Always deal with it up!

  7. #7 minecraft games 回复 | 引用 Post:2019-09-16 01:19

    I am really inspired along with your writing skills and also with the layout to your weblog.
    Is that this a paid theme or did you customize it yourself?

    Anyway stay up the nice high quality writing, it’s
    rare to peer a great blog like this one nowadays..

  8. #8 minecraft games 回复 | 引用 Post:2019-09-25 16:38

    Hello there! This is my first comment here so I just wanted to give
    a quick shout out and tell you I really enjoy reading through your articles.

    Can you suggest any other blogs/websites/forums that
    deal with the same subjects? Thanks!

  9. I’m impressed, I have to admit. Rarely do
    I come across a blog that’s both equally educative and entertaining, and let me
    tell you, you have hit the nail on the head. The problem is something that too few
    folks are speaking intelligently about. Now i’m very happy I stumbled across this in my search for something relating to this.

  10. Hey fantastic website! Does running a blog such as this take
    a great deal of work? I have very little knowledge of coding however I was hoping to start my own blog soon. Anyhow, should you have any recommendations or techniques for new
    blog owners please share. I know this is off subject however I just wanted to ask.

    Thanks!

  11. #11 benefits of coconut oil 回复 | 引用 Post:2019-11-04 12:33

    Fantastic items from you, man. I’ve consider your stuff previous to and you are
    simply too excellent. I actually like what you’ve received right
    here, really like what you’re saying and the best way during which
    you are saying it. You’re making it entertaining and you continue to
    care for to stay it smart. I can’t wait to read much more from you.
    This is really a terrific site.

  12. #12 benefits of coconut oil 回复 | 引用 Post:2019-11-09 05:16

    Quality articles is the crucial to invite the
    visitors to go to see the web page, that’s what this website is providing.

  13. It’s really a nice and helpful piece of information. I am
    satisfied that you shared this useful info with us.
    Please stay us up to date like this. Thanks for sharing.

  14. Hi there to all, since I am in fact eager of reading this
    web site’s post to be updated on a regular basis.
    It carries good information.

  15. #15 there coconut oil 回复 | 引用 Post:2019-11-15 19:42

    Greetings, I do think your site could possibly be having web
    browser compatibility problems. When I look at your site in Safari, it looks fine however,
    if opening in Internet Explorer, it’s got some
    overlapping issues. I simply wanted to provide you with a quick heads up!
    Aside from that, fantastic blog!

  16. I believe this is one of the such a lot significant information for
    me. And i’m satisfied studying your article.
    However want to observation on some basic issues, The website style is great, the articles
    is truly nice : D. Good process, cheers

  17. It’s difficult to find educated people for this topic, but you
    seem like you know what you’re talking about! Thanks

  18. A person essentially lend a hand to make seriously posts I might state.
    That is the very first time I frequented your website
    page and to this point? I surprised with the analysis you made to make
    this particular publish incredible. Magnificent task!

  19. #19 tinyurl.com 回复 | 引用 Post:2019-11-23 22:28

    Wow, wonderful blog layout! How lengthy have you ever been running a blog for?

    you make blogging look easy. The total glance of your web site
    is great, let alone the content material!

  20. Hello to every one, it’s truly a fastidious for me to visit this web site, it consists of useful Information.

  21. #21 ps4 games 回复 | 引用 Post:2019-11-28 13:46

    Superb, what a blog it is! This webpage gives useful facts to us, keep it
    up.

  22. #22 quest bars cheap 回复 | 引用 Post:2019-11-29 21:56

    I’m extremely impressed with your writing skills as well as with the layout on your weblog.
    Is this a paid theme or did you customize it yourself?
    Either way keep up the excellent quality writing, it is rare to see a nice
    blog like this one today.

  23. #23 quest bars cheap 回复 | 引用 Post:2019-12-01 14:54

    Can you tell us more about this? I’d love to find out more details.

  24. #24 quest bars cheap 回复 | 引用 Post:2019-12-01 19:28

    Hey there, I think your blog might be having browser compatibility issues.
    When I look at your website in Firefox, it looks fine but when opening in Internet Explorer, it has some overlapping.

    I just wanted to give you a quick heads up! Other then that, wonderful blog!

  25. #25 quest bars cheap 回复 | 引用 Post:2019-12-03 23:43

    Hola! I’ve been following your weblog for a long time now and finally got the
    courage to go ahead and give you a shout out from New Caney Tx!
    Just wanted to tell you keep up the great job!

  26. #26 ps4 games 回复 | 引用 Post:2019-12-05 20:32

    Hmm is anyone else having problems with the pictures on this blog loading?

    I’m trying to determine if its a problem on my end or if it’s
    the blog. Any responses would be greatly appreciated.

  27. #27 ps4 games 回复 | 引用 Post:2019-12-06 22:59

    Hiya very cool blog!! Guy .. Excellent .. Superb .. I will bookmark your site and take the feeds also?
    I’m satisfied to find so many useful info here within the submit, we’d like
    develop extra strategies in this regard, thanks for sharing.
    . . . . .

发表评论