@mritter0
I'm using this method for creating menus in a program I'm working on and MA_Image is working just fine on my 4.1 Final Edition system.
Are you passing a valid BOOPSI image for MA_Image?
The code I'm using is:
Code: Select all
menustrip = NewObject(NULL, "menuclass", MA_Type, T_ROOT, TAG_END);
if (menustrip == NULL)
THROW();
success = DoNewMenu(menustrip,
NM_Menu, "Project", MA_ID, MID_PROJECT,
NM_Item, "Open...", MA_Key, "O", MA_ID, MID_OPEN, MA_Image, get_image("open"),
NM_Item, "Close", MA_Key, "K", MA_ID, MID_CLOSE, MA_Image, get_image("close"),
NM_Item, ML_SEPARATOR,
NM_Item, "About...", MA_Key, "?", MA_ID, MID_ABOUT, MA_Image, get_image("info"),
NM_Item, ML_SEPARATOR,
NM_Item, "Quit", MA_Key, "Q", MA_ID, MID_QUIT, MA_Image, get_image("quit"),
TAG_END);
if (success == FALSE)
THROW();
Where get_image() is:
Code: Select all
Object *XXXX::get_image(CONST_STRPTR name) {
TEXT normal_path[256];
TEXT selected_path[256];
TEXT disabled_path[256];
Strlcpy(normal_path, "tbimages:", sizeof(normal_path));
AddPart(normal_path, name, sizeof(normal_path));
Strlcpy(selected_path, normal_path, sizeof(selected_path));
Strlcat(selected_path, "_s", sizeof(selected_path));
Strlcpy(disabled_path, normal_path, sizeof(disabled_path));
Strlcat(disabled_path, "_g", sizeof(disabled_path));
return NewObject(BitMapClass, NULL,
BITMAP_Screen, screen,
BITMAP_Masking, TRUE,
BITMAP_SourceFile, normal_path,
BITMAP_SelectSourceFile, selected_path,
BITMAP_DisabledSourceFile, disabled_path,
TAG_END);
}