jmonkey custom crursor

 Texture cursorTexture = assetManager.loadTexture("Textures/action.png");

                Image image = cursorTexture.getImage();

                ByteBuffer imgByteBuff = image.getData(0);

                imgByteBuff.rewind();

                IntBuffer imgIntBuff = imgByteBuff.asIntBuffer();


                JmeCursor c = new JmeCursor();

                c.setHeight(image.getHeight());

                c.setWidth(image.getWidth());

                c.setNumImages(1);

                c.setyHotSpot(image.getHeight()-3);

                c.setxHotSpot(3);

                c.setImagesData(imgIntBuff);

                

                inputManager.setMouseCursor(c);

Комментарии

Популярные сообщения из этого блога

jmonkey engine create and build andoid project

jmonkey Cloth system