Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.sys.apple2    |    Discussion about Apple II micros    |    56,720 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 55,937 of 56,720    |
|    Kelvin Sherlock to All    |
|    Re: toolbox alert with resources    |
|    27 Nov 22 18:10:43    |
   
   From: kelvin@pro-kegs.uucp   
      
   Another option would be to replace the rAlertString rez definition:   
      
   (don't update types.rez, just put this in your rez file before using it.   
   There will be a warning about the redefinition but compile rez=(-rd) will   
   disable it).   
      
   type rAlertString {   
      
    switch {   
    case sizeCustom:   
    key byte = 0x30;   
    rect;   
    case size30: key byte = 0x31;   
    case size60: key byte = 0x32;   
    case size110: key byte = 0x33;   
    case size175: key byte = 0x34;   
    case size110: key byte = 0x35;   
    case siz140: key byte = 0x36;   
    case size200: key byte = 0x37;   
    case size250: key byte = 0x38;   
    case size300: key byte = 0x39;   
    };   
      
    switch {   
    case iconNone: key byte = 0x30;   
    case iconCustom:   
    key byte = 0x31;   
    longint;   
    int;   
    int;   
    case iconStop: key byte = 0x32;   
    case iconNote: key byte = 0x33;   
    case iconCaution: key byte = 0x34;   
    case iconDisk: key byte = 0x35;   
    case iconDiskSwap: key byte = 0x36;   
    };   
      
    string;   
    string = $"00";   
   };   
      
   Example usage:   
      
   resource rAlertString (3) {   
      
    sizeCustom { { 12, 34, 56, 78 }},   
    iconNone {} ,   
    "/abc/#0"   
   };   
      
   resource rAlertString (4) {   
    size30 {},   
    iconCustom { 12, 20, 40 } ,   
    "/abc/#0"   
   };   
      
   Note the empty {} are required even if it's a standard size or icon. The   
   trailing $00 terminator is automatically provided.   
      
   -------   
   ProLine: kelvin@pro-kegs   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca