2
我有一個libGDX
項目,我想在其中使用多個輸入處理器。 im
是InputMultiplexer
,stage
和dialog
是Stages
。 InputController
和dialog
命名爲Stage
正在完美運行,但ImageButton
類型Actors
對stage
不起作用,單擊後無法執行任何操作。InputMultiplexer只能在舞臺上工作
im.addProcessor(stage);
im.addProcessor(inputController);
im.addProcessor(dialog);
Gdx.input.setInputProcessor(im);
什麼應該可能導致這個問題,我應該檢查什麼?
如何在這些ImageButton上實現click()事件?請顯示您的代碼 –
使用InputMultiplexer時,處理eventProcessed的問題很重要,問題可能在那裏,但如上面註釋中所述,您需要顯示更多代碼,否則無法告訴任何事情。 –
@ChanandlerBong:謝謝,問題在於事件處理,使用'ChangeListener()'它正在工作。 – plaidshirt