简体   繁体   English

我怎样才能把演员带到凌乱的前面

[英]How can I bring an actor to front in clutter

In my clutter program written in c I have two Textures that overlap. 在我用c编写的杂乱程序中,我有两个重叠的纹理。 One of them stays the same while the program is running and the other moves in to overlap from somewhere else on the stage. 其中一个在程序运行时保持不变,另一个在舞台上的其他位置重叠。 Because the second texture was created after the first one, it covers part of it up, but I want the first Texture to stay on top. 因为第二个纹理是在第一个纹理之后创建的,所以它覆盖了部分纹理,但我希望第一个纹理保持在顶部。 How can I do this? 我怎样才能做到这一点? The only way I can think of doing it is deleting the first Texture and making a new one using exactly the same picture every time a new Texture overlaps it, but this seems very inefficient to me. 我能想到的唯一方法是删除第一个纹理,并在每次新纹理重叠时使用完全相同的图片创建一个新纹理,但这对我来说效率非常低。 Is there a function that brings an actor to the front using the clutter API? 是否有使用杂波API将演员带到前台的功能?

you can use clutter_actor_raise() and clutter_actor_lower() : 你可以使用clutter_actor_raise()clutter_actor_lower()

http://developer.gnome.org/clutter/stable/ClutterActor.html#clutter-actor-raise http://developer.gnome.org/clutter/stable/ClutterActor.html#clutter-actor-raise

if the actors belong to the same container. 如果演员属于同一个容器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM