简体   繁体   中英

libgdx can't drag com.badlogic.gdx.scenes.scene2d.ui.Window

I create a window ,but it can't be dragged. This is my code:

Window.WindowStyle style=new Window.WindowStyle();
style.titleFont=Context.assetMng.get("data/font/chinese.fnt", BitmapFont.class);
style.titleFontColor=Color.WHITE;
style.background=new NinePatchDrawable(new NinePatch(Context.assetMng.get("data/images/surface/window.png",Texture.class)));
bag=new Window("1111", style);
bag.padTop(10);

Can someone tell me the problem?

似乎将padTop(标题区域)作为可拖动的“侦听器”,所以我尝试使用更高的padtop(bag.padTop(100)),触摸“ title”区域和拖动窗口周围变得更加容易。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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