方向问题 - palm pre webos

发布于 2024-08-16 20:50:50 字数 275 浏览 1 评论 0原文

只是几个简单的问题...希望回答起来并不难!

如何设置场景之间允许的方向?

我可以使用以下方法将其设置为整个舞台:

this.controller.setWindowOrientation("free");

但我希望能够为每个场景设置它,其中一些我不需要任何旋转......

有什么想法吗?

另外,有什么方法可以将方向限制为向上和向下(纵向和反向纵向)并且在横向上不旋转?

非常感谢

TheBounder。

Just a couple of quick questions...not too hard to answer hopefully!

How do I set the allowed orientation from scene to scene?

I can set it for the entire stage with:

this.controller.setWindowOrientation("free");

but I want to be able to set it for each scene, some of which I don't want any rotation...

Any ideas?

Also, is there any way to restrict the orientation to just up and down (portrait and reverse portrait) and not have a rotation on landscape?

Many thanks

TheBounder.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

給妳壹絲溫柔 2024-08-23 20:50:50

1)在要设置方向的场景中使用以下代码

if (this.controller.stageController.setWindowOrientation) {
this.controller.stageController.setWindowOrientation("自由");
2

)对于你的第二个问题,设置方向只有左右才有效

1)use the following code in scenes which one you want to set orientation

if (this.controller.stageController.setWindowOrientation) {
this.controller.stageController.setWindowOrientation("free");
}

2) for your second question set the orientation left and right only it will work

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文