Restructured the images for ImageButton:
[AROS.git] / workbench / prefs / time / misc.c
blobb125b47ddc9d69a1e3bd7297fdb36350620a7f52
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 /*********************************************************************************************/
11 #include "global.h"
12 #include "version.h"
14 #include <exec/rawfmt.h>
16 /*********************************************************************************************/
18 struct NewMenu nm[] =
20 {NM_TITLE, (STRPTR)MSG_MEN_PROJECT },
21 {NM_ITEM, (STRPTR)MSG_MEN_PROJECT_QUIT },
22 {NM_TITLE, (STRPTR)MSG_MEN_EDIT },
23 {NM_ITEM, (STRPTR)MSG_MEN_EDIT_RESTORE },
24 {NM_END }
27 /*********************************************************************************************/
29 void InitMenus(void)
31 struct NewMenu *actnm = nm;
33 for(actnm = nm; actnm->nm_Type != NM_END; actnm++)
35 if (actnm->nm_Label != NM_BARLABEL)
37 ULONG id = (ULONG)(IPTR)actnm->nm_Label;
38 STRPTR str = MSG(id);
40 if (actnm->nm_Type == NM_TITLE)
42 actnm->nm_Label = str;
44 else
46 actnm->nm_Label = str + 2;
47 if (str[0] != ' ') actnm->nm_CommKey = str;
49 actnm->nm_UserData = (APTR)(IPTR)id;
51 } /* if (actnm->nm_Label != NM_BARLABEL) */
53 } /* for(actnm = nm; nm->nm_Type != NM_END; nm++) */
57 /*********************************************************************************************/
59 void my_sprintf(UBYTE *buffer, UBYTE *format, ...)
61 va_list args;
63 va_start(args, format);
64 VNewRawDoFmt(format, RAWFMTFUNC_STRING, buffer, args);
65 va_end(args);
68 /*********************************************************************************************/