【发布时间】:2018-02-04 14:35:03
【问题描述】:
我希望 LibGDX 中的触摸板旋钮能够向右或向左移动,但不能向上或向下移动。这是我的代码:
Drawable touchBackground = touchpadSkin.getDrawable("touchBackground");
touchKnob = touchpadSkin.getDrawable("touchKnob");
touchpadStyle.background = touchBackground;
touchpadStyle.knob = touchKnob;
touchKnob.setMinHeight(80);
touchKnob.setMinWidth(30);
touchpad = new Touchpad(0.1f, touchpadStyle);
touchpad.setBounds(10, 100, 130, 130);
touchpad.getResetOnTouchUp();
ScrollPane scrollPane=new ScrollPane();
touchpad.setPosition(70,70);
touchpad.setOriginX(200);
stage.addActor(touchpad);
Gdx.input.setInputProcessor(stage);
【问题讨论】:
标签: android libgdx scene2d touchpad