user2502027
user2502027

Reputation: 21

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?

Upvotes: 2

Views: 1254

Answers (1)

Thread 3754301
Thread 3754301

Reputation: 89

It seems to take padTop (title area) as a draggable "listener", so I tried higher padtop (bag.padTop(100)) and it becomes easier to touch "title" area and drag window arround.

Upvotes: 2

Related Questions