@APPICON table @APPICON f$ (V8.0)
Starting with Hollywood 8.0 there are two different ways of using this preprocessor
command: You can either specify individual images for the different icon sizes in
a table (see below) or you can simply pass a Hollywood icon that has been created
using the SaveIcon() function to this preprocessor command.
In that case, the icon has to be passed in the f$
parameter. Specifying a single icon
instead of a whole table results in code that is more readable but of course it
requires you to generate the icon using Hollywood's SaveIcon()
command first.
If you want to pass individual images for the different icon sizes, you have
to pass a table in the table
argument to this preprocessor command. The table
can contain one or more of the following tags:
Ic16x16:
Ic16x16s:
Ic24x24:
Ic24x24s:
Ic32x32:
Ic32x32s:
Ic48x48:
Ic48x48s:
Ic64x64:
Ic64x64s:
Ic96x96:
Ic96x96s:
Ic128x128:
Ic128x128s:
Ic256x256:
Ic256x256s:
Ic512x512:
Ic512x512s:
Ic1024x1024:
Ic1024x1024s:
DefaultIcon:
Ic64x64
tag
as the default icon. The default icon is the icon that Hollywood will
show in AmiDock on AmigaOS4 if the RegisterApplication
tag in @OPTIONS
has been set to True
. Thus, currently, the DefaultIcon
tag only has an effect
on AmigaOS 4. (V6.0)
The reason why this preprocessor command does not simply accept just a single 512x512 icon and then scales it down to all other resolutions is that very small icons like 16x16 or 24x24 do not really look very good when scaled down from a larger icon. They look much better when they are handcrafted for each size. That is why this preprocessor command accepts so many different tags.
Please note that not all sizes are currently supported on all platforms but you should make sure to provide icons for all these sizes. If you leave a size out, Hollywood might fall back to its default icon (clapperboard) for the size. So if you intend to use your own icons, make sure that you always provide it in all sizes listed above.
The image file that is required as a parameter by the tags listed above should be a PNG image with alpha channel. Images without alpha channel are supported as well, but this is not recommended because it doesn't look too good.
Please note that it is mandatory to use the DefaultIcon
tag on AmigaOS 4
to indicate which icon size should be shown in AmiDock. If you do not pass
the DefaultIcon
tag, Hollywood will display its default icon in AmiDock
(the clapperboard). If you want to show an icon in AmiDock that uses a custom
size not listed above, you can use the DockyBrush
tag that is supported by
the @OPTIONS preprocessor command. See OPTIONS for details.
Please note that Hollywood supports two different docky types on AmigaOS 4:
Standard dockies and app dockies. See AmiDock information for more information on the difference between the two.
Starting with Hollywood 6.0 you can specify two images for every icon size because on AmigaOS and compatibles icons usually contain two different states whereas on all other platforms icons are just single static images. If you only target non-Amiga systems, you do not have to provide icons for the selected state because they won't be used anyway.
Alternatively, you can also use one of the -iconXXX console arguments
instead of @APPICON
.
Note that this preprocessor command currently does not have any effect on Amiga systems. If you would like to change the icon that Hollywood displays when it is minimized on Workbench, use the SetWBIcon() command.
@APPICON "icon.png"The code above sets the icon "icon.png" as the icon for the application. This icon must have been created using SaveIcon().
@APPICON {Ic16x16 = "my16x16icon.png", Ic24x24 = "my24x24icon.png", Ic32x32 = "my32x32icon.png", Ic48x48 = "my48x48icon.png", Ic64x64 = "my64x64icon.png", Ic96x96 = "my96x96icon.png", Ic128x128 = "my128x128icon.png", Ic256x256 = "my256x256icon.png", Ic512x512 = "my512x512icon.png", Ic1024x1024 = "my1024x1024icon.png"}The code above will replace all inbuilt icons with custom ones provided in the specified png images.