Java 类com.badlogic.gdx.graphics.Cursor.SystemCursor 实例源码

项目:gaiasky    文件:OwnImageButton.java   
private void initialize() {
    if (cursorLocation == null) {
        cursor = GlobalResources.linkCursor;
    } else {
        cursor = new Pixmap(Gdx.files.internal(cursorLocation));
    }
    listeners = new DelayedRemovalArray<EventListener>();
    this.addListener(new EventListener() {
        @Override
        public boolean handle(Event event) {
            if (event instanceof InputEvent) {
                Type type = ((InputEvent) event).getType();
                if (type == Type.enter) {
                    if (!me.isDisabled())
                        Gdx.graphics.setCursor(Gdx.graphics.newCursor(cursor, 4, 0));
                    return true;
                } else if (type == Type.exit) {
                    Gdx.graphics.setSystemCursor(SystemCursor.Arrow);
                    return true;
                }

            }
            return false;
        }
    });
}
项目:gaiasky    文件:OwnTextButton.java   
private void initialize() {
    this.addListener(new EventListener() {
        @Override
        public boolean handle(Event event) {
            if (event instanceof InputEvent) {
                Type type = ((InputEvent) event).getType();
                if (type == Type.enter) {
                    if (!me.isDisabled())
                        Gdx.graphics.setCursor(Gdx.graphics.newCursor(cursor != null ? cursor : GlobalResources.linkCursor, 4, 0));
                    return true;
                } else if (type == Type.exit) {
                    Gdx.graphics.setSystemCursor(SystemCursor.Arrow);
                    return true;
                }

            }
            return false;
        }
    });
}
项目:gaiasky    文件:Link.java   
private void initialize() {
    this.addListener(new EventListener() {
        @Override
        public boolean handle(Event event) {
            if (event instanceof InputEvent) {
                Type type = ((InputEvent) event).getType();
                // Click
                if (type == Type.touchUp && ((InputEvent) event).getButton() == Buttons.LEFT) {
                    Gdx.net.openURI(linkURL);
                } else if (type == Type.enter) {
                    Gdx.graphics.setCursor(Gdx.graphics.newCursor(GlobalResources.linkCursor, 4, 0));
                } else if (type == Type.exit) {
                    Gdx.graphics.setSystemCursor(SystemCursor.Arrow);
                }
                return true;
            }
            return false;
        }
    });
}
项目:gaiasky    文件:ChooseDatasetWindow.java   
@Override
protected void accept() {
    // Update setting
    for (Button b : cbs) {
        if (b.isChecked()) {
            GlobalConf.data.CATALOG_JSON_FILE = candidates.get(b);
            break;
        }
    }
    // No change to execute exit event, manually restore cursor to default
    Gdx.graphics.setSystemCursor(SystemCursor.Arrow);
    // Data load can start
    EventManager.instance.post(Events.LOAD_DATA_CMD);
}
项目:ZombieInvadersVR    文件:CardBoardGraphics.java   
@Override
public void setSystemCursor(SystemCursor systemCursor) {
    // TODO Auto-generated method stub

}
项目:skin-composer    文件:IbeamListener.java   
@Override
public void exit(InputEvent event, float x, float y, int pointer, Actor toActor) {
    Gdx.graphics.setSystemCursor(SystemCursor.Arrow);
}
项目:skin-composer    文件:IbeamListener.java   
@Override
public void enter(InputEvent event, float x, float y, int pointer, Actor fromActor) {
    Gdx.graphics.setSystemCursor(SystemCursor.Ibeam);
}
项目:mini2Dx    文件:IOSMini2DxGraphics.java   
@Override
public void setSystemCursor (SystemCursor systemCursor) {
}
项目:mini2Dx    文件:Mini2DxMockGraphics.java   
@Override
public void setSystemCursor (SystemCursor systemCursor) {
}
项目:ProjektGG    文件:CursorManager.java   
/**
 * Resets the cursor image to the default one.
 * 
 * @see SystemCursor#Arrow
 */
public void resetCursorImage() {
    Gdx.graphics.setSystemCursor(Cursor.SystemCursor.Arrow);
}