简体   繁体   English

libgdx:如何实现对话框?

[英]Libgdx: how to implement a dialog?

good day sirs. 美好的先生 I've been struggling with this dialog because it keeps on saying I should have a table skin for my table but I'm not even using a table. 我一直在为这个对话框而苦苦挣扎,因为它一直在说我应该为我的桌子准备一张桌子皮肤,但我什至没有使用桌子。 However I have a skin ".atlas" file which contains packed images for my graphical user interface such as windows buttons. 但是,我有一个皮肤“ .atlas”文件,其中包含用于图形用户界面(例如Windows按钮)的打包图像。

Is there any way I could resolve this problem?aside from ".json" is there anyway? 有什么办法可以解决这个问题?除了“ .json”之外,还有吗?

My modal dialog worked using another stage. 我的模态对话框使用了另一个阶段。 When I wanted to show it, I changed the InputProcessor to my dialogs internal stage so other GUI objects couldn't respond to user input outside the dialog. 当我想显示它时,我将InputProcessor更改为对话框的内部阶段,以便其他GUI对象无法响应对话框外部的用户输入。

I found LIBGDX's dialogs overkill for my purposes. 我发现LIBGDX的对话框出于我的目的而过分杀伤。 Perhaps you need a skin for your dialog? 对话可能需要皮肤吗? If not I'd just go with my approach. 如果没有的话,我会坚持下去。 You could always use a texture atlas instead. 您始终可以使用纹理图集代替。 It can function much like a skin as strings are used to reference regions of an image. 它可以像皮肤一样工作,因为字符串用于引用图像的区域。

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

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