Farbflash projects: Imaging lingo table | 3-D scene list | Find all | Handler menu | Lingo message window

Changeset 18


Ignore:
Timestamp:
10/24/08 12:12:09 (3 years ago)
Author:
alex
Message:

updated movie to incorporate new version of library scripts

Location:
trunk/lingosource
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/lingosource/castlib1/memberInfo.xml

    r14 r18  
    55                <comments>~/Documents/Scripts/lingo/defaultLayoutDefinitions.ls</comments> 
    66                <memberName>defaultLayoutDefinitions</memberName> 
    7                 <fName>defaultLayoutDefinitions</fName> 
     7                <fname>defaultLayoutDefinitions</fname> 
    88        </defaultLayoutDefinitions> 
    99        <thisMovieScript> 
     
    1111                <comments></comments> 
    1212                <memberName>thisMovieScript</memberName> 
    13                 <fName>thisMovieScript</fName> 
     13                <fname>thisMovieScript</fname> 
    1414        </thisMovieScript> 
    1515        <tempTextMem> 
     
    1717                <comments></comments> 
    1818                <memberName>tempTextMem</memberName> 
    19                 <fName>tempTextMem</fName> 
     19                <fname>tempTextMem</fname> 
    2020        </tempTextMem> 
    2121        <sceneGraphExplorer> 
     
    2323                <comments></comments> 
    2424                <memberName>sceneGraphExplorer</memberName> 
    25                 <fName>sceneGraphExplorer</fName> 
     25                <fname>sceneGraphExplorer</fname> 
    2626        </sceneGraphExplorer> 
    2727        <renamerField> 
     
    2929                <comments></comments> 
    3030                <memberName>renamerField</memberName> 
    31                 <fName>renamerField</fName> 
     31                <fname>renamerField</fname> 
    3232        </renamerField> 
    3333        <unfloatBeaver> 
     
    3535                <comments></comments> 
    3636                <memberName>unfloatBeaver</memberName> 
    37                 <fName>unfloatBeaver</fName> 
     37                <fname>unfloatBeaver</fname> 
    3838        </unfloatBeaver> 
    3939</Untitled> 
  • trunk/lingosource/castlib2/ButtonManagerHost.ls

    r14 r18  
    1 -- Button Behavior by Alex da Franca ©2003 da.Franca@online.de 
     1-- Button Behavior by Alex da Franca c2003 da.Franca@online.de 
    22-------------------------------------------------------------------- 
    33 
     
    8383on beginSprite me 
    8484   
    85   --  includes = (mGetAleXtras()).getaprop(#scripts) 
    86   --   
    87   --  ancestor = rawnew(includes.getaprop(#ButtonManager)) 
    88    
    8985   
    9086  scr = mGetXScript(#ButtonManager) 
    9187   
    92   if voidP(scr) then exit 
     88  if listP(scr) then exit 
     89  if ilk(scr) = #script then ancestor = rawnew(scr) 
     90  else ancestor = rawnew(scr.script) 
    9391   
    94   ancestor = rawnew(scr) 
    9592   
    9693  callAncestor(#new, me) 
     
    137134  liste = [:] 
    138135   
    139   --  includes = (mGetAleXtras()).getaprop(#scripts) 
    140   --  if voidP(includes) then 
    141   --    li = mGetAleXtras() 
    142   --    includes = [:] 
    143   --    li.setaprop(#scripts, includes) 
    144   --  end if 
    145   cmonm = mGetXScript(#commonmoviescript) 
    146   if not voidP(cmonm) then fontliste = call(#InitFonts, [cmonm]) 
     136  cmonm = mGetXScript() 
     137  if not voidP(cmonm) then fontliste = call(#InitFonts, cmonm) 
    147138   
    148139  if not listP(fontliste) then fontliste = ["Arial"] 
  • trunk/lingosource/castlib2/HierarchicalMenuManager_1.ls

    r15 r18  
    1 -- Manager Behavior for Hierarchical Menu by Alex da Franca ©2004 da.Franca@online.de 
     1-- Manager Behavior for Hierarchical Menu by Alex da Franca c2004 da.Franca@online.de 
    22----------------------------------------------------------------------------------- 
    33-- 
     
    13081308     
    13091309    tscr = mGetXScript(#Alex_HierMenuParent) 
    1310     if not(voidP(tscr)) then pMyHierMenu =  new(tscr) 
     1310    if not(listP(tscr)) then 
     1311      if ilk(tscr) = #instance then tscr = tscr.script 
     1312      pMyHierMenu =  new(tscr) 
     1313    end if 
    13111314     
    13121315  end if 
  • trunk/lingosource/castlib2/ToolTipBeaver_1Host.ls

    r14 r18  
    11-- ToolTip Behavior 
    2 -- by Alex da Franca ©2001   da.franca@online.de 
     2-- by Alex da Franca c2001   da.franca@online.de 
    33-- drag this behavior onto any sprite with the provided "ttimageSave" bitmap member 
    44-- customize the background color and the frame color of the tooltip by altering "ttimageSave" 
     
    5353on beginsprite me 
    5454   
    55   includes = (mGetAleXtras()).getaprop(#scripts) 
    56    
    57   ancestor = rawnew(includes.getaprop(#ToolTipBeaver_1)) 
     55  scr = xscr(#ToolTipBeaver_1) 
     56  if listP(scr) then exit 
     57  if ilk(scr) = #instance then scr = scr.script 
     58  ancestor = rawnew(scr) 
    5859  callAncestor(#new, me) 
    5960   
  • trunk/lingosource/castlib2/ToolTipSpriteBehavior_1.ls

    r14 r18  
    1313on beginSprite me 
    1414   
    15   pIncludes = (mGetAleXtras()).getaprop(#scripts) 
     15  pIncludes = [:] 
     16  pIncludes.setaprop(#commonmoviescript, xscr()) 
    1617   
    1718  pKanal = sprite(me.spritenum) 
     
    6667 
    6768on mouseLeave me 
    68   spr = call(#mGetKanal, [pIncludes.getaprop(#commonmoviescript)], #tooltipHG) 
     69  spr = call(#mGetKanal, pIncludes.getaprop(#commonmoviescript), #tooltipHG) 
    6970  if spr > 0 then ro = rollover(spr) 
    7071  else ro = 0 
     
    9495 
    9596on mHideMyTT me 
    96   sendSprite(call(#mGetKanal, [pIncludes.getaprop(#commonmoviescript)], #tooltipHG), #mHideToolTip) 
     97  sendSprite(call(#mGetKanal, pIncludes.getaprop(#commonmoviescript), #tooltipHG), #mHideToolTip) 
    9798end 
    9899 
  • trunk/lingosource/castlib2/aleXtraLoader.ls

    r14 r18  
    6868      else 
    6969         
    70         mediaList = mGetAleXtras() 
    71          
    72         theScripts = mediaList.getaprop(#scripts) 
    73         if ilk(theScripts) <> #proplist then 
    74           theScripts = [:] 
    75           mediaList.setaprop(#scripts, theScripts) 
    76         end if 
    77          
    78         theBitmaps = mediaList.getaprop(#bitmaps) 
    79         if ilk(theBitmaps) <> #proplist then 
    80           theBitmaps = [:] 
    81           mediaList.setaprop(#bitmaps, theBitmaps) 
    82         end if 
    83          
    84         tell sprite(me.spritenum) 
    85           cl = the number of castlibs 
    86           repeat with n = 1 to cl 
    87             num = the number of members of castlib cl 
    88             repeat with m = 1 to num 
    89               mem = member(m,n) 
    90               if length(mem.name) > 0 then 
    91                 if mem.type = #script then 
    92                   theScripts.setaProp(symbol(mem.name), mem.script) 
    93                 else if mem.type = #bitmap then 
    94                   theBitmaps.setaProp(symbol(mem.name), mem.image.duplicate()) 
    95                 end if 
    96               end if 
    97             end repeat 
    98           end repeat 
    99         end tell 
    100          
    101         --        ----------------------------------------------------------- 
    102         --        -- -- -- Debugging mode: 
    103         --         
    104         --                    mLoadScripts 
    105         --         
    106         --        -- // Debugging mode 
    107         --        ----------------------------------------------------------- 
     70        mLoadScriptsFromLDM me.spritenum 
    10871         
    10972        pLoaded = 1 
    110          
    111          
    11273         
    11374      end if 
  • trunk/lingosource/castlib2/aleXtrasMovieScript.ls

    r14 r18  
    1 -- LDM Xtras Moviescript -- ©05 Alex da Franca -- alex@farbflash.de 
     1-- aleXtrasMovieScript 
    22--------------------------------------------------------------------- 
    3  
    4 -- Requires: 
    5 -- nothing 
    6  
    7 -- Purpose: 
     3-- CREATED: 
     4-- 2005 
     5-- 
     6-- PROPERTIES: 
     7--!memberProperties: [#name: "aleXtrasMovieScript", #scripttype: #movie, #scriptSyntax: #lingo, #comments:"~/Documents/Scripts/lingo/aleXtrasMovieScript.ls"] 
     8-- 
     9-- DESCRIPTION: 
     10--             -- LDM Xtras Moviescript -- c05 Alex da Franca -- alex@farbflash.de 
    811-- store instances of scripts and bitmaps in a 'global' list (-> property pAleXtras) 
    912-- and provide access to them for all scripts 
    10  
    11 -- Usage: 
    12 -- put it in one of your castlib, DON'T RENAME MEMBER !! 
     13-- 
     14-- REQUIRES: 
     15--            script "commonmoviescript" 
     16-- 
     17-- USAGE: 
     18--            put it in one of your castlib, DON'T RENAME THIS MEMBER !! 
     19--            use xscr(<name of script as symbol>) to get a reference to the script from 
     20--            every script of the movie. It will return an instance of the script 
     21-- 
     22-- PARAMS: 
     23-- - 
     24-- 
     25-- RETURNS: 
     26-- - 
     27-- 
     28-- WARNINGS: 
     29-- - 
     30-- 
     31-- TODO: 
     32--              - 
     33----------------------------------- 
    1334 
    1435property pAleXtras 
    1536 
    1637on mGetAleXtras 
     38   
     39  alextras = (script "aleXtrasMovieScript").pAleXtras 
     40  if not(objectP(alextras)) then 
     41     
     42    cms = member("commonMovieScript") 
     43    if ilk(cms) <> #member then 
     44      alert "Script commonMovieScript missing, can't proceed" 
     45      halt 
     46    end if 
     47    if cms.type <> #script then 
     48      alert "Script commonMovieScript missing, can't proceed" 
     49      halt 
     50    end if 
     51    alextras = rawnew(cms.script) 
     52    if ilk(alextras) <> #instance then 
     53      alert "Script" & QUOTE & "commonMovieScript" & QUOTE && "is missing. This movie can't proceed!" 
     54      halt 
     55    end if 
     56    (script "aleXtrasMovieScript").pAleXtras = alextras 
     57  end if 
     58  return alextras 
     59  ----------------------------- 
     60   
    1761  alextras = (script "aleXtrasMovieScript").pAleXtras 
    1862  if voidP(alextras) then 
     
    2670 
    2771on xscr scrName 
     72  ----------------------------------- 
     73  --         CREATED: 11.02.2008 
     74  --         ACTION: Description 
     75  --         INPUT: - 
     76  --         RETURNS: - 
     77  --         CALLER: - 
     78  --         DEBUG: - 
     79  --         TODO: - 
     80  ----------------------------------- 
     81   
    2882  return mGetXScript(scrName) 
    2983end 
     
    3286 
    3387on mGetXScript scrName 
     88  ----------------------------------- 
     89  --         CREATED: 11.02.2008 
     90  --         ACTION: Description 
     91  --         INPUT: - 
     92  --         RETURNS: - 
     93  --         CALLER: - 
     94  --         DEBUG: - 
     95  --         TODO: - 
     96  ----------------------------------- 
     97   
     98  alextras = mGetAleXtras() 
     99  scrName = string(scrName) 
     100  if length(scrName) < 1 then return alextras 
     101  if scrName = "commonMovieScript" then return alextras 
     102   
     103  inst = alextras.mGetInstance(scrName, 1) 
     104  if ilk(inst) <> #instance then 
     105    if the runmode contains "aut" then 
     106      put "Script" && QUOTE & scrName & QUOTE && "is missing! This may cause unwanted behavior" 
     107    end if 
     108      inst = [] 
     109    end if 
     110  return inst 
     111  ---------------------- 
     112   
     113   
    34114  scrName = symbol(scrName) 
    35115  if ilk(scrName) <> #symbol then scrName = #commonmoviescript 
     
    61141 
    62142on mLoadScripts cls 
     143  ----------------------------------- 
     144  --         CREATED: 11.02.2008 
     145  --         ACTION: Description 
     146  --         INPUT: - 
     147  --         RETURNS: - 
     148  --         CALLER: - 
     149  --         DEBUG: - 
     150  --         TODO: - 
     151  ----------------------------------- 
     152  exit 
     153   
    63154   
    64155  mediaList = mGetAleXtras() 
     
    106197on mLoadXScript whichName 
    107198   
     199  exit 
     200   
     201   
    108202  whichName = string(whichName) 
    109203  if length(whichName) < 1 then return 0 
     
    130224 
    131225on mLoadScriptsFromLDM whichSprite 
     226   
     227  includes = [:]  
     228   
     229  tell sprite(whichSprite) 
     230    cl = the number of castlibs 
     231    repeat with n = 1 to cl 
     232      num = the number of members of castlib cl 
     233      repeat with m = 1 to num 
     234        mem = member(m,n) 
     235        if length(mem.name) > 0 then 
     236          if mem.type = #script then 
     237            includes.setaProp(symbol(mem.name), rawNew(mem.script)) 
     238          end if 
     239        end if 
     240      end repeat 
     241    end repeat 
     242  end tell 
     243   
     244  cms = includes.getaprop(#commonMovieScript) 
     245  if not(objectP(cms)) then 
     246    cms = member("commonMovieScript") 
     247    if ilk(cms) <> #member then 
     248      alert "Script commonMovieScript missing, can't proceed" 
     249      halt 
     250    end if 
     251    if cms.type <> #script then 
     252      alert "Script commonMovieScript missing, can't proceed" 
     253      halt 
     254    end if 
     255    cms = rawnew(cms.script) 
     256  end if 
     257   
     258  (script "aleXtrasMovieScript").pAleXtras = cms 
     259   
     260  globs = cms.mGetGlobalList() 
     261  incl = globs[#gParentScriptInstances] 
     262  if not(objectP(incl)) then 
     263    incl = [:] 
     264    globs[#gParentScriptInstances] = incl 
     265  end if 
     266   
     267  repeat with n = count(incl) down to 1 
     268    includes.setaprop(incl.getPropAt(n), incl[n]) 
     269  end repeat 
     270  includes.deleteOne(#commonMovieScript) 
     271    globs[#gParentScriptInstances] = includes 
     272   
     273  exit 
     274  ------------------------------ 
    132275   
    133276  mediaList = mGetAleXtras() 
     
    166309 
    167310on mListAleXtras 
     311  put "Handler mListAleXtras deprecated" 
     312  exit 
     313   
    168314  alextras = (script "aleXtrasMovieScript").pAleXtras 
    169315  if voidP(alextras) then mLoadScripts 
     
    215361  sel = the selection of castlib cl 
    216362   
    217   delim = the last char of the applicationpath 
     363   
     364  mp = the moviepath 
     365  if length(mp) < 1 then 
     366    if the runmode contains "plug" then 
     367      mp = "/" 
     368    else 
     369      mp = the applicationpath 
     370    end if 
     371  end if 
     372  delim = the last char of mp 
    218373   
    219374  the itemdelimiter = "/" 
  • trunk/lingosource/castlib2/memberInfo.xml

    r14 r18  
    55                <comments>~/Documents/Scripts/lingo/frameloop.ls</comments> 
    66                <memberName>frameloop</memberName> 
    7                 <fName>frameloop</fName> 
     7                <fname>frameloop</fname> 
    88        </frameloop> 
    99        <aleXtrasMovieScript> 
     
    1111                <comments>~/Documents/Scripts/lingo/aleXtrasMovieScript.ls</comments> 
    1212                <memberName>aleXtrasMovieScript</memberName> 
    13                 <fName>aleXtrasMovieScript</fName> 
     13                <fname>aleXtrasMovieScript</fname> 
    1414        </aleXtrasMovieScript> 
    1515        <aleXtraLoader> 
     
    1717                <comments>~/Documents/Scripts/lingo/aleXtraLoader.ls</comments> 
    1818                <memberName>aleXtraLoader</memberName> 
    19                 <fName>aleXtraLoader</fName> 
     19                <fname>aleXtraLoader</fname> 
    2020        </aleXtraLoader> 
    2121        <HierarchicalMenuManager_1> 
     
    2323                <comments>~/Documents/Scripts/lingo/HierarchicalMenuManager_1.ls</comments> 
    2424                <memberName>HierarchicalMenuManager_1</memberName> 
    25                 <fName>HierarchicalMenuManager_1</fName> 
     25                <fname>HierarchicalMenuManager_1</fname> 
    2626        </HierarchicalMenuManager_1> 
    2727        <HierMenu_DragNDrop> 
     
    2929                <comments>~/Documents/Scripts/lingo/HierMenu_DragNDrop.ls</comments> 
    3030                <memberName>HierMenu_DragNDrop</memberName> 
    31                 <fName>HierMenu_DragNDrop</fName> 
     31                <fname>HierMenu_DragNDrop</fname> 
    3232        </HierMenu_DragNDrop> 
    3333        <HierMenu_KeyboardControl> 
     
    3535                <comments>~/Documents/Scripts/lingo/HierMenu_KeyboardControl.ls</comments> 
    3636                <memberName>HierMenu_KeyboardControl</memberName> 
    37                 <fName>HierMenu_KeyboardControl</fName> 
     37                <fname>HierMenu_KeyboardControl</fname> 
    3838        </HierMenu_KeyboardControl> 
    3939        <HierMenu_Renamer> 
     
    4141                <comments>~/Documents/Scripts/lingo/HierMenu_Renamer.ls</comments> 
    4242                <memberName>HierMenu_Renamer</memberName> 
    43                 <fName>HierMenu_Renamer</fName> 
     43                <fname>HierMenu_Renamer</fname> 
    4444        </HierMenu_Renamer> 
    4545        <HierMenu_TextInputField> 
     
    4747                <comments>~/Documents/Scripts/lingo/HierMenu_TextInputField.ls</comments> 
    4848                <memberName>HierMenu_TextInputField</memberName> 
    49                 <fName>HierMenu_TextInputField</fName> 
     49                <fname>HierMenu_TextInputField</fname> 
    5050        </HierMenu_TextInputField> 
    5151        <simpletooltip_1> 
     
    5353                <comments>~/Documents/Scripts/lingo/simpletooltip_1.ls</comments> 
    5454                <memberName>simpletooltip_1</memberName> 
    55                 <fName>simpletooltip_1</fName> 
     55                <fname>simpletooltip_1</fname> 
    5656        </simpletooltip_1> 
    5757        <ButtonManagerHost> 
     
    5959                <comments>~/Documents/Scripts/lingo/ButtonManagerHost.ls</comments> 
    6060                <memberName>ButtonManagerHost</memberName> 
    61                 <fName>ButtonManagerHost</fName> 
     61                <fname>ButtonManagerHost</fname> 
    6262        </ButtonManagerHost> 
    6363        <ToolTipBeaver_1Host> 
     
    6565                <comments>~/Documents/Scripts/lingo/ToolTipBeaver_1Host.ls</comments> 
    6666                <memberName>ToolTipBeaver_1Host</memberName> 
    67                 <fName>ToolTipBeaver_1Host</fName> 
     67                <fname>ToolTipBeaver_1Host</fname> 
    6868        </ToolTipBeaver_1Host> 
    6969        <TTipTemplate> 
     
    7171                <comments></comments> 
    7272                <memberName>TTipTemplate</memberName> 
    73                 <fName>TTipTemplate</fName> 
     73                <fname>TTipTemplate</fname> 
    7474        </TTipTemplate> 
    7575        <ToolTipSpriteBehavior_1> 
     
    7777                <comments>~/Documents/Scripts/lingo/ToolTipSpriteBehavior_1.ls</comments> 
    7878                <memberName>ToolTipSpriteBehavior_1</memberName> 
    79                 <fName>ToolTipSpriteBehavior_1</fName> 
     79                <fname>ToolTipSpriteBehavior_1</fname> 
    8080        </ToolTipSpriteBehavior_1> 
    8181        <creditBeaver> 
     
    8383                <comments>~/Documents/Scripts/lingo/creditBeaver.ls</comments> 
    8484                <memberName>creditBeaver</memberName> 
    85                 <fName>creditBeaver</fName> 
     85                <fname>creditBeaver</fname> 
    8686        </creditBeaver> 
    8787        <newResizableStageBehavior> 
     
    8989                <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/newResizableStageBehavior.ls</comments> 
    9090                <memberName>newResizableStageBehavior</memberName> 
    91                 <fName>newResizableStageBehavior</fName> 
     91                <fname>newResizableStageBehavior</fname> 
    9292        </newResizableStageBehavior> 
    9393        <resizeWindowScripts> 
     
    9595                <comments>~/Documents/Scripts/lingo/resizeWindowScripts.ls</comments> 
    9696                <memberName>resizeWindowScripts</memberName> 
    97                 <fName>resizeWindowScripts</fName> 
     97                <fname>resizeWindowScripts</fname> 
    9898        </resizeWindowScripts> 
    9999        <LinkScriptsMScript> 
     
    101101                <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/LinkScriptsMScript.ls</comments> 
    102102                <memberName>LinkScriptsMScript</memberName> 
    103                 <fName>LinkScriptsMScript</fName> 
     103                <fname>LinkScriptsMScript</fname> 
    104104        </LinkScriptsMScript> 
    105105        <CastLabelsMScript> 
     
    107107                <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/CastLabelsMScript.ls</comments> 
    108108                <memberName>CastLabelsMScript</memberName> 
    109                 <fName>CastLabelsMScript</fName> 
     109                <fname>CastLabelsMScript</fname> 
    110110        </CastLabelsMScript> 
    111111</Untitled> 
  • trunk/lingosource/castlib2/newResizableStageBehavior.ls

    r14 r18  
    11-- xxxx reposition or resize sprites for scalable movies 
    22-- New Version -> more simple -> just takes relative values for distances to the screen bound 
    3 -- Alex da Franca ©2002  da.franca@online.de 
     3-- Alex da Franca c2002  da.franca@online.de 
    44-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    55 
     
    1515property pPreserveAspect 
    1616property pCurrentRect 
     17 
     18property pResizeListenerList 
    1719 
    1820on beginsprite me 
     
    2022  pOldrect = pKanal.rect 
    2123  pCurrentRect = duplicate(pOldrect) 
     24   
     25  pResizeListenerList = [] 
    2226   
    2327  pCenterV = 0 
     
    6771 
    6872on endsprite me 
     73  pResizeListenerList = [] 
    6974  theMember = pKanal.member 
    7075  if theMember.type = #text then 
     
    9196  retlist[#pPreserveAspect] = [#format:#boolean, #default:0, #comment:"Preserve initial aspect ratio when scaling:"] 
    9297  return retlist 
     98end 
     99 
     100-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     101 
     102on RegisterForResizeEvent me, listenerList 
     103   
     104  if not(objectP(listenerList)) then return 0 
     105  if not(symbolP(listenerList[#handler])) then return 0 
     106  theTarget = listenerList[#target] 
     107  if not(objectP(theTarget)) then return 0 
     108   
     109  UnRegisterForResizeEvent me, theTarget 
     110   
     111  pResizeListenerList.add(listenerList) 
     112   
     113end 
     114 
     115-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     116 
     117on UnRegisterForResizeEvent me, atarget 
     118  repeat with n = count(pResizeListenerList) down to 1 
     119    if pResizeListenerList[n][#target] = atarget then 
     120      pResizeListenerList.deleteAt(n) 
     121      exit repeat 
     122    end if 
     123  end repeat 
     124end 
     125 
     126-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     127 
     128on mSendResizeEventToListeners me, newRect, oldRect 
     129  repeat with n = count(pResizeListenerList) down to 1 
     130    if objectP(pResizeListenerList[n][#target]) then 
     131      pResizeListenerList[n][#newRect] = newRect 
     132      pResizeListenerList[n][#oldRect] = oldRect 
     133      call(pResizeListenerList[n][#handler], [pResizeListenerList[n][#target]], pResizeListenerList[n]) 
     134    else 
     135      pResizeListenerList.deleteAt(n) 
     136    end if 
     137  end repeat 
    93138end 
    94139 
     
    195240      pCurrentRect = newR     
    196241    end if 
     242     
    197243    sendSprite(me.spritenum, #mRefreshSpriteRectAfterStageChange, newR, r) 
     244     
     245    mSendResizeEventToListeners me, newR, r 
    198246     
    199247  end if 
     
    290338  mRefreshResizeTargetRect me, newRect 
    291339end 
     340 
    292341-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    293342 
  • trunk/lingosource/castlib2/resizeWindowScripts.ls

    r14 r18  
    1  
     1-- resizeWindowScripts 
     2----------------------------------- 
     3-- CREATED: 
     4-- 2008-04-17 at 01:54 
     5-- 
     6-- PROPERTIES: 
     7--!memberProperties: [#name: "resizeWindowScripts", #scripttype: #movie, #scriptSyntax: #lingo, #comments:"~/Documents/Scripts/lingo/resizeWindowScripts.ls"] 
     8-- 
     9-- DESCRIPTION: 
     10--             moviescript to handle the resizeWindow event and send it to all sprites 
     11--             the sprites can have the "newResizableStageBehavior" in order to act according 
     12--             to their gpdl settings 
     13-- 
     14-- REQUIRES: 
     15-- (Prerequisites) 
     16-- 
     17-- USAGE: 
     18--             in order to make this script work initialize it as soon as possible (for example startmovie) 
     19--             and set the minimum and maximum sizes for the window 
     20-- 
    221-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    322-- xxxxxxxxxxxxxxxxxx add the following call to startmovie 
    4  
    5  
     23-- 
    624--on startmovie 
    725--  ... 
    8  
     26-- 
    927-- xxxxxxxxxxxxxxxxxx 
    1028-- edit the min and max sizes for the window here: 
     
    1331-- mInitResizeWindowSystem minmaxSize 
    1432-- ... 
    15  
     33-- 
    1634--  end 
     35----------------------------------- 
     36 
    1737 
    1838 
     
    167187    newRect = aw.rect 
    168188     
    169     glob = call(#mGetGlobalList, [mGetXScript(#commonmoviescript)]) 
     189    glob = call(#mGetGlobalList, mGetXScript()) 
    170190    oldar = glob.getaprop(#gCurrentStageRect) 
    171191     
     
    218238  else 
    219239     
    220     theRect = call(#mGetPrefValue, [mGetXScript(#GetSetPrefs)], #gWindowRect) 
     240    theRect = call(#mGetPrefValue, mGetXScript(#GetSetPrefs), #gWindowRect) 
    221241     
    222242    if ilk(theRect) = #rect then 
  • trunk/lingosource/castlib2/simpletooltip_1.ls

    r14 r18  
    1414property pThreedChannelName, pOverlayCreated 
    1515 
    16 property pIncludes 
    17  
    1816-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    1917-- DIRECTOR EVENTS 
     
    2119 
    2220on beginsprite me 
    23    
    24   pIncludes = (mGetAleXtras()).getaprop(#scripts) 
    2521   
    2622  pSavedMem = sprite(me.spritenum).member 
     
    3127  pOverlayCreated = 0 
    3228   
    33   call(#mMeldeKanalname, [pIncludes.getaprop(#commonmoviescript)], #tooltipHG, me.spritenum) 
     29  xscr().mMeldeKanalname(#tooltipHG, me.spritenum) 
    3430end 
    3531 
     
    3733 
    3834on endsprite me 
    39   call(#mMeldeAbKanalname, [pIncludes.getaprop(#commonmoviescript)], #tooltipHG, me.spritenum) 
     35  xscr().mMeldeAbKanalname(#tooltipHG, me.spritenum) 
    4036  mTTverschwinde me 
    4137  sprite(me.spritenum).member = pSavedMem 
     
    6662  theSprite = sprite(me.spritenum) 
    6763   
    68   derkanal = call(#mGetKanal, [pIncludes.getaprop(#commonmoviescript)], pThreedChannelName) 
     64  derkanal = xscr().mGetKanal(pThreedChannelName) 
    6965  if derkanal > 0 then 
    7066    trect = rect(theLoc[1], theLoc[2], (theLoc[1] + theImg.width), (theLoc[2] + theImg.height)) 
     
    129125 
    130126on mCreateOverlay me, spritename, whichImg, theLoc, maskImg 
    131    
    132   kanal = call(#mGetKanal, [pIncludes.getaprop(#commonmoviescript)], spritename) 
     127  xscr = xscr() 
     128  kanal = xscr.mGetKanal(spritename) 
    133129  if kanal < 1 then return 0 
    134130  kanal = sprite(kanal) 
     
    145141  breite = whichImg.width 
    146142  hoehe = whichImg.height 
    147   powerbreite = call(#mGetNextPowerOfTwo, [pIncludes.getaprop(#commonmoviescript)], breite) 
    148   powerhoehe = call(#mGetNextPowerOfTwo, [pIncludes.getaprop(#commonmoviescript)], hoehe) 
     143  powerbreite = xscr.mGetNextPowerOfTwo(breite) 
     144  powerhoehe = xscr.mGetNextPowerOfTwo(hoehe) 
    149145   
    150146  if ilk(maskImg) = #image then 
     
    190186on mDeleteOverlay me, spritename 
    191187   
    192   kanal = call(#mGetKanal, [pIncludes.getaprop(#commonmoviescript)], spritename) 
     188  kanal = xscr().mGetKanal(spritename) 
    193189  if kanal < 1 then return 0 
    194190  kanal = sprite(kanal) 
  • trunk/lingosource/castlib3/Alex_HierMenuParent.ls

    r15 r18  
    1 -- Hierarchisches Menu by Alex da Franca ©2001 da.Franca@online.de 
     1-- Hierarchisches Menu by Alex da Franca c2001 da.Franca@online.de 
    22------------------------------------------------------------------ 
    33 
     
    212212   
    213213  pMyScrollBarScript = mGetXScript(#SliderScrollbarMenuParent) 
    214   if not voidP(pMyScrollBarScript) then pMyScrollBarScript = new(pMyScrollBarScript) 
     214  if not listP(pMyScrollBarScript) then 
     215    if ilk(pMyScrollBarScript) = #instance then pMyScrollBarScript = pMyScrollBarScript.script 
     216    pMyScrollBarScript = new(pMyScrollBarScript) 
     217  else 
     218    pMyScrollBarScript = 0 
     219  end if 
    215220   
    216221  pShadowScript = mGetXScript(#DropShadowPScript) 
    217   if not voidP(pShadowScript) then pShadowScript = new(pShadowScript) 
     222  if not listP(pShadowScript) then 
     223    if ilk(pShadowScript) = #instance then pShadowScript = pShadowScript.script 
     224    pShadowScript = new(pShadowScript) 
     225  else 
     226    pShadowScript = 0 
     227  end if 
    218228   
    219229  return me 
     
    16061616   
    16071617  -- properties dieses behviors global speichern, damit beim naechsten beginsprite dieses behaviors der alte zustand wieder hergestellt wird (z.B. bei einem sprung in ein anderes movie) 
     1618  if objectP(pMenuProps) then 
    16081619  if pMenuProps.getaprop(#saveProps) then 
    16091620    global gSicherprop 
     
    16171628  end if 
    16181629  --  (the actorlist).deleteOne(me) 
     1630  end if 
    16191631   
    16201632  -- aufraeumen 
     
    18911903      if pMyScrollBarScript.mGetEnabled() <> 1 then 
    18921904        mUpdateScrollBarRect me 
    1893         pMyScrollBarScript.SetEnabled(1) 
     1905      pMyScrollBarScript.SetEnabled(1) 
    18941906      end if 
    18951907       
     
    19721984    if ilk(pShadowScript) <> #instance then 
    19731985      pShadowScript = mGetXScript(#DropShadowPScript) 
    1974       if not voidP(pShadowScript) then pShadowScript = new(pShadowScript) 
     1986      if not listP(pShadowScript) then 
     1987        if ilk(pShadowScript) = #instance then pShadowScript = pShadowScript.script 
     1988        pShadowScript = new(pShadowScript) 
     1989      else 
     1990        pShadowScript = 0 
     1991      end if 
    19751992    end if 
    19761993     
     
    21212138       
    21222139      if ilk(hgfarbe) = #color then 
    2123         ttimg.fill(ttimg.rect, hgfarbe) 
     2140      ttimg.fill(ttimg.rect, hgfarbe) 
    21242141      else if hgfarbe = #image then 
    21252142        ttimg.copypixels(hgfarbe, ttimg.rect, hgfarbe.rect) 
     
    31713188      dertimer = the ticks 
    31723189      --    dieAnimTime = min((abs(pAnimStart) * max(2,(15 / abs(pAnimStart)))), 40) 
    3173       dieAnimTime = min((abs(pAnimStart) * 5), 40) -- animationszeit abhaengig von der hoehe des stuecks, das animiert wird,, jedoch maximal 40 ms 
     3190      dieAnimTime = min((abs(pAnimStart) * 5), 25) -- animationszeit abhaengig von der hoehe des stuecks, das animiert wird,, jedoch maximal 40 ms 
    31743191      diebeschl = 12.0 
    31753192       
     
    35013518      --------------------------------- 
    35023519       
    3503       if usealternateColor then 
    3504         if n mod 2 then 
    3505           derlocVHL = pZeilenhoehe * (n - pScrollOffset) 
    3506           tr = rect(0, (derlocVHL + obenoffset + 1), (pBuffImg.rect.right - 1), (derlocV + 1 + obenoffset - pMenuProps.getaprop(#myLineWidth))) 
    3507           pBuffImg.fill(tr, alternateColor) 
    3508           if usealph then 
    3509             pAlphaImage.fill(tr, rgb(0,0,0)) 
    3510           end if 
    3511           treeviewdata.setaprop(#alternatecolor, 1) 
    3512         else 
    3513           treeviewdata.setaprop(#alternatecolor, 0) 
    3514         end if 
    3515       end if 
    3516        
     3520    if usealternateColor then 
     3521      if n mod 2 then 
     3522        derlocVHL = pZeilenhoehe * (n - pScrollOffset) 
     3523        tr = rect(0, (derlocVHL + obenoffset + 1), (pBuffImg.rect.right - 1), (derlocV + 1 + obenoffset - pMenuProps.getaprop(#myLineWidth))) 
     3524        pBuffImg.fill(tr, alternateColor) 
     3525        if usealph then 
     3526          pAlphaImage.fill(tr, rgb(0,0,0)) 
     3527        end if 
     3528        treeviewdata.setaprop(#alternatecolor, 1) 
     3529      else 
     3530        treeviewdata.setaprop(#alternatecolor, 0) 
     3531      end if 
     3532    end if 
     3533     
    35173534    end if 
    35183535     
     
    37333750    if ilk(pStrichel) = #image then 
    37343751       
    3735       -- strichellinie: 
    3736       --    strichzahl = templiste.stelleH - 1 
    3737       strichzahl = stelleH - 1 
    3738        
    3739       oben = derlocV + obenoffset - pZeilenhoehe 
    3740       unten = oben + pStrichel.rect.height 
    3741       links = STRlinks 
    3742        
    3743       if ilk(pAlphaImage) = #image then 
    3744          
    3745         repeat with z = 1 to strichzahl 
    3746           pBuffImg.copyPixels(pStrichel, rect(links, oben, (links + 1), unten), pStrichel.rect) 
    3747           pAlphaImage.copyPixels(pStrichelAlpha, rect(links, oben, (links + 1), unten), pStrichel.rect, [#ink:#darkest]) 
    3748           links = links + tabAbstand 
    3749         end repeat 
    3750          
    3751       else 
    3752         repeat with z = 1 to strichzahl 
    3753           pBuffImg.copyPixels(pStrichel, rect(links, oben, (links + 1), unten), pStrichel.rect) 
    3754           links = links + tabAbstand 
    3755         end repeat 
    3756       end if 
    3757        
     3752    -- strichellinie: 
     3753    --    strichzahl = templiste.stelleH - 1 
     3754    strichzahl = stelleH - 1 
     3755     
     3756    oben = derlocV + obenoffset - pZeilenhoehe 
     3757    unten = oben + pStrichel.rect.height 
     3758    links = STRlinks 
     3759     
     3760    if ilk(pAlphaImage) = #image then 
     3761       
     3762      repeat with z = 1 to strichzahl 
     3763        pBuffImg.copyPixels(pStrichel, rect(links, oben, (links + 1), unten), pStrichel.rect) 
     3764        pAlphaImage.copyPixels(pStrichelAlpha, rect(links, oben, (links + 1), unten), pStrichel.rect, [#ink:#darkest]) 
     3765        links = links + tabAbstand 
     3766      end repeat 
     3767       
     3768    else 
     3769      repeat with z = 1 to strichzahl 
     3770        pBuffImg.copyPixels(pStrichel, rect(links, oben, (links + 1), unten), pStrichel.rect) 
     3771        links = links + tabAbstand 
     3772      end repeat 
     3773    end if 
     3774     
    37583775    end if 
    37593776     
  • trunk/lingosource/castlib3/ButtonImageCreator.ls

    r15 r18  
    33-- xxxxxxxxxxxxxxxxxx global handlers to create images for widgets 
    44-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    5 -- Alex da Franca ©2003 da.franca@online.de 
     5-- Alex da Franca c2003 da.franca@online.de 
    66 
    77 
     
    3838--------------------------------- 
    3939-- Scriptmarker: changes alex (24.07.2006 at 09:32 Uhr) // Scriptmarker 
     40 
    4041 
    4142-- added support for a proplist as #buttonIcon, so that different icons for the different button states can be used 
     
    99100        templateTextMember.text = "MM" 
    100101        th = templateTextMember.charPosToLoc(2) 
    101         textimg = image(th[1],th[2],8,0,#grayscale) 
     102        textimg = image(max(1, th[1]),max(1, th[2]),8,0,#grayscale) 
    102103      end if 
    103104       
     
    258259        end if 
    259260         
    260         buttonIconW = hoehe - marginV*2 
     261        buttonIconW = min(breite, hoehe) - marginV*2 
     262        buttonIconW = min(16, buttonIconW) 
    261263        buttonIcon = image(buttonIconW, buttonIconW, 32, 1) 
    262264         
     
    279281  if noText = 1 then breite = max(marginH, myRect.width) 
    280282   
    281   dasRect = rect(0, 0, breite + buttonIconW, hoehe + buttonIconH) 
     283  if noText <> 1 then 
     284    dasRect = rect(0, 0, breite + buttonIconW, hoehe + buttonIconH) 
     285  else 
     286    dasRect = rect(0, 0, breite, hoehe) 
     287  end if 
    282288   
    283289  -- offset: 
     
    343349  end if 
    344350   
     351  alteMaske = 0 
    345352  if img.depth = 32 then alteMaske = img.extractAlpha() 
    346353   
     
    388395      else buffsH = textbreite - buttonIconW + shadowOffs[1] 
    389396       
    390       img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
     397      buffsV = (dasRect.height - buttonIcon.height) / 2 + shadowOffs[2] 
     398       
     399      img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
    391400    end if 
    392401     
     
    401410        else buffsH = textbreite - buttonIconW + shadowOffs[1] 
    402411         
    403         img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
     412        buffsV = (dasRect.height - buttonIcon.height) / 2 + shadowOffs[2] 
     413         
     414        img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
    404415      end if 
    405416       
     
    409420         
    410421        if noText = 1 then 
    411           if buttonIconAlign = #right then buffsH = dasRect.width - buttonIconW + shadowOffs[1] 
    412           else buffsH = marginH + shadowOffs[1] 
    413           img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
     422          --          if buttonIconAlign = #right then buffsH = dasRect.width - buttonIconW + shadowOffs[1] 
     423          --          else buffsH = marginH + shadowOffs[1] 
     424          ----------- just align center 
     425           
     426          buffsH = (dasRect.width - buttonIcon.width) / 2 + shadowOffs[1] 
     427          buffsV = (dasRect.height - buttonIcon.height) / 2 + shadowOffs[2] 
     428          img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
     429           
    414430        else 
    415431          if buttonIconAlign = #right then buffsH = dasRect.width - buttonIconW + shadowOffs[1] 
     
    488504    end if 
    489505     
     506    alteMaske = 0 
    490507    if img.depth = 32 then alteMaske = img.extractAlpha() 
    491508     
     
    563580      if noText = 1 then 
    564581         
    565         if buttonIconAlign = #right then buffsH = dasRect.width - buttonIconW + shadowOffs[1] 
    566         else buffsH = marginH + shadowOffs[1] 
    567          
    568         img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
     582        --          if buttonIconAlign = #right then buffsH = dasRect.width - buttonIconW + shadowOffs[1] 
     583        --          else buffsH = marginH + shadowOffs[1] 
     584        ----------- just align center 
     585         
     586        buffsH = (dasRect.width - buttonIcon.width) / 2 + shadowOffs[1] 
     587        buffsV = (dasRect.height - buttonIcon.height) / 2 + shadowOffs[2] 
     588        img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
     589         
     590         
     591        -- img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
    569592      else 
    570593         
     
    572595        else buffsH = textbreite - buttonIconW + shadowOffs[1] 
    573596         
    574         img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
     597        buffsV = (dasRect.height - buttonIcon.height) / 2 + shadowOffs[2] 
     598         
     599        img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
    575600      end if 
    576601    end if 
     
    639664    end if 
    640665     
     666    alteMaske = 0 
    641667    if img.depth = 32 then alteMaske = img.extractAlpha() 
    642668     
     
    686712        --        else buffsH = marginH + shadowOffs[1] 
    687713         
    688         img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
     714        -- img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
     715        img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
    689716      else 
    690717         
     
    692719        --        else buffsH = textbreite - buttonIconW + shadowOffs[1] 
    693720         
    694         img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
     721        img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
    695722      end if 
    696723    end if 
     
    760787    end if 
    761788     
     789    alteMaske = 0 
    762790    if img.depth = 32 then alteMaske = img.extractAlpha() 
    763791     
     
    807835      if noText = 1 then 
    808836         
    809         --        img.copyPixels(buttonIcon, buttonIcon.rect.offset(marginH + shadowOffs[1], marginV + shadowOffs[2]), buttonIcon.rect) 
    810         img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
     837        --        --        img.copyPixels(buttonIcon, buttonIcon.rect.offset(marginH + shadowOffs[1], marginV + shadowOffs[2]), buttonIcon.rect) 
     838        --        img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
     839         
     840        img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
    811841         
    812842      else 
    813843        --        img.copyPixels(buttonIcon, buttonIcon.rect.offset(textbreite - buttonIconW + shadowOffs[1], marginV + shadowOffs[2]), buttonIcon.rect) 
    814         img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
     844        img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
    815845      end if 
    816846    end if 
     
    886916    end if 
    887917     
     918    alteMaske = 0 
    888919    if img.depth = 32 then alteMaske = img.extractAlpha() 
    889920     
     
    921952      if noText = 1 then 
    922953         
    923         img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
     954        img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
     955        --        img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
    924956      else 
    925957         
    926         img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, marginV + shadowOffs[2]), buttonIcon.rect) 
     958        img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
    927959      end if 
    928960    end if 
     
    12111243             
    12121244            --          -- museum hack fuer zweifarbige rahmen: 
    1213             if call(#mGetThisMovieName, mGetXScript(#commonMovieScript)) = "Kindermuseum" then trect = trect.inflate(-1, -1) -- weisser 1-pixel rahmen 
     1245            if call(#mGetThisMovieName, mGetXScript()) = "Kindermuseum" then trect = trect.inflate(-1, -1) -- weisser 1-pixel rahmen 
    12141246             
    12151247            tempImg.fill(trect, rahmenfarbe) 
     
    13961428 
    13971429-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     1430 
    13981431on mCreateDropDownTriangle me, rHeight 
    13991432   
     
    14311464-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    14321465 
     1466on mCreateCheckBoxButton me, theLabel, options, retlist 
     1467   
     1468  if ilk(options) <> #proplist then options = [:] 
     1469   
     1470  textimg = theLabel 
     1471   
     1472  cms = mGetXScript() 
     1473  ius = mGetXScript(#imageUtilityScripts) 
     1474   
     1475  if ilk(textimg) <> #image then 
     1476    theString = call(#mTranslate, cms, string(textimg)) 
     1477    if theString.length then 
     1478      maxW = options.getaprop(#maxWidth) 
     1479      if ilk(maxW) <> #integer then maxW = 500 
     1480      textimg = call(#mGetTextImage, ius, theString, options, maxW, member("buttontexttempl"), options.getaprop(#dontwrap)) 
     1481       
     1482    else 
     1483      -- no text and no image ?! just return 
     1484      if ilk(retlist) <> #proplist then return [:] 
     1485      return retlist 
     1486       
     1487    end if 
     1488  end if 
     1489   
     1490  myRect = options.getaprop(#myRect) 
     1491  if ilk(myRect) <> #rect then myRect = rect(0,0,2,2) 
     1492   
     1493  texthoehe = textimg.height 
     1494  textbreite = textimg.width 
     1495   
     1496  marginH = options.getaprop(#marginH) 
     1497  marginV = options.getaprop(#marginV) 
     1498   
     1499  hoehe = max((texthoehe + (marginV * 2)), myRect.height) 
     1500  breite = max((textbreite + (marginH * 2)), myRect.width) 
     1501   
     1502   
     1503  if (textimg.depth = 1) or ((textimg.depth = 8) and (textimg.paletteref = #grayscale)) then 
     1504    temp = image(textbreite, texthoehe, 32) 
     1505    fontfarbe = options.getaprop(#myFontcolor) 
     1506    if ilk(fontfarbe) <> #color then 
     1507      fontfarbe = rgb(0,0,0) 
     1508      options[#myFontcolor] = fontfarbe 
     1509    end if 
     1510    temp.fill(temp.rect, fontfarbe) 
     1511     
     1512    temp2 = textimg 
     1513     
     1514  else 
     1515    temp = textimg 
     1516     
     1517    if temp.depth = 32 then 
     1518      temp.useAlpha = 0 
     1519      temp2 = temp.extractAlpha() 
     1520    else 
     1521      temp2 = image(temp.width, temp.height, 8, 0, #grayscale) 
     1522      temp2.fill(temp2.rect, rgb(0,0,0)) 
     1523    end if 
     1524     
     1525  end if 
     1526   
     1527   
     1528   
     1529  buttonIconType = options.getaprop(#buttonIcon) 
     1530   
     1531   
     1532  buttonIconList = [:] 
     1533   
     1534  hlfarbe = options.getaprop(#pressedColor) 
     1535  if ilk(hlfarbe) <> #color then hlfarbe = options.getaprop(#selectedColor) 
     1536  if ilk(hlfarbe) <> #color then hlfarbe = options.getaprop(#myFontColor) 
     1537   
     1538  if ilk(buttonIconType) = #image then 
     1539    buttonIcon = buttonIconType 
     1540    buttonIconW = buttonIcon.width + marginH 
     1541    buttonIconH = max(0, (buttonIcon.height + marginV*2) - hoehe) 
     1542     
     1543    buttonIconList.setaprop(#normal, buttonIcon) 
     1544     
     1545  else if ilk(buttonIconType) = #proplist then 
     1546    buttonIcon = buttonIconType.getaprop(#normal) 
     1547    if ilk(buttonIcon) = #image then 
     1548      buttonIconList = buttonIconType 
     1549      buttonIconW = buttonIcon.width + marginH 
     1550      buttonIconH = max(0, (buttonIcon.height + marginV*2) - hoehe) 
     1551    else 
     1552      buttonIconW = 0 
     1553      buttonIconH = 0 
     1554    end if 
     1555     
     1556  else 
     1557    case buttonIconType of 
     1558      #checkbox: 
     1559         
     1560        if ilk(fontfarbe) <> #color then 
     1561          fontfarbe = options.getaprop(#myFontcolor) 
     1562          if ilk(fontfarbe) <> #color then 
     1563            fontfarbe = rgb(0,0,0) 
     1564            options[#myFontcolor] = fontfarbe 
     1565          end if 
     1566        end if 
     1567         
     1568        buttonIconW = hoehe - marginV*2 
     1569        buttonIcon = image(buttonIconW, buttonIconW, 32, 1) 
     1570        buttonIcon.fill(buttonIcon.rect, fontfarbe) 
     1571        buttonIconM = image(buttonIconW, buttonIconW, 8, 0, #grayscale) 
     1572        buttonIconM.draw(buttonIconM.rect, [#linesize:1, #shapetype:#rect, #color:rgb(0,0,0)]) 
     1573        buttonIcon.setAlpha(buttonIconM) 
     1574         
     1575        buttonIconW = buttonIconW + marginH 
     1576        buttonIconH = 0 
     1577         
     1578        buttonIconList.setaprop(#normal, buttonIcon.duplicate()) 
     1579         
     1580         
     1581         
     1582        if ilk(hlfarbe) = #color then buttonIcon.fill(buttonIcon.rect, hlfarbe) 
     1583        buttonIconM.draw(point(0, 0), point(buttonIconM.width, buttonIconM.height), [#linesize:1, #shapetype:#line, #color:rgb(0,0,0)]) 
     1584        buttonIconM.draw(point(0, buttonIconM.height), point(buttonIconM.width, 0), [#linesize:1, #shapetype:#line, #color:rgb(0,0,0)]) 
     1585        buttonIcon.setAlpha(buttonIconM) 
     1586         
     1587        buttonIconList.setaprop(#pressed, buttonIcon) 
     1588         
     1589      #radiobutton: 
     1590         
     1591        if ilk(fontfarbe) <> #color then 
     1592          fontfarbe = options.getaprop(#myFontcolor) 
     1593          if ilk(fontfarbe) <> #color then 
     1594            fontfarbe = rgb(0,0,0) 
     1595            options[#myFontcolor] = fontfarbe 
     1596          end if 
     1597        end if 
     1598         
     1599        buttonIconW = hoehe - marginV*2 
     1600        buttonIcon = image(buttonIconW, buttonIconW, 32, 1) 
     1601        buttonIcon.fill(buttonIcon.rect, fontfarbe) 
     1602        buttonIconM = image(buttonIconW, buttonIconW, 8, 0, #grayscale) 
     1603        buttonIconM.draw(buttonIconM.rect, [#linesize:1, #shapetype:#oval, #color:rgb(0,0,0)]) 
     1604        buttonIcon.setAlpha(buttonIconM) 
     1605         
     1606        buttonIconW = buttonIconW + marginH 
     1607        buttonIconH = 0 
     1608         
     1609        buttonIconList.setaprop(#normal, buttonIcon.duplicate()) 
     1610         
     1611        if ilk(hlfarbe) = #color then buttonIcon.fill(buttonIcon.rect, hlfarbe) 
     1612        buttonIconM.fill(buttonIconM.rect.inflate(-3, -3), [#shapetype:#oval, #color:rgb(0,0,0)]) 
     1613        buttonIcon.setAlpha(buttonIconM) 
     1614         
     1615        buttonIconList.setaprop(#pressed, buttonIcon) 
     1616         
     1617      #dropdown: 
     1618         
     1619        if ilk(fontfarbe) <> #color then 
     1620          fontfarbe = options.getaprop(#myFontcolor) 
     1621          if ilk(fontfarbe) <> #color then 
     1622            fontfarbe = rgb(0,0,0) 
     1623            options[#myFontcolor] = fontfarbe 
     1624          end if 
     1625        end if 
     1626         
     1627        buttonIconW = min(breite, hoehe) - marginV*2 
     1628        buttonIconW = min(16, buttonIconW) 
     1629        buttonIcon = image(buttonIconW, buttonIconW, 32, 1) 
     1630         
     1631        buttonIcon.fill(buttonIcon.rect, fontfarbe) 
     1632         
     1633        buttonIconM = mCreateDropDownTriangle(me, buttonIconW) 
     1634        buttonIcon.setAlpha(buttonIconM) 
     1635         
     1636        buttonIconW = buttonIconW + marginH 
     1637        buttonIconH = 0 
     1638         
     1639        buttonIconList.setaprop(#normal, buttonIcon) 
     1640         
     1641      otherwise 
     1642        buttonIconW = 0 
     1643        buttonIconH = 0 
     1644        buttonIcon = 0 
     1645         
     1646        buttonIconList = [:] 
     1647         
     1648    end case 
     1649  end if 
     1650   
     1651  dasRect = rect(0, 0, breite + buttonIconW, hoehe + buttonIconH) 
     1652   
     1653  texthoehe = (dasRect.height - texthoehe) / 2 
     1654  textbreite = marginH + buttonIconW 
     1655   
     1656  ----------------------------- 
     1657  textoffset = options.getaprop(#textoffset) 
     1658  if ilk(textoffset) = #point then 
     1659    textbreite = textbreite + textoffset[1] 
     1660    texthoehe = texthoehe + textoffset[2] 
     1661  end if 
     1662  ----------------------------- 
     1663   
     1664  if ilk(retlist) <> #proplist then 
     1665    retlist = [:] 
     1666    retlist[#normal] = 1 
     1667    retlist[#pressed] = 1 
     1668    retlist[#hilite] = 1 
     1669    retlist[#disabled] = 1 
     1670    retlist[#selected] = 1 
     1671  end if 
     1672   
     1673   
     1674   
     1675  buffsH = textbreite - buttonIconW 
     1676  if ilk(buttonIcon) = #image then 
     1677    buffsV = (dasRect.height - buttonIcon.height) / 2 
     1678  else 
     1679    buffsV = 0 
     1680  end if 
     1681   
     1682  img = image(dasrect.width, dasrect.height, 32, 1) 
     1683  aImg = image(img.width, img.height, 8, 0, #grayscale) 
     1684  img.useAlpha = 0 
     1685   
     1686  img.copyPixels(temp, temp.rect.offset(textbreite, texthoehe), temp.rect) 
     1687  aImg.copyPixels(temp2, temp2.rect.offset(textbreite, texthoehe), temp2.rect) 
     1688   
     1689  buttonIcon = buttonIconList.getaprop(#normal) 
     1690  if ilk(buttonIcon) = #image then 
     1691    if buttonIcon.depth = 32 then 
     1692      buttonIcon.useAlpha = 0 
     1693      buttonIconA = buttonIcon.extractAlpha() 
     1694    else 
     1695      buttonIconA = image(buttonIcon.width, buttonIconA.height, 8, 0, #grayscale) 
     1696      buttonIconA.fill(buttonIconA.rect, rgb(0,0,0)) 
     1697    end if 
     1698     
     1699    img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
     1700    aImg.copyPixels(buttonIconA, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
     1701  end if 
     1702   
     1703  img.setAlpha(aImg) 
     1704  img.useAlpha = 1 
     1705   
     1706  retlist[#normal] = img 
     1707   
     1708  ------------------------------- 
     1709   
     1710  if not(voidP(retlist.getaprop(#pressed))) then 
     1711     
     1712    hlfarbe = options.getaprop(#pressedColor) 
     1713    if ilk(hlfarbe) = #color then temp.fill(temp.rect, hlfarbe) 
     1714     
     1715    img = image(dasrect.width, dasrect.height, 32, 1) 
     1716    aImg = image(img.width, img.height, 8, 0, #grayscale) 
     1717    img.useAlpha = 0 
     1718     
     1719    img.copyPixels(temp, temp.rect.offset(textbreite, texthoehe), temp.rect) 
     1720    aImg.copyPixels(temp2, temp2.rect.offset(textbreite, texthoehe), temp2.rect) 
     1721     
     1722    buttonIcon = buttonIconList.getaprop(#pressed) 
     1723    if ilk(buttonIcon) <> #image then buttonIcon = buttonIconList.getaprop(#normal) 
     1724    if ilk(buttonIcon) = #image then 
     1725      if buttonIcon.depth = 32 then 
     1726                buttonIcon.useAlpha = 0 
     1727                buttonIconA = buttonIcon.extractAlpha() 
     1728      else 
     1729                buttonIconA = image(buttonIcon.width, buttonIconA.height, 8, 0, #grayscale) 
     1730                buttonIconA.fill(buttonIconA.rect, rgb(0,0,0)) 
     1731      end if 
     1732       
     1733      img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
     1734      aImg.copyPixels(buttonIconA, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
     1735    end if 
     1736     
     1737    img.setAlpha(aImg) 
     1738    img.useAlpha = 1 
     1739     
     1740    retlist[#pressed] = img 
     1741     
     1742  end if 
     1743   
     1744   
     1745  ------------------------------- 
     1746   
     1747  if not(voidP(retlist.getaprop(#hilite))) then 
     1748     
     1749    hlfarbe = options.getaprop(#hiliteColor) 
     1750    if ilk(hlfarbe) = #color then temp.fill(temp.rect, hlfarbe) 
     1751     
     1752    img = image(dasrect.width, dasrect.height, 32, 1) 
     1753    aImg = image(img.width, img.height, 8, 0, #grayscale) 
     1754    img.useAlpha = 0 
     1755     
     1756    img.copyPixels(temp, temp.rect.offset(textbreite, texthoehe), temp.rect) 
     1757    aImg.copyPixels(temp2, temp2.rect.offset(textbreite, texthoehe), temp2.rect) 
     1758     
     1759    buttonIcon = buttonIconList.getaprop(#hilite) 
     1760    if ilk(buttonIcon) <> #image then buttonIcon = buttonIconList.getaprop(#normal) 
     1761    if ilk(buttonIcon) = #image then 
     1762      if buttonIcon.depth = 32 then 
     1763                buttonIcon.useAlpha = 0 
     1764                buttonIconA = buttonIcon.extractAlpha() 
     1765      else 
     1766                buttonIconA = image(buttonIcon.width, buttonIconA.height, 8, 0, #grayscale) 
     1767                buttonIconA.fill(buttonIconA.rect, rgb(0,0,0)) 
     1768      end if 
     1769       
     1770      img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
     1771      aImg.copyPixels(buttonIconA, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
     1772    end if 
     1773     
     1774    img.setAlpha(aImg) 
     1775    img.useAlpha = 1 
     1776     
     1777    retlist[#hilite] = img 
     1778     
     1779  end if 
     1780   
     1781   
     1782   
     1783  ------------------------------- 
     1784   
     1785  if not(voidP(retlist.getaprop(#disabled))) then 
     1786     
     1787    hlfarbe = options.getaprop(#disabledColor) 
     1788    if ilk(hlfarbe) = #color then temp.fill(temp.rect, hlfarbe) 
     1789     
     1790    img = image(dasrect.width, dasrect.height, 32, 1) 
     1791    aImg = image(img.width, img.height, 8, 0, #grayscale) 
     1792    img.useAlpha = 0 
     1793     
     1794    img.copyPixels(temp, temp.rect.offset(textbreite, texthoehe), temp.rect) 
     1795    aImg.copyPixels(temp2, temp2.rect.offset(textbreite, texthoehe), temp2.rect) 
     1796     
     1797    buttonIcon = buttonIconList.getaprop(#disabled) 
     1798    if ilk(buttonIcon) <> #image then buttonIcon = buttonIconList.getaprop(#normal) 
     1799    if ilk(buttonIcon) = #image then 
     1800      if buttonIcon.depth = 32 then 
     1801                buttonIcon.useAlpha = 0 
     1802                buttonIconA = buttonIcon.extractAlpha() 
     1803      else 
     1804                buttonIconA = image(buttonIcon.width, buttonIconA.height, 8, 0, #grayscale) 
     1805                buttonIconA.fill(buttonIconA.rect, rgb(0,0,0)) 
     1806      end if 
     1807       
     1808      img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
     1809      aImg.copyPixels(buttonIconA, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
     1810    end if 
     1811     
     1812    img.setAlpha(aImg) 
     1813    img.useAlpha = 1 
     1814     
     1815    retlist[#disabled] = img 
     1816  end if 
     1817   
     1818   
     1819   
     1820  ------------------------------- 
     1821   
     1822  if not(voidP(retlist.getaprop(#selected))) then 
     1823     
     1824    hlfarbe = options.getaprop(#selectedColor) 
     1825    if ilk(hlfarbe) = #color then temp.fill(temp.rect, hlfarbe) 
     1826     
     1827    img = image(dasrect.width, dasrect.height, 32, 1) 
     1828    aImg = image(img.width, img.height, 8, 0, #grayscale) 
     1829    img.useAlpha = 0 
     1830     
     1831    img.copyPixels(temp, temp.rect.offset(textbreite, texthoehe), temp.rect) 
     1832    aImg.copyPixels(temp2, temp2.rect.offset(textbreite, texthoehe), temp2.rect) 
     1833     
     1834    buttonIcon = buttonIconList.getaprop(#selected) 
     1835    if ilk(buttonIcon) <> #image then buttonIcon = buttonIconList.getaprop(#normal) 
     1836    if ilk(buttonIcon) = #image then 
     1837      if buttonIcon.depth = 32 then 
     1838                buttonIcon.useAlpha = 0 
     1839                buttonIconA = buttonIcon.extractAlpha() 
     1840      else 
     1841                buttonIconA = image(buttonIcon.width, buttonIconA.height, 8, 0, #grayscale) 
     1842                buttonIconA.fill(buttonIconA.rect, rgb(0,0,0)) 
     1843      end if 
     1844       
     1845      img.copyPixels(buttonIcon, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
     1846      aImg.copyPixels(buttonIconA, buttonIcon.rect.offset(buffsH, buffsV), buttonIcon.rect) 
     1847    end if 
     1848     
     1849    img.setAlpha(aImg) 
     1850    img.useAlpha = 1 
     1851     
     1852    retlist[#selected] = img 
     1853  end if 
     1854   
     1855   
     1856  return retlist 
     1857end 
     1858 
     1859 
     1860-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     1861 
    14331862on interface me 
    1434   str = "Button Image Creator Script  by alex da franca ©2003 -- alex@farbflash.de -- all rigths reserved" 
     1863  str = "Button Image Creator Script  by alex da franca c2003 -- alex@farbflash.de -- all rigths reserved" 
    14351864   
    14361865  put RETURN & "-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" after str 
  • trunk/lingosource/castlib3/ButtonManager.ls

    r15 r18  
    1 -- Manager for DrawTable Parentscript used on Bitmap sprites and 3-D Sprites 
    2 -- Alex da Franca ©2002  da.franca@online.de 
     1-- ButtonManager 
     2----------------------------------- 
     3-- CREATED: 
     4--             Alex da Franca c2002  alex@farbflash.de 
     5-- 
     6-- DESCRIPTION: 
     7--             Manager for GenericButtonPS Parentscript used on Bitmap sprites and 3-D Sprites 
     8-- 
    39-- Use this behavior on any dummy sprite to display a scrolling table with selectable items, text (fixed and editable) and images. 
    410-- It creates a temporary bitmap member, which is used to display the table on the stage. 
    511-- Specify the contents and appearance of the table in two property lists, which you pass to the mShowTable handler 
    612-- Use a copy of the parentscript "TableOptionsliste" to build these two lists and receive events from the table 
    7  
    8  
     13-- 
     14-- REQUIRES: 
     15--             script "GenericButtonPS" 
     16-- 
     17-- USAGE: 
     18-- - 
     19-- 
     20-- HISTORY: 
     21-- 
    922-- alex am Freitag, 23. April 2004 
    1023-- added mRefreshSpriteRectAfterStageChange() handler to refresh the rect after a stage resize, sent from behavior "resizeStageBehavior" 
     
    6073 
    6174 
     75--------------------------------- 
     76-- Scriptmarker (18.09.2008 at 12:06 Uhr): alex changes // Scriptmarker 
     77-- added handler mSetBroadcastlist to SET the ENTIRE list of callback instances 
     78-- it now also supports callBackObjects a la [#target, #handler, ...] as callback objects, 
     79-- which allows for additional parameters in that callbackObject, which gets send as parameter 
     80 
     81-- added three new handlers: mSetEventsToProcessList, mAddToEventsToProcessList, mRemoveFromEventsToProcessList 
     82-- use these handlers to change the events which shall be processed (which trigger events to the event listeners) 
     83-- -- mSetEventsToProcessList sets the entire list 
     84-- -- mAddToEventsToProcessList adds an event to the list of events which will be processed 
     85-- -- mRemoveFromEventsToProcessList removes an event from the list of events which will be processed 
     86-- -- -- possible events are: #mouseUp, #mouseDown, #mouseEnter, #mouseLeave 
     87 
     88----------------------------------- 
     89 
     90 
     91 
     92property pKanal, pMember 
     93 
    6294-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    6395-- xxxxxxxxxxxxxxxxxx PROPERTIES 
    6496-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    6597 
    66 property pKanal, pMember 
    6798property pOldKeyDown 
    6899property pMyScriptObject 
     
    116147 
    117148on interface me 
    118   str = "Button Script  by alex da franca ©2005 -- alex@farbflash.de -- all rigths reserved" 
     149  str = "Button Script  by alex da franca c2005 -- alex@farbflash.de -- all rigths reserved" 
    119150  put RETURN & "version 1.0" after str 
    120151  put RETURN & "--------------------------------------------------------" after str 
     
    238269on mInitProperties me, pipeline 
    239270   
    240   pIncludes = (mGetAleXtras()).getaprop(#scripts) 
     271  pIncludes = xscr() 
    241272   
    242273  pKeyboardshortcutList = [:] 
     
    276307      -- alex am 8. Oktober 2004 um 10:32 
    277308      --      pMember = new(#bitmap) 
    278       pMember = call(#mGetNewMember, [pIncludes.getaprop(#commonmoviescript)], #bitmap) 
     309      pMember = pIncludes.mGetNewMember(#bitmap) 
    279310      --/ alex am 8. Oktober 2004 um 10:32 
    280311       
     
    364395      -- alex am 8. Oktober 2004 um 10:32 
    365396      --      pMember.erase() 
    366       call(#mEraseMember, [pIncludes.getaprop(#commonmoviescript)], pMember) 
     397      pIncludes.mEraseMember(pMember) 
    367398      -- alex am 8. Oktober 2004 um 10:32 
    368399    end if 
     
    735766 
    736767on mAddButton me, options 
     768  ----------------------------------- 
     769  -- ACTION: Add a new button. When used on a 2-D sprite, we will always have only one button per behavior 
     770  --         But if this is used on a 3-D sprite, we have only one behavior hosting different buttons as overlays on the 3-D sprite 
     771  --         Therefore we have a list of button objects 
     772  -- INPUT: <options> ; property list ; huge number of properties describing the button, most of which comes from mGetDefaultButtonList() 
     773  --                    see script "defaultLayoutDefinitions" for all properties, which are available for the layout of the button 
     774  --                see the below example for the porperties concerning this script: 
     775  -- RETURNS: - 
     776  -- CALLER: - 
     777  -- EXAMPLE:  
     778  -- 
     779  --    buttonmembername = "buttonImage" 
     780  --    options = mGetDefaultButtonList() 
     781  --    options[#label] = "Choose new model" 
     782  --    i = member(buttonmembername).image.duplicate() 
     783  --    options[#myName] = "versionInfoIcon" 
     784  --    options[#myRect] = rect(0, 0, i.width, i.height) 
     785  --    options[#marginH] = 0 
     786  --    options[#marginV] = 0 
     787  --    options[#broadcastSprites] = [me] 
     788  --    options[#callFunction] = #mVersionInfoIconClicked 
     789  --    options[#myName] = buttonmembername 
     790  --    options[#normalImage] = buttonmembername 
     791  --    options[#eventsToProcess] = [#mouseDown, #mouseUp] 
     792  --    options[#disableBlend] = 0 
     793  --    options[#enabled] = 1 
     794  --    options[#recalcPosition] = point(0, 0) -- reposition the button on window resize (requires script "resizeWindowScripts" to get resize event) 
     795  --     
     796  --    spr = xscr().mGetKanal(#sceneSprite) 
     797  --    sendSprite(spr, #mAddButton, options) 
     798  ----------------------------------- 
    737799   
    738800  if not(listP(pButtonList)) then mInitProperties me 
     
    744806    options = pOptionsListe 
    745807     
    746     if call(#mGetMemType, [pIncludes.getaprop(#commonmoviescript)], pMember) = #shockwave3d then -- 3-D mode 
     808    if pIncludes.mGetMemType(pMember) = #shockwave3d then -- 3-D mode 
    747809      r = options[#myRect] 
    748810       
     
    833895   
    834896  GenericButtonPS = mGetXScript(#GenericButtonPS) 
    835   if voidP(GenericButtonPS) then exit 
    836    
    837   if not objectP(theObject.getaprop(#myScriptObject)) then theObject[#myScriptObject] = new(GenericButtonPS) 
     897  if listP(GenericButtonPS) then exit 
     898   
     899  if not objectP(theObject.getaprop(#myScriptObject)) then 
     900    if ilk(GenericButtonPS) = #instance then GenericButtonPS = GenericButtonPS.script 
     901    theObject[#myScriptObject] = new(GenericButtonPS) 
     902  end if 
    838903   
    839904  if objectP(theObject.getaprop(#myScriptObject)) then -- if we succeded in initializing a button parent script (only fails if script "GenericButtonPS" isn't present)) 
     
    871936      mo = pMember.model(val) 
    872937      if not(voidP(mo)) then 
    873         scr = call(#mGetParentScriptList, [pIncludes.getaprop(#commonmoviescript)], mo) 
     938        scr = pIncludes.mGetParentScriptList(mo) 
    874939         
    875940        repeat with n = scr.count down to 1 
     
    900965 
    901966on mRemoveButton me, tabname 
     967  ----------------------------------- 
     968  -- ACTION: Remove the specified button 
     969  -- INPUT: string ; button name 
     970  -- RETURNS: - 
     971  -- DEBUG: 
     972  --    spr = xscr().mGetKanal(#sceneSprite) 
     973  --    sendSprite(spr, #mRemoveButton, "versionInfoIcon") 
     974  ----------------------------------- 
     975   
    902976  if not(pButtonList.count) then exit 
    903977   
     
    9811055    -- instead put the removal into a seperate, indepandant event 
    9821056     
    983     dto = call(#mCreateTimeout, [pIncludes.getaprop(#commonmoviescript)], pTextureBaseName&"_cleanup", 100, #mRemoveEmptyListEntries, me) 
    984     --    if mCheckWoody() = 1 then 
    985     --      dto = timeout().new(pTextureBaseName&"_cleanup", 100, #mRemoveEmptyListEntries, me) 
    986     --    else 
    987     --      dto = timeout(pTextureBaseName&"_cleanup").new(100, #mRemoveEmptyListEntries, me) 
    988     --    end if 
     1057    dto = pIncludes.mCreateTimeout(pTextureBaseName&"_cleanup", 100, #mRemoveEmptyListEntries, me) 
    9891058     
    9901059  end if 
     
    9981067end 
    9991068 
    1000  
    1001 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    1002 -- comes from the drop down menu, if any 
     1069-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     1070-- -- comes from the drop down menu, if any 
    10031071 
    10041072on mHiliteMenu me, val 
     
    10061074end 
    10071075 
    1008  
    1009  
    1010  
    10111076-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    10121077-- xxxxxxxxxxxxxxxxxx Public Handlers to change, control or get the button contents and properties 
     
    10141079 
    10151080 
    1016 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    1017 -- check if a button is present -> this script normally simply applies all to the first button in the list, if tabname is unknown/undefined 
    1018 -- sometimes, this is NOT what I want... 
    1019  
    10201081on mIsButtonPresent me, tabname 
     1082  ----------------------------------- 
     1083  -- ACTION:   check if a button is present -> this script normally simply applies all to the first button in the list, if tabname is unknown/undefined 
     1084  --           sometimes, this is NOT what I want, therefore I needed a handler to tell, if a given button is present 
     1085  -- INPUT:   <tabname> ; string ; name of the button we want to check 
     1086  -- RETURNS:  boolean ; true, if button exists, false otherwise 
     1087  ----------------------------------- 
    10211088   
    10221089  if not(pButtonList.count) then return 0 
    10231090   
    1024   return (ilk(pButtonList.getaprop(tabname)) = #proplist) 
    1025    
    1026 end 
    1027  
    1028 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    1029 -- get the propertylist of the button; e.g. to query the label etc. 
    1030 -- returns: #property list 
     1091  return objectP(pButtonList.getaprop(tabname)) 
     1092   
     1093end 
     1094 
     1095-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     1096 
    10311097 
    10321098on mGetButtonProps me, tabname 
     1099  ----------------------------------- 
     1100  -- ACTION:   get the propertylist of the button; e.g. to query the label etc. 
     1101  -- INPUT:    <tabname> ; string ; name of the button we want to address 
     1102  -- RETURNS:  #property list ; all button properties 
     1103  ----------------------------------- 
    10331104   
    10341105  if not(pButtonList.count) then return [:] 
     
    10451116-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    10461117 
    1047 -- change the text: 
    1048 -- accepts: #string 
    10491118on mChangeLabel me, newLabel, tabname 
     1119  ----------------------------------- 
     1120  -- ACTION:   change the button label text => re-render the text and redraw the images 
     1121  -- INPUT:    <newLabel> ; string ; new label 
     1122  --           <tabname> ; string ; name of the button we want to address 
     1123  -- RETURNS: - 
     1124  ----------------------------------- 
     1125   
    10501126  if ilk(newLabel) <> #string then exit 
    10511127   
     
    10601136 
    10611137-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    1062 -- special case of label change 
     1138 
     1139on mChangeLanguage me, tabname 
     1140  ----------------------------------- 
     1141  -- ACTION:   special case of label change 
    10631142-- if mTranslate() yields another result the labels will change 
    1064 -- accepts: #string 
    1065 on mChangeLanguage me, tabname 
     1143  --           the new label will be determined by the "global" handler mTranslate() 
     1144  --           mTranslate is a handler of "commonMovieScript" 
     1145  -- INPUT:    <tabname> ; string ; name of the button we want to address 
     1146  -- RETURNS: - 
     1147  ----------------------------------- 
    10661148   
    10671149  if not(pButtonList.count) then exit 
     
    10741156 
    10751157-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    1076 -- ullala changed 05 
     1158 
    10771159on mPause me, tValue 
     1160  ----------------------------------- 
     1161  -- ACTION:   disable ALL events of this script, if pPause is true 
     1162  --           (can't remember why ulla put that here, normally we would to enable/disable specific buttons) 
     1163  --           this property disables ALL events for ALL buttons, 
     1164  --           I guess it is only useful, if we have only one button => 2-D sprite 
     1165  -- INPUT: <tValue> ; boolean (integer) 
     1166  -- RETURNS: - 
     1167  ----------------------------------- 
     1168   
    10781169  pPause = tValue 
    10791170end 
    10801171 
    10811172-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    1082 -- toggle the enabled state of the button; 1 = enable, 0 = disable 
    1083 -- accepts: #integer 
     1173 
    10841174on mEnableButton me, val, tabname, alleAusser 
     1175  ----------------------------------- 
     1176  -- ACTION:   toggle the enabled state of the button 
     1177  -- 
     1178  -- INPUT:    <val> ; boolean (integer) ; 1 = enable, 0 = disable 
     1179  --           <tabname> ; string OR list ; name of the button we want to address or linear list of names of buttons we want to address 
     1180  --           <alleAusser> ; boolean (integer) ; reverse the action if true not the addressed buttons are toggled, but rather 
     1181  --                           all buttons EXCEPT the ones specified in <tabname> 
     1182  -- RETURNS: - 
     1183  ----------------------------------- 
    10851184   
    10861185  if not(pButtonList.count) then exit 
     
    11181217 
    11191218-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    1120 -- get the enabled state of the button; 1 = enabled, 0 = disabled 
    1121 -- returns: #integer 
    11221219 
    11231220on mGetButtonEnabledState me, tabname 
     1221  ----------------------------------- 
     1222  -- ACTION:   get the enabled state of the button 
     1223  -- 
     1224  -- INPUT:    <tabname> ; string ; name of the button we want to address 
     1225  -- RETURNS:  boolean (integer) 
     1226  ----------------------------------- 
    11241227   
    11251228  if not(pButtonList.count) then return 0 
     
    11341237 
    11351238-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    1136 -- change the event which shall be sent on mouseUp 
     1239--  
    11371240-- accepts: #symbol, #string 
     1241 
    11381242on mSetButtonFunction me, newFunction, tabname 
     1243  ----------------------------------- 
     1244  -- ACTION:   change the event which shall be sent to the lsiteners 
     1245  -- 
     1246  -- INPUT:   <newFunction> ; symbol or string ; name of the event to send to the listeners 
     1247  --                          Note, that a listener can define itself via a callbackObject, 
     1248  --                          which is made of a #target and a #handler, in that case #handler overrides this functionname 
     1249  --                          and every button can define its own handlernames to call on events 
     1250  --          <tabname> ; string ; name of the button we want to address 
     1251  -- RETURNS:  - 
     1252  ----------------------------------- 
    11391253   
    11401254  if not(pButtonList.count) then exit 
     
    11511265 
    11521266-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    1153 -- add a reference to an instance or sprite to the list of instances that get sent the event 
    1154 -- accepts: #object, #integer 
    1155 on mAddToButtonBroadcastlist me, referenz, tabname 
     1267--  
     1268-- accepts: #list 
     1269 
     1270on mSetBroadcastlist me, newBroadCastList, tabname 
     1271  ----------------------------------- 
     1272  -- ACTION:   set the entire list of broadcastsprites 
     1273  --          (list with references to an instance or sprite from the list of instances that get sent the event) 
     1274  -- 
     1275  -- INPUT:   <newBroadCastList> ; linear list ; list of event listeners 
     1276  --          (event listeners can be objects, strings, integers, symbols, callBackObjects [#handler:#buttonEvent, #target:me]) 
     1277  --          <tabname> ; string ; name of the button we want to address 
     1278  -- RETURNS:  - 
     1279  ----------------------------------- 
     1280   
     1281  if not(listP(newBroadCastList)) then exit 
    11561282   
    11571283  if not(pButtonList.count) then exit 
     
    11631289  theObject = theObject.getaprop(#myScriptObject) 
    11641290   
    1165   if not(theObject.pOptions.broadcastSprites).getPos(referenz) then theObject.pOptions.broadcastSprites.add(referenz) 
    1166 end 
    1167  
    1168 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    1169 -- remove a reference to an instance or sprite from the list of instances that get sent the event 
    1170 -- accepts: #object, #integer 
    1171 on mRemoveFromButtonBroadcastlist me, referenz, tabname 
     1291  theObject.pOptions[#broadcastSprites] = newBroadCastList 
     1292   
     1293end 
     1294 
     1295-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     1296--  
     1297-- accepts:  
     1298 
     1299on mAddToButtonBroadcastlist me, referenz, tabname 
     1300  ----------------------------------- 
     1301  -- ACTION:   add a reference to an instance or sprite to the list of instances that get sent the event 
     1302  -- 
     1303  -- INPUT:   <referenz> ; #object, #integer, #string, #symbol, callBackObject 
     1304  --          <tabname> ; string ; name of the button we want to address 
     1305  -- RETURNS:  - 
     1306  ----------------------------------- 
    11721307   
    11731308  if not(pButtonList.count) then exit 
     
    11791314  theObject = theObject.getaprop(#myScriptObject) 
    11801315   
     1316  if not(theObject.pOptions.broadcastSprites).getPos(referenz) then theObject.pOptions.broadcastSprites.add(referenz) 
     1317end 
     1318 
     1319-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     1320 
     1321on mRemoveFromButtonBroadcastlist me, referenz, tabname 
     1322  ----------------------------------- 
     1323  -- ACTION:   remove a reference to an instance or sprite from the list of instances that get sent the event 
     1324  -- 
     1325  -- INPUT:   <referenz> ; #object, #integer, #string, #symbol, callBackObject 
     1326  --          <tabname> ; string ; name of the button we want to address 
     1327  -- RETURNS:  - 
     1328  ----------------------------------- 
     1329   
     1330  if not(pButtonList.count) then exit 
     1331   
     1332  if not voidP(tabname) then theObject = pButtonList.getaprop(tabname) 
     1333  else theObject = 0 
     1334  if ilk(theObject) <> #proplist then theObject = pButtonList[1] 
     1335   
     1336  theObject = theObject.getaprop(#myScriptObject) 
     1337   
    11811338  theObject.pOptions.broadcastSprites.deleteOne(referenz) 
    11821339   
     
    11841341 
    11851342-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    1186 -- get the enabled state of the button; 1 = enabled, 0 = disabled 
    1187 -- returns: #integer 
     1343--  
     1344 
     1345-- accepts: #list 
     1346 
     1347on mSetEventsToProcessList me, newEventList, tabname 
     1348  ----------------------------------- 
     1349  -- ACTION:   set the entire list of events, which will be processed 
     1350  -- 
     1351  -- INPUT:   <newEventList> ; linear list ; list of events to process for a specific button 
     1352  --               events which can be processed are: #mouseUp, #mouseDown, #mouseEnter, #mouseLeave 
     1353  --          <tabname> ; string ; name of the button we want to address 
     1354  -- RETURNS:  - 
     1355  ----------------------------------- 
     1356   
     1357  if not(listP(newEventList)) then exit 
     1358   
     1359  if not(pButtonList.count) then exit 
     1360   
     1361  if not voidP(tabname) then theObject = pButtonList.getaprop(tabname) 
     1362  else theObject = 0 
     1363  if ilk(theObject) <> #proplist then theObject = pButtonList[1] 
     1364   
     1365  theObject = theObject.getaprop(#myScriptObject) 
     1366   
     1367  theObject.pOptions[#eventsToProcess] = newEventList 
     1368   
     1369end 
     1370 
     1371-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     1372--  
     1373-- -- -- events which can be processed are: #mouseUp, #mouseDown, #mouseEnter, #mouseLeave 
     1374-- accepts: #symbol 
     1375 
     1376on mAddToEventsToProcessList me, theEvent, tabname 
     1377  ----------------------------------- 
     1378  -- ACTION:   add an event to the list of processed events 
     1379  -- 
     1380  -- INPUT:   <theEvent> ; symbol 
     1381  --               events which can be processed are: #mouseUp, #mouseDown, #mouseEnter, #mouseLeave 
     1382  --          <tabname> ; string ; name of the button we want to address 
     1383  -- RETURNS:  - 
     1384  ----------------------------------- 
     1385   
     1386  if not(pButtonList.count) then exit 
     1387   
     1388  if not voidP(tabname) then theObject = pButtonList.getaprop(tabname) 
     1389  else theObject = 0 
     1390  if ilk(theObject) <> #proplist then theObject = pButtonList[1] 
     1391   
     1392  theObject = theObject.getaprop(#myScriptObject) 
     1393   
     1394  eventsToProcess = theObject.pOptions[#eventsToProcess] 
     1395  if not(listP(eventsToProcess)) then 
     1396    theObject.pOptions[#eventsToProcess] = [theEvent] 
     1397  else 
     1398    eventsToProcess.deleteOne(theEvent) 
     1399    eventsToProcess.add(theEvent) 
     1400  end if 
     1401   
     1402end 
     1403 
     1404-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     1405 
     1406on mRemoveFromEventsToProcessList me, theEvent, tabname 
     1407  ----------------------------------- 
     1408  -- ACTION:   remove an event from the list of processed events 
     1409  -- 
     1410  -- INPUT:   <theEvent> ; symbol 
     1411  --               events which can be processed are: #mouseUp, #mouseDown, #mouseEnter, #mouseLeave 
     1412  --          <tabname> ; string ; name of the button we want to address 
     1413  -- RETURNS:  - 
     1414  ----------------------------------- 
     1415   
     1416  if not(pButtonList.count) then exit 
     1417   
     1418  if not voidP(tabname) then theObject = pButtonList.getaprop(tabname) 
     1419  else theObject = 0 
     1420  if ilk(theObject) <> #proplist then theObject = pButtonList[1] 
     1421   
     1422  theObject = theObject.getaprop(#myScriptObject) 
     1423   
     1424  eventsToProcess = theObject.pOptions[#eventsToProcess] 
     1425  if not(listP(eventsToProcess)) then 
     1426    theObject.pOptions[#eventsToProcess] = [] 
     1427  else 
     1428    eventsToProcess.deleteOne(theEvent) 
     1429  end if 
     1430   
     1431end 
     1432 
     1433-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     1434 
    11881435on mGetButtonState me, tabname 
     1436  ----------------------------------- 
     1437  -- ACTION:   get the selected state of the button (radio or toggle button - checkbox) 
     1438  -- INPUT:   <tabname> ; string ; name of the button we want to address 
     1439  -- RETURNS:  boolean (integer) 
     1440  ----------------------------------- 
    11891441   
    11901442  if not(pButtonList.count) then return 0 
     
    11981450 
    11991451-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    1200 -- set the enabled state of the button; 1 = enabled, 0 = disabled 
    1201 -- accepts: #integer 
     1452 
    12021453on mSetButtonState me, selState, tabname 
     1454  ----------------------------------- 
     1455  -- ACTION:   set the selected state of the button (radio or toggle button - checkbox) 
     1456  -- 
     1457  -- INPUT:    <selState> ; boolean (integer) ; true => selected, false => not selected 
     1458  --           <tabname> ; string ; name of the button we want to address 
     1459  -- RETURNS:  - 
     1460  ----------------------------------- 
    12031461   
    12041462  if not(pButtonList.count) then exit 
     
    12271485 
    12281486on mTranslateAllButtonRects me, delta 
     1487  ----------------------------------- 
     1488  -- ACTION:   move all buttons by point <delta> 
     1489  -- 
     1490  -- INPUT:    <delta> ; point ; offset x and offset y to move the button sprite/overlay 
     1491  -- RETURNS:  - 
     1492  ----------------------------------- 
     1493   
    12291494  repeat with n = count(pButtonList) down to 1 
    12301495    mTranslateButtonRect me, delta, pButtonList.getPropAt(n) 
     
    12361501 
    12371502on mTranslateButtonRect me, trans, tabname 
     1503  ----------------------------------- 
     1504  -- ACTION:   move a single button by point <trans> 
     1505  -- 
     1506  -- INPUT:    <trans> ; point ; offset x and offset y to move the button sprite/overlay 
     1507  --           <tabname> ; string ; name of the button we want to address 
     1508  -- RETURNS:  - 
     1509  ----------------------------------- 
     1510   
    12381511  if not(pButtonList.count) then exit 
    12391512   
     
    12491522 
    12501523on mSetCurrentButtonRect me, newRect, tabname 
     1524  ----------------------------------- 
     1525  -- ACTION:   set the rect of the specified button to absolut stage coordinates 
     1526  --          (this may distort the button, so best is to use the rect you get from mGetCurrentButtonRect()) 
     1527  -- 
     1528  -- INPUT:    <newRect> ; rect ; new button rect 
     1529  --           <tabname> ; string ; name of the button we want to address 
     1530  -- RETURNS:  - 
     1531  ----------------------------------- 
     1532   
    12511533  if not(pButtonList.count) then exit 
    12521534   
     
    12631545 
    12641546on mGetCurrentButtonRect me, tabname 
     1547  ----------------------------------- 
     1548  -- ACTION:   get the rect of the specified button in absolut stage coordinates 
     1549  -- 
     1550  -- INPUT:    <tabname> ; string ; name of the button we want to address 
     1551  -- RETURNS:  rect 
     1552  ----------------------------------- 
     1553   
    12651554  if not(pButtonList.count) then return 0 
    12661555   
     
    12741563end 
    12751564 
    1276 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     1565 
     1566-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     1567on _____SEMI_PUBLIC_HANDLERS 
     1568  -- handlers from other scripts, in this case from the resize stage behavior 
     1569end 
     1570-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     1571 
    12771572-- event from the resize bar behavior 
    12781573 
     
    14141709         
    14151710         
    1416         blenderTO = call(#mCreateTimeout, [pIncludes.getaprop(#commonmoviescript)], "ButtonManager_BlenderTimeout", 30, #mDoBlendAnimation, me) 
     1711        blenderTO = pIncludes.mCreateTimeout("ButtonManager_BlenderTimeout", 30, #mDoBlendAnimation, me) 
    14171712        --          if mCheckWoody() = 1 then 
    14181713        --            blenderTO = timeout().new("ButtonManager_BlenderTimeout", 30, #mDoBlendAnimation, me) 
     
    14451740     
    14461741    callFunction = eventList.getaprop(#callFunction) 
    1447     if ilk(callFunction) = #symbol then 
    1448       anz = eventList[#broadcastSprites].count 
     1742    --    if ilk(callFunction) = #symbol then 
     1743    anz = count(eventList[#broadcastSprites]) 
    14491744      eventList[#secondEvent] = secondEvent 
    14501745      if not(anz) then 
     1746      if ilk(callFunction) = #symbol then 
    14511747        sendAllSprites(callFunction, whichEvent, eventList, me, callerObject) 
     1748      end if 
    14521749      else if eventList[#broadcastSprites][1] = -1 then 
     1750      if ilk(callFunction) = #symbol then 
    14531751        str = string(callFunction)&&"#"&whichEvent&","&&QUOTE&eventList.getaprop(#label)&QUOTE&","&&eventList.getaprop(#selected)&","&&secondEvent 
    14541752        do str 
     1753      end if 
    14551754      else if eventList[#broadcastSprites][1] = 0 then 
     1755      if ilk(callFunction) = #symbol then 
    14561756        sendSprite(me.spritenum, callFunction, whichEvent, eventList, me, callerObject) 
     1757      end if 
    14571758      else 
    14581759        repeat with n = 1 to anz 
    14591760          this = eventList[#broadcastSprites][n] 
    14601761          if integerP(this) then 
     1762          if ilk(callFunction) = #symbol then 
    14611763            sendSprite(this, callFunction, whichEvent, eventList, me, callerObject) 
     1764          end if 
    14621765          else if ilk(this) = #instance then 
     1766          if ilk(callFunction) = #symbol then 
    14631767            call(callFunction, [this], whichEvent, eventList, me, callerObject) 
     1768          end if 
    14641769          else if ilk(this) = #script then 
     1770          if ilk(callFunction) = #symbol then 
    14651771            call(callFunction, [this], whichEvent, eventList, me, callerObject) 
    1466           else 
    1467             derkanal = call(#mGetKanal, [pIncludes.getaprop(#commonmoviescript)], this) 
     1772          end if 
     1773        else if ilk(this) = #proplist then 
     1774          cfunc = this[#handler] 
     1775          if ilk(cfunc) <> #symbol then cfunc = callFunction 
     1776          if ilk(cfunc) = #symbol then 
     1777            tgt = this[#target] 
     1778            if objectP(tgt) then 
     1779              call(cfunc, [tgt], whichEvent, eventList, me, callerObject, this) 
     1780            else 
     1781              derkanal = pIncludes.mGetKanal(tgt) 
     1782              if derkanal > 0 then sendSprite(derkanal, cfunc, whichEvent, eventList, me, callerObject, this) 
     1783            end if 
     1784          end if 
     1785        else 
     1786          if ilk(callFunction) = #symbol then 
     1787            derkanal = pIncludes.mGetKanal(this) 
    14681788            if derkanal > 0 then sendSprite(derkanal, callFunction, whichEvent, eventList, me, callerObject) 
    14691789          end if 
    1470         end repeat 
    1471       end if 
     1790        end if 
     1791      end repeat 
     1792      --      end if 
    14721793    end if 
    14731794     
     
    20182339              retval = 1 
    20192340               
     2341              thisButton.setaprop(#currentPressed, 0) 
     2342               
    20202343              exit repeat 
    20212344               
     
    20282351            end if 
    20292352          end if 
     2353           
    20302354        end if 
    20312355      end if 
     
    20342358  end if 
    20352359   
     2360  if count(pButtonList) > 0 then 
    20362361  repeat with n = n down to 1 
    20372362    thisButton = pButtonList[n] 
    20382363    if thisButton.getaprop(#currentPressed) = 1 then 
    20392364      call(#myMouseUpOutside, [thisButton.getaprop(#myScriptObject)]) 
     2365        thisButton.setaprop(#currentPressed, 0) 
    20402366    end if 
    20412367  end repeat 
     2368  end if 
    20422369   
    20432370  return retval 
     
    21542481on myKeyDown me, tk, kc, theName 
    21552482   
    2156   if call(#mHandleKeyEvent, [pIncludes.getaprop(#commonmoviescript)], tk, kc) then exit -- this is a movielevel handler, which gets keyevents first for example to quit the movie 
     2483  if pIncludes.mHandleKeyEvent(tk, kc) then exit -- this is a movielevel handler, which gets keyevents first for example to quit the movie 
    21572484   
    21582485  if not pAktiv then exit 
     
    21642491  else 
    21652492    theObject = pButtonList.getaprop(theName) 
    2166     if ilk(theObject) = #proplist then 
     2493    if objectP(theObject) then 
    21672494      call(#mKeyDown, [theObject.getaprop(#myScriptObject)], tk, kc) 
    21682495    end if 
     
    22002527  breite = whichImg.width 
    22012528  hoehe = whichImg.height 
    2202   powerbreite = call(#mGetNextPowerOfTwo, [pIncludes.getaprop(#commonmoviescript)], breite) 
    2203   powerhoehe = call(#mGetNextPowerOfTwo, [pIncludes.getaprop(#commonmoviescript)], hoehe) 
     2529  powerbreite = pIncludes.mGetNextPowerOfTwo(breite) 
     2530  powerhoehe = pIncludes.mGetNextPowerOfTwo(hoehe) 
    22042531   
    22052532  if (powerbreite <> breite) or (powerhoehe <> hoehe) then 
  • trunk/lingosource/castlib3/DropShadowPScript.ls

    r14 r18  
    1 -- Drop Shadow and Cutout 
    2 -- Alex da Franca ©2002 
    3 -- da.franca@online.de 
    4  
     1-- DropShadowPScript 
     2----------------------------------- 
     3-- CREATED: 
     4-- Alex da Franca c2002 - alex@farbflash.de 
     5-- 
     6-- DESCRIPTION: 
     7--                Apply a Drop Shadow or Cutout to an image object. 
     8--                It started as drop shadow for rectangles using plain lingo. 
     9--                In D10.1 Flash filters appeared and since then we can do much faster 
     10--                and much better blur and therefore drop shadows. 
     11--                My frontend to flash filters is the script "FlashBitmapFilterPS" 
     12--                So as soon as this script is found in one of the castlibs, the flash bitmap filters are used 
     13--                instead of the slower and limited to rects lingo solution. 
     14-- 
     15-- REQUIRES: 
     16--                script "commonMovieScript" 
     17--                optional: script "FlashBitmapFilterPS" 
     18-- 
     19-- USAGE: 
     20--                There is only one single function: mGetShadowImage 
     21--                Use that function to pply a shadow to an image object. 
     22-- EXAMPLE: 
     23--               
     24--               imgList = xscr(#DropShadowPScript).mGetShadowImage(myImageObject, rgb(0,0,0), 6, 55, 18, 1, #shadow) 
     25--               newShadowImage = imgList[1] 
     26--               maskeImage = imgList[2] 
     27--               shadowOffset = imgList[3] 
     28-- 
     29-- HISTORY: 
     30--  
    531-- change 22.08.03 
    632-- existing alphachannel now will be preserved 
     
    935-- New Flash Bitmap filter if script "FlashBitmapFilterPS" is present and version > 10.10 => flash bitmap filter was introduced with 10.11 
    1036 
    11 ----------- 
    12 -- Accepts: 
    13 ----------- 
    14 -- theImg = [#format:#imageObject, #comment:"source image"] 
    15 -- shadowColor = [#format:#color, #default:rgb(0,0,0), #comment:"Shadow Color"] 
    16 -- shadowDistance = [#format:#integer, #default:14, #range:[#min:2, #max:40], #comment:"Schattenhoehe:"] 
    17 -- winkel = [#format:#integer, #default:45, #range:[#min:0, #max:360], #comment:"Winkel:"] 
    18 -- blur = [#format:#integer, #default:14, #range:[#min:2, #max:40], #comment:"Schatten Blur:"] 
    19 -- exponent = [#format:#boolean, #default:1, #comment:"exponentiale grauverteilung:"] 
    20 -- theStyle = [#format:#symbol, #default:#shadow, #range:[#shadow, #cutout], #comment:"Shadow style:"] 
    21 -- returnMask = [#format:#boolean, #default:0, #comment:"if style = #cutout return image and mask instead of drawing into iamge"] 
    22 -- alphaLevel = [#format:#float #integer, #default:1.0, #range:[#min:0.0, #max:1.0], #comment:"Only used for flash filters: alphalevel (if integer is used -> range => 0 - 100)"] 
    23  
    24 ----------- 
    25 -- Returns: 
    26 ----------- 
    27 -- if <theStyle> = #shadow then returns linear list with: 
    28 -- imageObject, the original image copied onto a border for the drop shadow 
    29 -- imageObject (8-bit #grayscale), to use as mask for the shadow 
    30 -- point, the offset of the returned image from top left 
    31  
    32 -- if <theStyle> = #cutout then returns nothing, but rather draws the shadow directly into the imageObject <theImg>, which was passed to the function 
    33 -- except when <returnMask> is true 
    34  
    35  
    36 ----------- 
    37 -- Requires: 
    38 ----------- 
    39 -- script "commonMovieScript" 
    40 -- optional: script "FlashBitmapFilterPS" 
    41  
    42  
    43 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     37-- Scriptmarker (15.10.2008 at 10:34 Uhr): alex changes // Scriptmarker 
     38-- added paramater to prevent trimwhitespace, when using flash bitmap filters for drop shadows 
     39----------------------------------- 
     40 
     41 
    4442 
    4543on new me 
     
    5149 
    5250on interface me 
    53   str = "DropShadowPScript  by alex da franca ©2003 -- alex@farbflash.de -- all rigths reserved" 
     51  str = "DropShadowPScript  by alex da franca c2003 -- alex@farbflash.de -- all rigths reserved" 
    5452   
    5553  put RETURN & "-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" after str 
    5654  put RETURN & "-- xxxxxxxxxxxxxxxxxx Description" after str 
    57   put RETURN & "on mGetShadowImage me, theImg, shadowColor, shadowDistance, winkel, blur, exponent, theStyle, returnMask, alphaLevel" after str 
     55  put RETURN & "on mGetShadowImage me, theImage, shadowColor, shadowDistance, shadowAngle, blur, exponent, theStyle, returnMask, alphaLevel, dontTrimWhiteSpace" after str 
    5856  put RETURN & "" after str 
    5957   
     
    6462-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    6563 
    66 on mGetShadowImage me, theImg, shadowColor, shadowDistance, winkel, blur, exponent, theStyle, returnMask, alphaLevel 
    67    
    68   if ilk(theImg) <> #image then return [] 
     64on mGetShadowImage me, theImage, shadowColor, shadowDistance, shadowAngle, blur, exponent, theStyle, returnMask, alphaLevel, dontTrimWhiteSpace 
     65  ----------------------------------- 
     66  -- ACTION:       Apply a Drop Shadow or Cutout to an image object. 
     67  --               As soon as this script is found in one of the castlibs, the flash bitmap filters are used 
     68  --               instead of the slower and limited to rects lingo solution. 
     69  -- INPUT:  
     70  --               <theImage>           = [#format:#imageObject, #comment:"source image"] 
     71  --               <shadowColor>        = [#format:#color, #default:rgb(0,0,0), #comment:"Shadow Color"] 
     72  --               <shadowDistance>     = [#format:#integer, #default:14, #range:[#min:2, #max:40], #comment:"Schattenhoehe:"] 
     73  --               <shadowAngle>        = [#format:#integer, #default:45, #range:[#min:0, #max:360], #comment:"shadowAngle:"] 
     74  --               <blur>               = [#format:#integer, #default:14, #range:[#min:2, #max:40], #comment:"Schatten Blur:"] 
     75  --               <exponent>           = [#format:#boolean, #default:1, #comment:"exponentiale grauverteilung:"] 
     76  --               <theStyle>           = [#format:#symbol, #default:#shadow, #range:[#shadow, #cutout], #comment:"Shadow style:"] 
     77  --               <returnMask>         = [#format:#boolean, #default:0, #comment:"if style = #cutout return image and mask instead of drawing into image"] 
     78  --               <alphaLevel>         = [#format:#float #integer, #default:1.0, #range:[#min:0.0, #max:1.0], #comment:"Only used for flash filters: alphalevel (if integer is used -> range => 0 - 100)"] 
     79  --               <dontTrimWhiteSpace> = [#format:#boolean, #default:0, #comment:"If using flash bitmap filters, flag to NOT trimwhitespace, so that the image object will retain its size"] 
     80  -- RETURNS:  
     81  --               if <theStyle> = #shadow then returns linear list with: 
     82  --               imageObject, the original image copied onto a border for the drop shadow 
     83  --               imageObject (8-bit #grayscale), to use as mask for the shadow 
     84  --               point, the offset of the returned image from top left 
     85  -- 
     86  --               if <theStyle> = #cutout then returns nothing, but rather draws the shadow directly into the imageObject <theImage>, which was passed to the function 
     87  --               except when <returnMask> is true 
     88  -- EXAMPLE:  
     89  --              imgList = xscr(#DropShadowPScript).mGetShadowImage(myImageObject, rgb(0,0,0), 6, 55, 18, 1, #shadow) 
     90  --              newShadowImage = imgList[1] 
     91  --              maskeImage = imgList[2] 
     92  --              shadowOffset = imgList[3] 
     93  ----------------------------------- 
     94   
     95  if ilk(theImage) <> #image then return [] 
    6996  if ilk(shadowColor) <> #color then shadowColor = rgb(0,0,0) 
    7097  if ilk(shadowDistance, #number) = 0 then shadowDistance = 14 
    7198  if ilk(blur, #number) = 0 then blur = 14 
    72   if ilk(winkel, #number) = 0 then winkel = 45 
     99  if ilk(shadowAngle, #number) = 0 then shadowAngle = 45 
    73100   
    74101   
     
    82109  if theStyle <> #cutout then 
    83110    cms = mGetXscript() 
    84     if voidP(cms) then scr = mGetInstance("FlashBitmapFilterPS") 
     111    if listP(cms) then scr = mGetInstance("FlashBitmapFilterPS") 
    85112    else scr = call(#mGetInstance, cms, "FlashBitmapFilterPS") 
    86113    if ilk(scr) = #instance then 
     
    96123            if xlist[n].getaprop(#name) = #ActionScriptObjects then 
    97124              prodVers = xlist[n].getaprop(#version) 
    98               vn = call(#mGetFloatVersionNumber, [mGetXscript()], prodVers) 
     125              vn = call(#mGetFloatVersionNumber, mGetXscript(), prodVers) 
    99126              if ilk(vn, #number) = 1 then flash8XtraPresent = (vn > 10.1) 
    100127              exit repeat 
     
    112139        --      if theStyle = #cutout then 
    113140        --        if not(returnMask) then 
    114         --          winkel = winkel + 180 
    115         --          shdparams = [#distance: shadowDistance, #angle: winkel, #alpha: alphaLevel, #quality: 3, #blurX: blur, #blurY: blur, #shadowcolor: shadowColor, #highlightalpha:0.0, #type:"inner"] 
    116         --          i = call(#mBevel, [scr], theImg, shdparams) 
     141          --          shadowAngle = shadowAngle + 180 
     142          --          shdparams = [#distance: shadowDistance, #angle: shadowAngle, #alpha: alphaLevel, #quality: 3, #blurX: blur, #blurY: blur, #shadowcolor: shadowColor, #highlightalpha:0.0, #type:"inner"] 
     143          --          i = call(#mBevel, [scr], theImage, shdparams) 
    117144        --          -- call(#mPut, [mGetXScript()], i) 
    118         --          theImg.copyPixels(i, i.rect, i.rect) 
     145          --          theImage.copyPixels(i, i.rect, i.rect) 
    119146        --          exit 
    120147        --        end if 
    121148        --      else 
    122149         
    123         rAlt = theImg.rect 
     150          rAlt = theImage.rect 
    124151         
    125152        blur = blur/3.0 
    126153        shadowDistance = shadowDistance / 3. 
    127154         
    128         shdparams = [#distance: shadowDistance, #angle: winkel, #alpha: alphaLevel, #quality: 3, #blurX: blur, #blurY: blur, #color: shadowColor] 
    129         i = call(#mDropShadow, scr, theImg, shdparams) 
     155          shdparams = [#distance: shadowDistance, #angle: shadowAngle, #alpha: alphaLevel, #quality: 3, #blurX: blur, #blurY: blur, #color: shadowColor] 
     156          i = call(#mDropShadow, scr, theImage, shdparams) 
    130157         
    131158        rNeu = i.rect 
     
    134161         
    135162         
     163          if dontTrimWhiteSpace then 
     164             
     165            m  = i.extractAlpha() 
     166            return [i, m, point(0,0)] 
     167             
     168          else 
    136169        -- get the cropped rect: 
    137170        --        croprect = call(#mGetCropRect, [mGetXscript(#ImageUtilityScripts)], i.extractAlpha()) 
     
    158191        return [i2, m, vers] 
    159192         
    160         --      end if 
     193          end if 
    161194         
    162195      end if 
     
    175208   
    176209  --  blur = min(blur, shadowDistance) 
    177   theRect = theImg.rect 
     210  theRect = theImage.rect 
    178211   
    179212  -- radialer verlauf 
     
    235268  pSchatten.fill(rect(blur, blur, (breite - blur), (hoehe - blur)), col) 
    236269   
    237   rad = pi()/180 * winkel 
     270  rad = pi()/180 * shadowAngle 
    238271  halbesblur = blur/2.0 
    239272   
     
    297330    t2.copyPixels(tempimg, theRect, theRect.offset(vhBild, vvBild), [#ink:2]) 
    298331    t2 = t2.createMask() 
    299     --    i2 = theImg.duplicate() 
    300     --    i3 = image(theRect.width, theRect.height, theImg.depth, 0) 
     332    --    i2 = theImage.duplicate() 
     333    --    i3 = image(theRect.width, theRect.height, theImage.depth, 0) 
    301334    --    i3.fill(i3.rect, shadowColor) 
    302335    --    i2.copyPixels(i3, theRect, theRect, [#maskImage:t2]) 
    303336    --    return i2 
    304337     
    305     i3 = image(theRect.width, theRect.height, theImg.depth, 0) 
     338    i3 = image(theRect.width, theRect.height, theImage.depth, 0) 
    306339    i3.fill(i3.rect, shadowColor) 
    307340     
     
    309342      return [t2, i3] 
    310343    else 
    311       theImg.copyPixels(i3, theRect, theRect, [#maskImage:t2]) 
     344      theImage.copyPixels(i3, theRect, theRect, [#maskImage:t2]) 
    312345    end if 
    313346     
    314347  else 
    315     if theImg.depth = 32 and theImg.useAlpha = 1 then 
    316       tempimg.copyPixels(theImg.extractalpha(), theRect.offset(vhBild, vvBild), theRect) 
     348    if theImage.depth = 32 and theImage.useAlpha = 1 then 
     349      tempimg.copyPixels(theImage.extractalpha(), theRect.offset(vhBild, vvBild), theRect) 
    317350    else 
    318351      tempimg.fill(theRect.offset(vhBild, vvBild), rgb(0,0,0)) 
    319352    end if 
    320353     
    321     t2 = image((theRect.width + imgW), (theRect.height + imgH), theImg.depth, 0) 
     354    t2 = image((theRect.width + imgW), (theRect.height + imgH), theImage.depth, 0) 
    322355    t2.fill(t2.rect, shadowColor) 
    323     t2.copyPixels(theImg, theImg.rect.offset(vhBild, vvBild), theImg.rect) 
     356    t2.copyPixels(theImage, theImage.rect.offset(vhBild, vvBild), theImage.rect) 
    324357    return [t2, tempimg, point(vhBild, vvBild)] 
    325358  end if 
  • trunk/lingosource/castlib3/FileIOFunktionen.ls

    r15 r18  
    1 -- FileIO Handlers -- ©03 Alex da Franca -- alex@farbflash.de 
     1-- FileIO Handlers -- c03 Alex da Franca -- alex@farbflash.de 
    22--------------------------------------------------------------------- 
    33 
     
    6363  if not(internetLink) then internetLink = (fname starts "www.") 
    6464  if the runmode contains "plugin" or internetLink then 
    65     scr = xscr().mGetInstance("NetLingoManagerPS__") 
    66     if ilk(scr) = #instance then 
    67       scr.mStartNetOP(paramList) 
    68     else 
     65    --    scr = xscr().mGetInstance("NetLingoManagerPS__") 
     66    --    if ilk(scr) = #instance then 
     67    --      scr.mStartNetOP(paramList) 
     68    --    else 
    6969      scr = xscr().mGetInstance("NetTextReaderPS") 
    7070    if ilk(scr) = #instance then 
     
    7575      call(paramList.getaprop(#handler), [paramList.getaprop(#target)], paramList) 
    7676    end if 
    77     end if 
     77    --    end if 
    7878  else 
    7979    paramList.setaprop(#theTextResult, mGetTextFromFile(me, paramList.getaprop(#theURL))) 
     
    106106      if call(#mCheckForXtra, mGetXScript(), "BudAPI") = 1 then 
    107107        startfolder = string(startfolder) 
     108         
     109        resetUNames = 0 
     110        if the platform contains "mac" then 
     111        if baSysFolder("prefs") starts "/" then 
     112          baReturnUnixNames(0) 
     113          resetUNames = 1 
     114        end if 
     115        end if 
    108116        if length(startfolder) > 0 then 
    109117          pfad = baGetFilename("save", startfolder, theDefaultName, "", 524288+2+4+4194304, theTitle, false, -1, -1) 
     
    111119        pfad = baGetFilename("save", "", theDefaultName, "", 524288+2+4+4194304, theTitle, false, -1, -1) 
    112120        end if 
     121         
     122        if resetUNames = 1 then baReturnUnixNames(1) 
     123         
    113124      else 
    114125        pfad = fio.displaySave(theTitle, theDefaultName) 
     
    275286  if call(#mCheckForXtra, mGetXScript(), "BudAPI") = 1 then 
    276287     
     288    resetUNames = 0 
     289    if the platform contains "mac" then 
     290    if baSysFolder("prefs") starts "/" then 
     291      baReturnUnixNames(0) 
     292      resetUNames = 1 
     293    end if 
     294    end if 
     295     
    277296    startDir = string(startDir) 
    278297    defaultName = string(defaultName) 
     
    281300    prompt = string(prompt) 
    282301