I have met a special about MouseEvent

Dear,

I use the screen.parseLayout to init the tonegodgui layout, it is good but i had met some problem:
while use call the parseLayout to load a file:

[java]
class state extends AbstractAppState{
screen = new Screen(Application);
{
screen.parseLayout("*.gui.xml", this);
}
}
[/java]

The mouse invoke use the:
[java]
public void onButtonMouseLeftDown(MouseButtonEvent evt, boolean toggled) {
//do some
}
[/java]

but is you define several state such as
[java]
class stateA extends AbstractAppState{
screen = new Screen(Application);
{
screen.parseLayout(“A.gui.xml”, this);
}
}
[/java]
[java]
class stateB extends AbstractAppState{
screen = new Screen(Application);
{
screen.parseLayout(“B.gui.xml”, this);
}
}
[/java]
the onButtonMouseLeftDown function is always can’t be invoked in second stateB

But i had found the solved is you can use this:
Application.getInputManager().clearRawInputListeners();
before new Screen, like:
[java]class stateB extends AbstractAppState{
Application.getInputManager().clearRawInputListeners();
screen = new Screen(Application);
{
screen.parseLayout(“B.gui.xml”, this);
}
}[/java]