Cocos2D 2.1 and wide suffix(Cocos2D 2.1 及宽后缀)
问题描述
我有两个问题...
- 如何在Cocos2D 2.1 中定义iPhone5 自定义后缀?没有新的方法.
- 查看文档,我看到
suffixesDict
提到了iPhone5
和iPhone5 HD
.如果它始终是高清的,那么有iPhone5
后缀有什么意义?
- How in Cocos2D 2.1 I define iPhone5 custom suffix? There is no new method for it.
- Looking at docs I see
suffixesDict
which is mentioningiPhone5
andiPhone5 HD
. What is the point to haveiPhone5
suffix if it's always HD anyway?
推荐答案
您必须直接修改 suffixesDict
NSMutableDictionary 才能更改宽屏后缀.按照 setiPadSuffix
方法的示例.
You will have to modify the suffixesDict
NSMutableDictionary directly to change the widescreen suffix. Follow the example of the setiPadSuffix
method.
默认值为-widehd",在 v2.1 rc 和 beta 版本中它曾经是-iphone5hd".
The default is "-widehd" and it used to be "-iphone5hd" in v2.1 rc and betas.
不要问为什么会有非高清后缀-wide"——我想不出一个单一的方式为什么要使用它,而且没有没有 Retina 显示屏的宽屏设备.它可能只是由于内部代码而存在,否则会破坏为用于始终检查HD"然后回退到同一类别的SD"变体的代码.这是我可以解释它为什么存在的唯一方法.
Don't ask why there's a non-HD suffix "-wide" - I can't think of a single way why one would want to use that, and there's no widescreen device that doesn't have a Retina display. It may simply exist due to internal code otherwise breaking as the code used to always check "HD" and then fall back to the "SD" variant of the same category. That's the only way I can explain why it exists.
此外,如果应用在设计时考虑到宽屏,则很少需要-widehd"后缀本身.例如,您可以简单地在非宽屏设备上使用相同的宽屏背景图像,并允许在非宽屏设备上截取图像.
Furthermore the "-widehd" suffix in itself should be rarely needed if an app is well designed with widescreen in mind. For example you could simply use the same widescreen background image on non-widescreen devices, and allow the image to be cut off on non-widescreen devices.
这篇关于Cocos2D 2.1 及宽后缀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Cocos2D 2.1 及宽后缀
基础教程推荐
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01