I am trying to setup an application icon from the -desktop specific class with:
package org.osgameseed.games.animalflip;
import com.badlogic.gdx.Files;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
public class Main {
public static void main(String[] args) {
LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
cfg.title = "AnimalFlip";
cfg.useGL20 = false;
cfg.width = 800;
cfg.height = 600;
cfg.addIcon("data/ic_launcher.png", Files.FileType.Internal);
new LwjglApplication(new AnimalFlipGame(), cfg);
}
}
The icon is not set (at least on Linux), any idea on how to set it ?
Take a look into the api (addIcon(...)):
Adds a window icon. Icons are tried in the order added, the first one that works is used. Typically three icons should be provided: 128x128 (for Mac), 32x32 (for Windows and Linux), and 16x16 (for Windows).
Maybe your icon has the wrong dimensions, so it won't get set. Else it should work!
Just to mention you just set the small icon in the left upper edge (if the application is started) with it not the icon you would see at the desktop!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With