我在ItemsControl中有一个复选框。它为Actor hitActor;
boolean touched;
@Override
public boolean touchDown(int screenX, int screenY, int pointer, int button) {
touched = true;
touchVector = new Vector3(screenX,screenY,0);
game.getCamera().unproject(touchVector);
hitActor = stage.hit(touchVector.x,touchVector.y,false);
}
@Override
public boolean touchDragged(int screenX, int screenY, int pointer) {
// TODO Auto-generated method stub
if(touched==true)
{
Actor hitDraggedActor;
Vector3 touchVectorDragged = new Vector3(screenX,screenY,0);
game.getCamera().unproject(touchVectorDragged);
hitDraggedActor = stage.hit(touchVectorDragged.x,touchVectorDragged.y,false);
if(hitDraggedActor!=hitActor) //<--i tried !hitDraggedActor.equals(hitActor)
{
Candy hitDraggedCandy = (Candy) hitDraggedActor;
Candy hitCandy = (Candy) hitActor;
//print attributes of hitDraggedCandy and hitCandy
// result is similar when in fact, it should not
//do something here
}
}
@Override
public boolean touchUp(int screenX, int screenY, int pointer, int button) {
touched=false;
return false;
}
和Checked
事件都有一个EventTrigger。它还绑定到具有多个UnChecked
的{{1}}。 Command
事件触发就好了。
但是,CommandParameters
事件不会触发。我错过了什么?
Checked
答案 0 :(得分:0)
正如@Bort指出的那样,事件名称应该是Unchecked
而不是UnChecked
。