Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

这些组件都非常好用,但感觉管理上却不是太方便 #290

Closed
woshisheji opened this issue Jun 5, 2022 · 13 comments
Closed
Labels

Comments

@woshisheji
Copy link

组件一直在应用,感觉非常不错。
唯一感到缺陷的就是无法使用phaser自带的容器管理,每次要进行界面管理,层次排序时候都非常繁琐。

可能这些组件出现在phaser的容器之前的缘故吧

@rexrainbow
Copy link
Owner

I had used built-in container as base container class before, but it has some issues.
For example, built-in container had some input bugs before, although they were fixed.
Moreover, mask can't put inside built-in container. See this test case, enable line22-24.

@woshisheji
Copy link
Author

woshisheji commented Jun 5, 2022 via email

@rexrainbow
Copy link
Owner

After testing from your code, yes it can apply mask at correct place.
However, it force mask's position to world position, not related position based on parent-container. That's will be annoying sometimes..
Anyway, excluding the mask issue, you can put whole ui panel and its children into built-in container via uiPanel.addToContainer(p3Container), or put ui panel to layer via sizer.addToLayer(p3Container).
Layer also does not have mask issue BTW.

@woshisheji
Copy link
Author

woshisheji commented Oct 11, 2022 via email

@rexrainbow rexrainbow reopened this Oct 11, 2022
@rexrainbow
Copy link
Owner

In latest version of minify file, or npm package, you can add containerLite and its children to p3-container directly via container.add(containerLite).
See this demo, line71.

@woshisheji
Copy link
Author

woshisheji commented Oct 12, 2022 via email

@woshisheji
Copy link
Author

woshisheji commented Dec 2, 2022 via email

@rexrainbow
Copy link
Owner

Mask within built-in container is an issue of phaser3 engine, posted on there

@woshisheji
Copy link
Author

关于这个问题,我是知道的。我也想补救,但是在 ui-gridsizer与 ui-gridtable 组件中,我无法获取到掩码对象,无法将它们坐标更新。导致错位了。

@woshisheji
Copy link
Author

containerLite 无法设置深度,必须要将里面所有的对象一个个去设置,让人感觉很难受,希望后续组件都可以使用 container 来实现,这样就相当好用,其次还有一个小建议,ui-gridsizer与 ui-gridtable中,滚动条拖动一下希望是刚好一个项目的像素滚动,而不是一点点滚过去,当然这个选择可选项最好了。

@rexrainbow rexrainbow reopened this Dec 2, 2022
@rexrainbow
Copy link
Owner

Set depth of container and all children :

container.setDepth(value);

Reference

@woshisheji
Copy link
Author

经过实际使用,在当前项目的所有组件中,如果将默认的容器放到组件中,那么将会错位~ 虽然的确是可以管理,但错位问题始终无法解决,比如在 高级表格中,我创建了项目,添加进去永远是缺少了当前子项的宽度与高度的一半所在坐标位置,换rex系列的容器则没有这个问题,两个容器之间的不兼容。导致的问题太多了。如果这些组件可以换成官方的容器那该多好啊0 0

@rexrainbow
Copy link
Owner

I won't change base container (containerLite) to built-in container since they won't be compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants