[英]Swiping between screens using Scene2d
I am quite familiar with scene2d now, but there is one thing I need to know before I create my full menu, how do I swipe between windows? 我现在对Scene2d非常熟悉,但是在创建完整菜单之前我需要了解一件事,如何在窗口之间滑动?
Say I have a main window where I start games etc., then I swipe to the right and get a window with options, or I swipe left and get my friends-list. 假设我有一个主窗口,可以在其中启动游戏等,然后向右滑动并获得带有选项的窗口,或者向左滑动并获得我的朋友列表。
I am wondering, is this done using one Screen
and several tables, or is it usually done using several Screens
? 我想知道,这是使用一个Screen
和几个表完成的,还是通常使用多个Screens
来完成? That is, each window is it's own Screen
and when I swipe I switch Screens
? 也就是说,每个窗口都是它自己的Screen
,当我滑动时切换Screens
? Or is it done all in one Screen, placing tables outside the viewport that u can then swipe to without changing Screen
? 还是在一个屏幕上完成所有操作,将表格放置在视口之外,然后您就可以在不更改Screen
情况下滑动到该Screen
?
Hope I'm being clear. 希望我很清楚。
As you want to swipe, to switch to options/friendlist, i guess you should use 1 Screen
with multiple Table
s on it. 当您要滑动时,要切换到选项/好友列表,我想您应该使用1 Screen
并带有多个Table
。 That is because if the user has to swipe to switch to options/friendlist, he expects a smooth "movement" to the left/right, not an instant switch. 那是因为如果用户必须滑动才能切换到选项/好友列表,他希望向左/向右平滑地“移动”,而不是立即切换。
If you instead use buttons (Options-button), you could sepparate them into different Screen
s and when the button is pressed, you swithc to the new Screen
. 如果改用按钮(Options-button),则可以将它们分成不同的Screen
,当按下按钮时,将切换到新的Screen
。
So i guess it depends on the case and your personal taste. 所以我想这取决于情况和您的个人喜好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.