/** * Set custom icons to the window of this application. */ protected void setWindowIcon(final AppSettings settings) { final Object[] icons = settings.getIcons(); if (icons == null) return; final GLFWImage[] images = imagesToGLFWImages(icons); try (final GLFWImage.Buffer iconSet = GLFWImage.malloc(images.length)) { for (int i = images.length - 1; i >= 0; i--) { final GLFWImage image = images[i]; iconSet.put(i, image); } glfwSetWindowIcon(window, iconSet); } }
/** * Set custom icons to the window of this application. */ protected void setWindowIcon(final AppSettings settings) { final Object[] icons = settings.getIcons(); if (icons == null) return; final GLFWImage[] images = imagesToGLFWImages(icons); try (final GLFWImage.Buffer iconSet = GLFWImage.malloc(images.length)) { for (int i = images.length - 1; i >= 0; i--) { final GLFWImage image = images[i]; iconSet.put(i, image); } glfwSetWindowIcon(window, iconSet); } }