home *** CD-ROM | disk | FTP | other *** search
/ The Dynamic Human Version 2.0 / DH2_CD2.ISO / pc / files / map.dxr / Internal_19_getButtonRect.ls < prev    next >
Encoding:
Text File  |  1998-11-13  |  732 b   |  20 lines

  1. on getButtonRect whichMember, shiftAmount
  2.   global mapRegPoint, slideShiftH
  3.   if voidp(shiftAmount) then
  4.     set shiftAmount to 0
  5.   end if
  6.   set shiftAmount to shiftAmount * slideShiftH
  7.   set nextMemNumber to the number of member whichMember
  8.   set nextRegPoint to the regPoint of cast nextMemNumber
  9.   set nextWidth to the width of cast nextMemNumber
  10.   set nextHeight to the height of cast nextMemNumber
  11.   set centerH to getAt(nextRegPoint, 1) - shiftAmount
  12.   set centerV to getAt(nextRegPoint, 2)
  13.   set leftH to getAt(mapRegPoint, 1) - centerH
  14.   set rightH to leftH + nextWidth
  15.   set topV to getAt(mapRegPoint, 2) - centerV
  16.   set bottomV to topV + nextHeight
  17.   set theRect to rect(leftH, topV, rightH, bottomV)
  18.   return theRect
  19. end
  20.