Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#253 closed enhancement (fixed)

Add icon support for MUI_Request

Reported by: Andreas Falkenhahn Owned by: Thore Böckelmann
Priority: normal Milestone: 4.0-2015R3
Component: muimaster.library Version: 4.0-nightly build
Severity: minor Keywords:
Cc: OS Platform: All
Blocked By: Blocking:
Release Notes:

Added support for automatic and specific requester images.


Most operating systems (including AmigaOS 4) support several kinds of icons for its standard requesters. These mostly include: information, question, error, and warning icons.

MUI should support these icon types, too, so that there is a consistent look and people don't have to build their own custom requesters any longer if they want to have an icon next to the requester text.

The "flags" parameter of MUI_Request() could be used to configure the desired icon type.

Attachments (1)

main.c (2.7 KB) - added by Andreas Falkenhahn 5 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 5 years ago by Thore Böckelmann

Milestone: foofuture release

comment:2 Changed 5 years ago by Thore Böckelmann

Milestone: future release4.0-2015R3
Priority: undecidednormal
Status: newaccepted

comment:3 Changed 5 years ago by Thore Böckelmann

This request really sounds reasonable. I just have to check out which images to distribute for AmigaOS3. For AmigaOS4 the system's default images will be used.

comment:4 Changed 5 years ago by Thore Böckelmann

Owner: set to Thore Böckelmann
Status: acceptedassigned

comment:5 Changed 5 years ago by Thore Böckelmann

Resolution: fixed
Status: assignedclosed

In 4925:

  • masterreq.c: added support for requester images in MUI_Request(). The image type can be specified by the formerly unused "flags" variable. The former suggested default value of zero will let MUI_Request() decide automatically whether to use the "Info" or "Question" style image depending on the number of specified buttons. This way all "old" requesters will automatically get a suitable image, while a specific image can be set for still developed applications. For AmigaOS4 the default system images located in SYS:Prefs/Presets/Requester will be used. For AmigaOS3 the images will be loaded from MUI:Images/requester. The supplied images were designed by Martin 'mason' Merz with explicit permission to distribute them with MUI. This closes #253.

comment:6 Changed 5 years ago by Thore Böckelmann

Release Notes: modified (diff)

comment:7 Changed 5 years ago by Andreas Falkenhahn

I noticed that this doesn't seem to work on OS4.

Furthermore, the nightly build archives for OS3 don't contain the MUI:Images/requester directory.

comment:8 Changed 5 years ago by Thore Böckelmann

Please provide an example. For me all requesters contain the correct images.

The AmigaOS3 build does not contain any image files, because it uses fixed embedded images. The original commit indeed used external images, too, but it turned out that too many people had non-working PNG datatypes installed and ended up with the typical magenta background. Hence the switch to embedded images later.

Only the AmigaOS4 build uses the default system images in SYS:Prefs/Presets.

Last edited 5 years ago by Thore Böckelmann (previous) (diff)

comment:9 Changed 5 years ago by Andreas Falkenhahn

Well, an example is not really necessary because it just doesn't work here and it's just a single line of code, namely:

MUI_Request(app, NULL, 1, "Test", "OK", "Hello World");

This code shows "Hello World", but no icon. It works on OS3 but not on OS4. Tested with the latest nightly.

For completeness' sake I'm attaching the full code to this mail but it's basically just another program in which I simply added this line.

Changed 5 years ago by Andreas Falkenhahn

Attachment: main.c added

comment:10 Changed 5 years ago by Thore Böckelmann

In 5076:

  • masterreq.c: added the missing "§NOTILING=1" extension to the image specs for the AmigaOS4 build. This refs #253.

comment:11 Changed 5 years ago by Thore Böckelmann

Sorry, this was my fault. The original image specs had the ".mi1" extension to decleare the images as non-tilable. However, when I separated the AmigaOS3 and AmigaOS4 builds the extensions were removed for the AmigaOS4 build and the images were forced to be tiled because of thei name. But tiled images are unsuitable as requester image and hence are not displayed as such. This is fixed now.

Note: See TracTickets for help on using tickets.