Set Desktop Icon

Anything libgdx related goes here!

Set Desktop Icon

Postby spacetractor » Sat Jul 26, 2014 1:14 am

Is there a way to replace the default java icon? I've tried to make it a boundle app and set the icon on the boundle, but as soon the java program is executed my boundle icon gets replaced by default java icon.

Code: Select all
config.addIcon("imgs/DesktopIcon.png", FileType.Internal);
Is no useful neither, or else I've got that wrong.


Image
spacetractor
 
Posts: 10
Joined: Sun Jul 20, 2014 1:26 am

Re: Set Desktop Icon

Postby Pinkie Swirl » Sat Jul 26, 2014 1:23 am

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).

I only tested it with windows, but providing all three icon sizes worked.
Pinkie Swirl
 
Posts: 814
Joined: Thu Sep 20, 2012 8:55 pm

Re: Set Desktop Icon

Postby spacetractor » Sat Jul 26, 2014 1:27 am

Pinkie Swirl wrote:I have no mac, but it works on windows for me.


Would it make a desktop icon for you as well? or just an icon in top of the window frame? I've all those 3 size's so should pick which ever it needs.. Hmm
spacetractor
 
Posts: 10
Joined: Sun Jul 20, 2014 1:26 am

Re: Set Desktop Icon

Postby Pinkie Swirl » Sat Jul 26, 2014 1:38 am

Ah, ok I think I missunderstood you, so you want that the jar file looks different?

The icon you set in the launcher changes the task bar icon when the program is launched and the small icon in the upper left corner when you have a decorated window for me.

To change the jar file icon you need to wrap it in a platform specific executable and give that one an icon.
Pinkie Swirl
 
Posts: 814
Joined: Thu Sep 20, 2012 8:55 pm

Re: Set Desktop Icon

Postby Nagi » Sat Jul 26, 2014 8:28 pm

For both Win & Mac you have to do as Pinkie Swirl says. For Windows change the EXE icon with a software such as Resource Hacker. For Mac you can use appbundler which allows you to set an icon.
Programmer's apprentice at IKIGames - @superikigames
Nagi
 
Posts: 13
Joined: Mon Dec 03, 2012 10:53 am
Location: Deep in the far away Caribbean

Re: Set Desktop Icon

Postby CoDi » Sun Jul 27, 2014 10:54 pm

config.addIcon() makes LWJGL call Display.SetIcon() at window creation, which doesn't do anything on Mac OS.
Robotality - steamworks4j - @code_disaster - codi^r @ #libgdx
CoDi
 
Posts: 207
Joined: Sun Nov 24, 2013 11:55 am
Location: Hamelin, Germany

Re: Set Desktop Icon

Postby Pinkie Swirl » Mon Jul 28, 2014 5:58 pm

Indeed it does nothing and the comment is that mac osx doesn't have window icons.

Since I don't own one I can just guess that the icon in this bar must be set with the appbundler? Sorry, can't help you any better.
Pinkie Swirl
 
Posts: 814
Joined: Thu Sep 20, 2012 8:55 pm


Return to Libgdx

Who is online

Users browsing this forum: MSN [Bot] and 1 guest