1
votes

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?

1
I add this "bag.setMovable(true); " but it still doesn't work. I saw the source code of Window. By default movable is true.user2502027
did you set up the input processor to the stage?Jyro117

1 Answers

1
votes

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.