Advertisement
djvj

Untitled

Sep 20th, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 78.74 KB | None | 0 0
  1. MCRC=A54ECE33
  2. MVersion=1.1.8
  3.  
  4. ; Default transition animation used for Fade_In
  5. DefaultAnimateFadeIn(direction,time){
  6. Global Fade_hwnd1,Fade_hdc1,fadeLyr1CanvasX,fadeLyr1CanvasY,fadeLyr1CanvasW,fadeLyr1CanvasH
  7. Global Fade_hwnd2,Fade_hdc2,fadeLyr2CanvasX,fadeLyr2CanvasY,fadeLyr2CanvasW,fadeLyr2CanvasH
  8. Global Fade_hwnd3Static,Fade_hdc3Static,fadeLyr3StaticCanvasX,fadeLyr3StaticCanvasY,fadeLyr3StaticCanvasW,fadeLyr3StaticCanvasH
  9. Global Fade_hwnd3,Fade_hdc3,fadeLyr3CanvasX,fadeLyr3CanvasY,fadeLyr3CanvasW,fadeLyr3CanvasH
  10. Global Fade_hwnd4,Fade_hdc4,fadeLyr4CanvasX,fadeLyr4CanvasY,fadeLyr4CanvasW,fadeLyr4CanvasH,FadeLayer4AnimFilesAr
  11. Global Fade_hwnd5,Fade_hdc5,fadeLyr5CanvasX,fadeLyr5CanvasY,fadeLyr5CanvasW,fadeLyr5CanvasH
  12. Global Fade_hwnd6,Fade_hdc6,fadeLyr6CanvasX,fadeLyr6CanvasY,fadeLyr6CanvasW,fadeLyr6CanvasH
  13. Global Fade_hwnd7,Fade_hdc7,fadeLyr7CanvasX,fadeLyr7CanvasY,fadeLyr7CanvasW,fadeLyr7CanvasH
  14. Log("DefaultAnimateFadeIn - Started, direction is: " . direction)
  15. startTime := A_TickCount
  16. If direction = in
  17. Log("DefaultAnimateFadeIn - Drawing First FadeIn Image.", 1)
  18. Loop{
  19. t := ((TimeElapsed := A_TickCount-startTime) < time) ? (If direction="in" ? 255*(timeElapsed/time) : 255*(1-(timeElapsed/time))) : (If direction="in" ? 255 : 0)
  20. if fadeLyr1CanvasW
  21. Alt_UpdateLayeredWindow(Fade_hwnd1, Fade_hdc1, fadeLyr1CanvasX, fadeLyr1CanvasY, fadeLyr1CanvasW, fadeLyr1CanvasH, t) ; to fade in, set transparency to 0 at first
  22. if fadeLyr2CanvasW
  23. Alt_UpdateLayeredWindow(Fade_hwnd2,Fade_hdc2,fadeLyr2CanvasX,fadeLyr2CanvasY,fadeLyr2CanvasW,fadeLyr2CanvasH, t)
  24. If direction = out
  25. {
  26. if fadeLyr3StaticCanvasW
  27. Alt_UpdateLayeredWindow(Fade_hwnd3Static, Fade_hdc3Static,fadeLyr3StaticCanvasX,fadeLyr3StaticCanvasY, fadeLyr3StaticCanvasW, fadeLyr3StaticCanvasH, t)
  28. if fadeLyr3CanvasW
  29. Alt_UpdateLayeredWindow(Fade_hwnd3, Fade_hdc3,fadeLyr3CanvasX,fadeLyr3CanvasY, fadeLyr3CanvasW, fadeLyr3CanvasH, t)
  30. if fadeLyr5CanvasW
  31. Alt_UpdateLayeredWindow(Fade_hwnd5, Fade_hdc5,fadeLyr5CanvasX,fadeLyr5CanvasY, fadeLyr5CanvasW, fadeLyr5CanvasH, t)
  32. if fadeLyr6CanvasW
  33. Alt_UpdateLayeredWindow(Fade_hwnd6, Fade_hdc6,fadeLyr6CanvasX,fadeLyr6CanvasY, fadeLyr6CanvasW, fadeLyr6CanvasH, t)
  34. if fadeLyr7CanvasW
  35. Alt_UpdateLayeredWindow(Fade_hwnd7, Fade_hdc7,fadeLyr7CanvasX,fadeLyr7CanvasY, fadeLyr7CanvasW, fadeLyr7CanvasH, t)
  36. If FadeLayer4AnimFilesAr.MaxIndex() > 0 {
  37. SetTimer, FadeLayer4Anim, Off
  38. Alt_UpdateLayeredWindow(Fade_hwnd4, Fade_hdc4,fadeLyr4CanvasX,fadeLyr4CanvasY, fadeLyr4CanvasW, fadeLyr4CanvasH, t)
  39. }
  40. }
  41. If (direction = "in" && t >= 255) or (direction = "out" && t <= 0)
  42. Break
  43. }
  44. Log("DefaultAnimateFadeIn - Ended")
  45. }
  46.  
  47. ; Default transition animation used for Fade_Out
  48. DefaultAnimateFadeOut(direction,time){
  49. Global FadeOut_hwnd1,FadeOut_hdc1,fadeOutLyr1CanvasX,fadeOutLyr1CanvasY,fadeOutLyr1CanvasW,fadeOutLyr1CanvasH
  50. Global fadeOutExtraScreen,FadeOutExtraScreen_ID,RLMediaPath,SystemName,dbName
  51. Log("DefaultAnimateFadeOut - Started, direction is: " . direction)
  52. If fadeOutExtraScreen = true
  53. { Log("DefaultAnimateFadeOut - Destroying FadeOutBlackScreen",4)
  54. AnimateWindow(FadeOutExtraScreen_ID, "out", "fade", 100) ; animate FadeOutBlackScreen out quickly
  55. Gui, FadeOutExtraScreen:Destroy ; destroy the temporary FadeOutBlackScreen
  56. }
  57. startTime := A_TickCount
  58. Loop{
  59. t := ((TimeElapsed := A_TickCount-startTime) < time) ? (If direction="in" ? 255*(timeElapsed/time) : 255*(1-(timeElapsed/time))) : (If direction="in" ? 255 : 0)
  60. Alt_UpdateLayeredWindow(FadeOut_hwnd1, FadeOut_hdc1, fadeOutLyr1CanvasX,fadeOutLyr1CanvasY,fadeOutLyr1CanvasW,fadeOutLyr1CanvasH, t) ; to fade in, set transparency to 0 at first
  61. If (direction = "in" && t >= 255) or (direction = "out" && t <= 0) {
  62. If (direction = "in") { ; play exit sound
  63. Log("DefaultAnimateFadeOut - Searching for an exit sound",4)
  64. If FileExist(RLMediaPath . "\Fade\" . SystemName . "\" . dbName . "\exit.mp3")
  65. exitSound := RLMediaPath . "\Fade\" . SystemName . "\" . dbName . "\exit.mp3"
  66. Else If FileExist(RLMediaPath . "\Fade\" . SystemName . "\_Default\exit.mp3")
  67. exitSound := RLMediaPath . "\Fade\" . SystemName . "\_Default\exit.mp3"
  68. Else If FileExist(RLMediaPath . "\Fade\_Default\exit.mp3")
  69. exitSound := RLMediaPath . "\Fade\_Default\exit.mp3"
  70. If exitSound {
  71. Log("DefaultAnimateFadeOut - Playing " . exitSound)
  72. SoundPlay, %exitSound%, 1 ; wait till sound is done playing
  73. }
  74. }
  75. Break
  76. }
  77. }
  78. Log("DefaultAnimateFadeOut - Ended")
  79. }
  80.  
  81. ; Legacy fadein animation for use when gdi does not work with an emulator. Jpgs are not supported and will not show on this legacy gui
  82. LegacyFadeInTransition(direction,time){
  83. Global Fade_hwnd1,Fade_hdc1,Fade_G1,fadeLyr1CanvasX,fadeLyr1CanvasY,fadeLyr1CanvasW,fadeLyr1CanvasH
  84. Global Fade_hwnd2,Fade_hdc2,fadeLyr2CanvasX,fadeLyr2CanvasY,fadeLyr2CanvasW,fadeLyr2CanvasH
  85. Global Fade_hwnd3Static,Fade_hdc3Static,fadeLyr3StaticCanvasX,fadeLyr3StaticCanvasY,fadeLyr3StaticCanvasW,fadeLyr3StaticCanvasH
  86. Global Fade_hwnd3,Fade_hdc3,fadeLyr3CanvasX,fadeLyr3CanvasY,fadeLyr3CanvasW,fadeLyr3CanvasH
  87. Global Fade_hwnd4,Fade_hdc4,fadeLyr4CanvasX,fadeLyr4CanvasY,fadeLyr4CanvasW,fadeLyr4CanvasH
  88. Global Fade_hwnd5,Fade_hdc5,fadeLyr5CanvasX,fadeLyr5CanvasY,fadeLyr5CanvasW,fadeLyr5CanvasH
  89. Global Fade_hwnd6,Fade_hdc6,fadeLyr6CanvasX,fadeLyr6CanvasY,fadeLyr6CanvasW,fadeLyr6CanvasH
  90. Global Fade_hwnd7,Fade_hdc7,fadeLyr7CanvasX,fadeLyr7CanvasY,fadeLyr7CanvasW,fadeLyr7CanvasH
  91. Global fadeLyr1PicW,fadeLyr1PicH,fadeInLyr1File,fadeLyr1Color,fadeLyr1AlignImage
  92. Global baseScreenWidth,baseScreenHeight
  93. Log("LegacyFadeInTransition - Started, direction is: " . direction)
  94. StringTrimLeft,fadeLyr1ColorNoAlpha,fadeLyr1Color,2 ; for legacy gui, we need to trim the alpha from the color as it's not supported
  95.  
  96. If direction = in
  97. { Log("LegacyFadeInTransition - Drawing First FadeIn Image.", 1)
  98. Gui, Fade_GUI1:Color, %fadeLyr1ColorNoAlpha%
  99. GetBGPicPosition(fadeLyr1PicXNew,fadeLyr1PicYNew,fadeLyr1PicWNew,fadeLyr1PicHNew,fadeLyr1PicW,fadeLyr1PicH,fadeLyr1AlignImage) ; get the background pic's new position and size
  100. If (fadeLyr1AlignImage = "Stretch and Lose Aspect")
  101. Gui, Fade_GUI1:Add, Picture,w%baseScreenWidth% h%baseScreenHeight% x0 y0, %fadeInLyr1File%
  102. Else If (fadeLyr1AlignImage = "Stretch and Keep Aspect" Or fadeLyr1AlignImage = "Center Width" Or fadeLyr1AlignImage = "Center Height" Or fadeLyr1AlignImage = "Align to Bottom Left" Or fadeLyr1AlignImage = "Align to Bottom Right")
  103. Gui, Fade_GUI1:Add, Picture,w%fadeLyr1PicWNew% h%fadeLyr1PicHNew% x%fadeLyr1PicXNew% y%fadeLyr1PicYNew%, %fadeInLyr1File%
  104. Else If (fadeLyr1AlignImage = "Center") ; original image size and aspect
  105. Gui, Fade_GUI1:Add, Picture,w%fadeLyr1PicW% h%fadeLyr1PicH% x%fadeLyr1PicXNew% y%fadeLyr1PicYNew%, %fadeInLyr1File%
  106. Else If (fadeLyr1AlignImage = "Align to Top Right") ; place the pic so the top right corner matches the screen's top right corner
  107. Gui, Fade_GUI1:Add, Picture,w%fadeLyr1PicWNew% h%fadeLyr1PicHNew% x%fadeLyr1PicXNew% y0, %fadeInLyr1File%
  108. Else ; place the pic so the top left corner matches the screen's top left corner, also the default
  109. Gui, Fade_GUI1:Add, Picture,w%fadeLyr1PicWNew% h%fadeLyr1PicHNew% x0 y0, %fadeInLyr1File%
  110. Gui, Fade_GUI1:Show, x0 y0 h%baseScreenHeight% w%baseScreenWidth% Hide
  111. }
  112. If direction = out
  113. { SetTimer, FadeLayer4Anim, Off
  114. Gdip_GraphicsClear(Fade_G2)
  115. Gdip_GraphicsClear(Fade_G3Static)
  116. Gdip_GraphicsClear(Fade_G3)
  117. Gdip_GraphicsClear(Fade_G4)
  118. Gdip_GraphicsClear(Fade_G5)
  119. Gdip_GraphicsClear(Fade_G6)
  120. Gdip_GraphicsClear(Fade_G7)
  121. Alt_UpdateLayeredWindow(Fade_hwnd2, Fade_hdc2, fadeLyr2CanvasX, fadeLyr2CanvasY, fadeLyr2CanvasW, fadeLyr2CanvasH)
  122. Alt_UpdateLayeredWindow(Fade_hwnd3Static, Fade_hdc3Static,fadeLyr3StaticCanvasX,fadeLyr3StaticCanvasY, fadeLyr3StaticCanvasW, fadeLyr3StaticCanvasH)
  123. Alt_UpdateLayeredWindow(Fade_hwnd3, Fade_hdc3, fadeLyr3CanvasX, fadeLyr3CanvasY, fadeLyr3CanvasW, fadeLyr3CanvasH)
  124. Alt_UpdateLayeredWindow(Fade_hwnd4, Fade_hdc4, fadeLyr4CanvasX, fadeLyr4CanvasY, fadeLyr4CanvasW, fadeLyr4CanvasH)
  125. Alt_UpdateLayeredWindow(Fade_hwnd5, Fade_hdc5, fadeLyr5CanvasX, fadeLyr5CanvasY, fadeLyr5CanvasW, fadeLyr5CanvasH)
  126. Alt_UpdateLayeredWindow(Fade_hwnd6, Fade_hdc6, fadeLyr6CanvasX, fadeLyr6CanvasY, fadeLyr6CanvasW, fadeLyr6CanvasH)
  127. Alt_UpdateLayeredWindow(Fade_hwnd7, Fade_hdc7, fadeLyr7CanvasX, fadeLyr7CanvasY, fadeLyr7CanvasW, fadeLyr7CanvasH)
  128. }
  129. AnimateWindow(Fade_hwnd1, direction, "fade", time) ; animate in fadeLayer1
  130. If direction = in
  131. Alt_UpdateLayeredWindow(Fade_hwnd2, Fade_hdc2, fadeLyr2CanvasX, fadeLyr2CanvasY, fadeLyr2CanvasW, fadeLyr2CanvasH)
  132. ; AnimateWindow(1_ID, direction, "slide bt", time) ; slide
  133. Log("LegacyFadeInTransition - Ended")
  134. }
  135.  
  136. ; Legacy fadeout animation for use when gdi does not work with an emulator. Jpgs are not supported and will not show on this legacy gui
  137. LegacyFadeOutTransition(direction,time){
  138. Global FadeOut_hwnd1, FadeOut_hdc1, fadeOutLyr1CanvasX,fadeOutLyr1CanvasY,fadeOutLyr1CanvasW,fadeOutLyr1CanvasH
  139. Global fadeOutExtraScreen,FadeOutExtraScreen_ID
  140. Global lyr1OutPicW,lyr1OutPicH,lyr1OutFile,fadeLyr1Color,fadeLyr1AlignImage
  141. Global baseScreenWidth,baseScreenHeight
  142. ;,fadeOutBlackScreenEnabled,FadeOutBlackScreen_ID
  143. Log("LegacyFadeOutTransition - Started, direction is: " . direction)
  144. StringTrimLeft,fadeLyr1ColorNoAlpha,fadeLyr1Color,2 ; for legacy gui, we need to trim the alpha from the color as it's not supported
  145. If direction = in
  146. {
  147. Gui, FadeOut_GUI1:Color, %fadeLyr1ColorNoAlpha%
  148. GetBGPicPosition(fadeLyr1OutPicXNew,fadeLyr1OutPicYNew,fadeLyr1OutPicWNew,fadeLyr1OutPicHNew,lyr1OutPicW,lyr1OutPicH,fadeLyr1AlignImage) ; get the background pic's new position and size
  149. If (fadeLyr1AlignImage = "Stretch and Lose Aspect")
  150. Gui, FadeOut_GUI1:Add, Picture,w%baseScreenWidth% h%baseScreenHeight% x0 y0, %lyr1OutFile%
  151. Else If (fadeLyr1AlignImage = "Stretch and Keep Aspect" Or fadeLyr1AlignImage = "Center Width" Or fadeLyr1AlignImage = "Center Height" Or fadeLyr1AlignImage = "Align to Bottom Left" Or fadeLyr1AlignImage = "Align to Bottom Right")
  152. Gui, FadeOut_GUI1:Add, Picture,w%fadeLyr1OutPicWNew% h%fadeLyr1OutPicHNew% x%fadeLyr1OutPicXNew% y%fadeLyr1OutPicYNew%, %lyr1OutFile%
  153. Else If (fadeLyr1AlignImage = "Center") ; original image size and aspect
  154. Gui, FadeOut_GUI1:Add, Picture,w%lyr1OutPicW% h%lyr1OutPicH% x%fadeLyr1OutPicXNew% y%fadeLyr1OutPicYNew%, %lyr1OutFile%
  155. Else If (fadeLyr1AlignImage = "Align to Top Right") ; place the pic so the top right corner matches the screen's top right corner
  156. Gui, FadeOut_GUI1:Add, Picture,w%fadeLyr1OutPicWNew% h%fadeLyr1OutPicHNew% x%fadeLyr1OutPicXNew% y0, %lyr1OutFile%
  157. Else ; place the pic so the top left corner matches the screen's top left corner, also the default
  158. Gui, FadeOut_GUI1:Add, Picture,w%fadeLyr1OutPicWNew% h%fadeLyr1OutPicHNew% x0 y0, %lyr1OutFile%
  159. Gui, FadeOut_GUI1:Show, x0 y0 h%baseScreenHeight% w%baseScreenWidth% Hide
  160. }
  161. If fadeOutExtraScreen = true
  162. { Log("LegacyFadeOutTransition - Destroying FadeOutBlackScreen",4)
  163. AnimateWindow(FadeOutExtraScreen_ID, "out", "fade", 100) ; animate FadeOutBlackScreen out quickly
  164. Gui, FadeOutExtraScreen:Destroy ; destroy the temporary FadeOutBlackScreen
  165. }
  166. AnimateWindow(FadeOut_hwnd1, direction, "fade", time) ; animate in fadeLayer1
  167. ; AnimateWindow(out1_ID, direction, "slide bt", time) ; slide
  168. Log("LegacyFadeOutTransition - Ended")
  169. }
  170.  
  171. ; Bleasby's DefaultFadeAnimation included in RocketLauncher - you can use it on both layer 3 animation and layer 3 7z animation
  172. DefaultFadeAnimation:
  173. ;SetTimer, DetectFadeError, Off
  174. Log("DefaultFadeAnimation - Started")
  175. ;====== Begin of menu code
  176. fadeInActive=1 ; As long as user did not press a key to exit fade, this var will be filled and fade will do its full animation
  177. ;====== Loading info about layer 3 image
  178. if fadeLyr3StaticPrefix
  179. fadeInLyr3StaticFile := GetFadePicFile(fadeLyr3StaticPrefix)
  180. If FileExist(fadeInLyr3StaticFile) ; If a layer 3 static image exists, let's get its dimensions
  181. { fadeLyr3StaticPic := Gdip_CreateBitmapFromFile(fadeInLyr3StaticFile)
  182. Gdip_GetImageDimensions(fadeLyr3StaticPic, fadeLyr3StaticPicW, fadeLyr3StaticPicH)
  183. ; find Width and Height
  184. If (fadeLyr3StaticPos = "Stretch and Lose Aspect"){
  185. fadeLyr3StaticPicW := baseScreenWidth
  186. fadeLyr3StaticPicH := baseScreenHeight
  187. fadeLyr3StaticPicPadX := 0 , fadeLyr3StaticPicPadY := 0
  188. } else if (fadeLyr3StaticPos = "Stretch and Keep Aspect"){
  189. widthMaxPercent := ( baseScreenWidth / fadeLyr3StaticPicW ) ; get the percentage needed to maximumise the image so it reaches the screen's width
  190. heightMaxPercent := ( baseScreenHeight / fadeLyr3StaticPicH )
  191. percentToEnlarge := If (widthMaxPercent < heightMaxPercent) ? widthMaxPercent : heightMaxPercent ; this basicallys says if the width's max reaches the screen's width first, use the width's percentage instead of the height's
  192. fadeLyr3StaticPicW := Round(fadeLyr3StaticPicW * percentToEnlarge)
  193. fadeLyr3StaticPicH := Round(fadeLyr3StaticPicH * percentToEnlarge)
  194. fadeLyr3StaticPicPadX := 0 , fadeLyr3StaticPicPadY := 0
  195. } else {
  196. if (!(fadeLyr3StaticW)) and (!(fadeLyr3StaticH)){
  197. fadeLyr3StaticPicW := Round(fadeLyr3StaticPicW * fadeXScale * fadeLyr3StaticAdjust)
  198. fadeLyr3StaticPicH := Round(fadeLyr3StaticPicH * fadeYScale * fadeLyr3StaticAdjust)
  199. } else if (fadeLyr3StaticW) and (!(fadeLyr3StaticH)){
  200. fadeLyr3StaticPicH := Round( fadeLyr3StaticPicH * (fadeLyr3StaticPicW / Round(fadeLyr3StaticPicW * fadeLyr3StaticAdjust)) )
  201. fadeLyr3StaticPicW := Round(fadeLyr3StaticW * fadeLyr3StaticAdjust)
  202. } else if (!(fadeLyr3StaticW)) and (fadeLyr3StaticH){
  203. fadeLyr3StaticPicW := Round( fadeLyr3StaticPicW * (fadeLyr3StaticPicH / Round(fadeLyr3StaticH * fadeLyr3StaticAdjust)) )
  204. fadeLyr3StaticPicH := Round(fadeLyr3StaticH * fadeLyr3StaticAdjust)
  205. } else {
  206. fadeLyr3StaticPicW := Round(fadeLyr3StaticW * fadeLyr3StaticAdjust)
  207. fadeLyr3StaticPicH := Round(fadeLyr3StaticH * fadeLyr3StaticAdjust)
  208. }
  209. }
  210. GetFadePicPosition(fadeLyr3StaticPicX,fadeLyr3StaticPicY,fadeLyr3StaticX,fadeLyr3StaticY,fadeLyr3StaticPicW,fadeLyr3StaticPicH,fadeLyr3StaticPos)
  211. ; figure out what quadrant the layer 3 Static image is in, so we know to apply a + or - pad value so the user does not have to
  212. If fadeLyr3StaticPos in No Alignment,Center,Top Left Corner
  213. fadeLyr3StaticPicPadX:=fadeLyr3StaticPicPad, fadeLyr3StaticPicPadY:=fadeLyr3StaticPicPad
  214. Else If fadeLyr3StaticPos = Top Center
  215. fadeLyr3StaticPicPadX:=0, fadeLyr3StaticPicPadY:=fadeLyr3StaticPicPad
  216. Else If fadeLyr3StaticPos = Left Center
  217. fadeLyr3StaticPicPadX:=fadeLyr3StaticPicPad, fadeLyr3StaticPicPadY:=0
  218. Else If fadeLyr3StaticPos = Top Right Corner
  219. fadeLyr3StaticPicPadX:=fadeLyr3StaticPicPad*-1, fadeLyr3StaticPicPadY:=fadeLyr3StaticPicPad
  220. Else If fadeLyr3StaticPos = Right Center
  221. fadeLyr3StaticPicPadX:=fadeLyr3StaticPicPad*-1, fadeLyr3StaticPicPadY:=0
  222. Else If fadeLyr3StaticPos = Bottom Left Corner
  223. fadeLyr3StaticPicPadX:=fadeLyr3StaticPicPad, fadeLyr3StaticPicPadY:=fadeLyr3StaticPicPad*-1
  224. Else If fadeLyr3StaticPos = Bottom Center
  225. fadeLyr3StaticPicPadX:=0, fadeLyr3StaticPicPadY:=fadeLyr3StaticPicPad*-1
  226. Else If fadeLyr3StaticPos = Bottom Right Corner
  227. fadeLyr3StaticPicPadX:=fadeLyr3StaticPicPad*-1, fadeLyr3StaticPicPadY:=fadeLyr3StaticPicPad*-1
  228. fadeLyr3StaticCanvasX := fadeLyr3StaticPicX + fadeLyr3StaticPicPadX , fadeLyr3StaticCanvasY := fadeLyr3StaticPicY + fadeLyr3StaticPicPadY
  229. fadeLyr3StaticCanvasW := fadeLyr3StaticPicW, fadeLyr3StaticCanvasH := fadeLyr3StaticPicH
  230. pGraphUpd(Fade_G3Static,fadeLyr3StaticCanvasW,fadeLyr3StaticCanvasH)
  231. Gdip_Alt_DrawImage(Fade_G3Static, fadeLyr3StaticPic, 0, 0, fadeLyr3StaticPicW, fadeLyr3StaticPicH)
  232. }
  233. ;====== Loading info about layer 3 image
  234. fadeInLyr3File := GetFadePicFile("Layer 3")
  235. If FileExist(fadeInLyr3File)
  236. { fadeLyr3Pic := Gdip_CreateBitmapFromFile(fadeInLyr3File)
  237. Gdip_GetImageDimensions(fadeLyr3Pic, fadeLyr3PicOrigW, fadeLyr3PicOrigH)
  238. if (!(fadeLyr3W)) and (!(fadeLyr3H)){
  239. fadeLyr3PicW := Round(fadeLyr3PicOrigW * fadeXScale * fadeLyr3Adjust)
  240. fadeLyr3PicH := Round(fadeLyr3PicOrigH * fadeYScale * fadeLyr3Adjust)
  241. } else if (fadeLyr3W) and (!(fadeLyr3H)){
  242. fadeLyr3PicH := Round( fadeLyr3PicH * (fadeLyr3PicW / Round(fadeLyr3PicW * fadeLyr3Adjust)) )
  243. fadeLyr3PicW := Round(fadeLyr3W * fadeLyr3Adjust)
  244. } else if (!(fadeLyr3W)) and (fadeLyr3H){
  245. fadeLyr3PicW := Round( fadeLyr3PicW * (fadeLyr3PicH / Round(fadeLyr3H * fadeLyr3Adjust)) )
  246. fadeLyr3PicH := Round(fadeLyr3H * fadeLyr3Adjust)
  247. } else {
  248. fadeLyr3PicW := Round(fadeLyr3W * fadeLyr3Adjust)
  249. fadeLyr3PicH := Round(fadeLyr3H * fadeLyr3Adjust)
  250. }
  251. GetFadePicPosition(fadeLyr3PicX,fadeLyr3PicY,fadeLyr3X,fadeLyr3Y,fadeLyr3PicW,fadeLyr3PicH,fadeLyr3Pos)
  252. If fadeLyr3Pos in No Alignment,Center,Top Left Corner
  253. fadeLyr3PicPadX:=fadeLyr3PicPad, fadeLyr3PicPadY:=fadeLyr3PicPad
  254. Else If fadeLyr3Pos = Top Center
  255. fadeLyr3PicPadX:=0, fadeLyr3PicPadY:=fadeLyr3PicPad
  256. Else If fadeLyr3Pos = Left Center
  257. fadeLyr3PicPadX:=fadeLyr3PicPad, fadeLyr3PicPadY:=0
  258. Else If fadeLyr3Pos = Top Right Corner
  259. fadeLyr3PicPadX:=fadeLyr3PicPad*-1, fadeLyr3PicPadY:=fadeLyr3PicPad
  260. Else If fadeLyr3Pos = Right Center
  261. fadeLyr3PicPadX:=fadeLyr3PicPad*-1, fadeLyr3PicPadY:=0
  262. Else If fadeLyr3Pos = Bottom Left Corner
  263. fadeLyr3PicPadX:=fadeLyr3PicPad, fadeLyr3PicPadY:=fadeLyr3PicPad*-1
  264. Else If fadeLyr3Pos = Bottom Center
  265. fadeLyr3PicPadX:=0, fadeLyr3PicPadY:=fadeLyr3PicPad*-1
  266. Else If fadeLyr3Pos = Bottom Right Corner
  267. fadeLyr3PicPadX:=fadeLyr3PicPad*-1, fadeLyr3PicPadY:=fadeLyr3PicPad*-1
  268. fadeLyr3PicX := fadeLyr3PicX+fadeLyr3PicPadX
  269. fadeLyr3PicY := fadeLyr3PicY+fadeLyr3PicPadY
  270. }
  271. ;====== Loading Gif Files
  272. GifAnimation := GetFadeGifFile("Anim")
  273. If GifAnimation
  274. {
  275. AnimatedGifControl_GetImageDimensions(GifAnimation, GifWidth, GifHeight)
  276. if (!(fadeLyr4W)) and (!(fadeLyr4H)){
  277. fadeLyr4PicW := Round(GifWidth * fadeXScale * fadeLyr4Adjust)
  278. fadeLyr4PicH := Round(GifHeight * fadeYScale * fadeLyr4Adjust)
  279. } else if (fadeLyr4W) and (!(fadeLyr4H)){
  280. fadeLyr4PicH := Round( GifHeight * (GifWidth / Round(GifWidth * fadeLyr4Adjust)) )
  281. fadeLyr4PicW := Round(fadeLyr4W * fadeLyr4Adjust)
  282. } else if (!(fadeLyr4W)) and (fadeLyr4H){
  283. fadeLyr4PicW := Round( GifWidth * (GifHeight / Round(fadeLyr4H * fadeLyr4Adjust)) )
  284. fadeLyr4PicH := Round(fadeLyr4H * fadeLyr4Adjust)
  285. } else {
  286. fadeLyr4PicW := Round(fadeLyr4W * fadeLyr4Adjust)
  287. fadeLyr4PicH := Round(fadeLyr4H * fadeLyr4Adjust)
  288. }
  289. If (fadeLyr4Pos = "Above Layer 3 - Left") {
  290. fadeLyr4PicX := fadeLyr3PicX
  291. fadeLyr4PicY := fadeLyr3PicY-fadeLyr4PicH
  292. } Else If (fadeLyr4Pos = "Above Layer 3 - Center") {
  293. fadeLyr4PicX := fadeLyr3PicX+fadeLyr3PicW/2
  294. fadeLyr4PicY := fadeLyr3PicY-fadeLyr4PicH
  295. } Else If (fadeLyr4Pos = "Above Layer 3 - Right") {
  296. fadeLyr4PicX := fadeLyr3PicX+fadeLyr3PicW-fadeLyr4PicX
  297. fadeLyr4PicY := fadeLyr3PicY-fadeLyr4PicH
  298. } Else {
  299. GetFadePicPosition(fadeLyr4PicX,fadeLyr4PicY,fadeLyr4X,fadeLyr4Y,fadeLyr4PicW,fadeLyr4PicH,fadeLyr4Pos)
  300. }
  301. fadeTranspGifColor := % "0x" . fadeTranspGifColor
  302. Gui, Fade_GifAnim_GUI: +OwnerFade_GUI3 -Caption +LastFound +ToolWindow +AlwaysOnTop
  303. GifAnim_GUI_ID := WinExist()
  304. Gui, Fade_GifAnim_GUI: Color, %fadeTranspGifColor%
  305. WinSet, TransColor, %fadeTranspGifColor% , ahk_id %GifAnim_GUI_ID%
  306. hAniGif1 := AniGif_CreateControl(GifAnim_GUI_ID, 0, 0, fadeLyr4PicW,fadeLyr4PicH, "center")
  307. }
  308. ;====== Loading Layer 4 Animation Files
  309. If !GifAnimation
  310. {
  311. FadeLayer4AnimFilesAr := GetFadeAnimFiles("Layer",4)
  312. If FadeLayer4AnimFilesAr.MaxIndex() > 0
  313. {
  314. For index, value in FadeLayer4AnimFilesAr
  315. {
  316. FadeLayer4Anim%a_index%Pic := Gdip_CreateBitmapFromFile(value)
  317. FadeLayer4AnimTotal := a_index
  318. }
  319. Gdip_GetImageDimensions(FadeLayer4Anim1Pic, fadeLyr4PicW, fadeLyr4PicH)
  320. if (!(fadeLyr4W)) and (!(fadeLyr4H)){
  321. fadeLyr4PicW := Round(fadeLyr4PicW * fadeLyr4Adjust)
  322. fadeLyr4PicH := Round(fadeLyr4PicH * fadeLyr4Adjust)
  323. } else if (fadeLyr4W) and (!(fadeLyr4H)){
  324. fadeLyr4PicH := Round( fadeLyr4PicH * (fadeLyr4PicW / Round(fadeLyr4PicW * fadeLyr4Adjust)) )
  325. fadeLyr4PicW := Round(fadeLyr4W * fadeLyr4Adjust)
  326. } else if (!(fadeLyr4W)) and (fadeLyr4H){
  327. fadeLyr4PicW := Round( fadeLyr4PicW * (fadeLyr4PicH / Round(fadeLyr4H * fadeLyr4Adjust)) )
  328. fadeLyr4PicH := Round(fadeLyr4H * fadeLyr4Adjust)
  329. } else {
  330. fadeLyr4PicW := Round(fadeLyr4W * fadeLyr4Adjust)
  331. fadeLyr4PicH := Round(fadeLyr4H * fadeLyr4Adjust)
  332. }
  333. If (fadeLyr4Pos = "Above Layer 3 - Left") {
  334. fadeLyr4PicX := fadeLyr3PicX
  335. fadeLyr4PicY := fadeLyr3PicY-fadeLyr4PicH
  336. } Else If (fadeLyr4Pos = "Above Layer 3 - Center") {
  337. fadeLyr4PicX := fadeLyr3PicX+fadeLyr3PicW/2
  338. fadeLyr4PicY := fadeLyr3PicY-fadeLyr4PicH
  339. } Else If (fadeLyr4Pos = "Above Layer 3 - Right") {
  340. fadeLyr4PicX := fadeLyr3PicX+fadeLyr3PicW-fadeLyr4PicX
  341. fadeLyr4PicY := fadeLyr3PicY-fadeLyr4PicH
  342. } Else {
  343. GetFadePicPosition(fadeLyr4PicX,fadeLyr4PicY,fadeLyr4X,fadeLyr4Y,fadeLyr4PicW,fadeLyr4PicH,fadeLyr4Pos)
  344. }
  345. }
  346. }
  347. ;Layer 4 padding
  348. If fadeLyr4PicX < baseScreenWidth//2
  349. fadeLyr4PicX := fadeLyr4PicX+fadeLyr4PicPad
  350. Else
  351. fadeLyr4PicX := fadeLyr4PicX-fadeLyr4PicPad
  352. If fadeLyr4PicY < baseScreenHeight//2
  353. fadeLyr4PicX := fadeLyr4PicX+fadeLyr4PicPad
  354. Else
  355. fadeLyr4PicX := fadeLyr4PicX-fadeLyr4PicPad
  356. ;====== Loading Bar options
  357. If ((fadeLyr3Type = "bar") or (fadeLyr3Type = "ImageAndBar")) and ((fadeBar="true") or ( (fadeBar="7zOnly") and ((found7z="true") and (7zEnabled = "true") and !7zTempRomExists and use7zAnimation)) )
  358. {
  359. ;Creating Progress Bar Brushes
  360. fadeBrushWindow1 := Gdip_CreateLineBrushFromRect(0, 0, fadeBarWindowW, fadeBarWindowH, 0xff555555, 0xff050505)
  361. fadeBrushWindow2 := Gdip_BrushCreateHatch(0xff000000, 0x00000000, fadeBarWindowHatchStyle)
  362. fadeBrushBarBack := Gdip_BrushCreateSolid("0x" . fadeBarBackColor)
  363. fadeBrushBar := Gdip_BrushCreateHatch(0x00000000, "0x" . fadeBarColor, fadeBarHatchStyle)
  364. if (fadeBarWindow="Image") {
  365. fadeLyr3ProgressBarFile := GetFadePicFile("Progress Bar")
  366. fadeLyr3ProgressBar := Gdip_CreateBitmapFromFile(fadeLyr3ProgressBarFile)
  367. Gdip_GetImageDimensions(fadeLyr3ProgressBar, fadeBarImageW, fadeBarImageH)
  368. if (!(fadeBarWindowW)) and (!(fadeBarWindowH)){
  369. fadeBarWindowW := fadeBarImageW
  370. fadeBarWindowH := fadeBarImageH
  371. } else if (fadeBarWindowW) and (!(fadeBarWindowH)){
  372. fadeBarWindowW := Round(fadeBarImageW*fadeXScale)
  373. fadeBarWindowH := Round(fadeBarImageH*fadeXScale)
  374. } else if (!(fadeBarWindowW)) and (fadeBarWindowH){
  375. fadeBarWindowW := Round(fadeBarImageW*fadeYScale)
  376. fadeBarWindowH := Round(fadeBarImageH*fadeYScale)
  377. } else {
  378. fadeBarWindowW := Round(fadeBarImageW*fadeXScale)
  379. fadeBarWindowH := Round(fadeBarImageH*fadeYScale)
  380. }
  381. }
  382. fadeBarW := fadeBarWindowW-2*fadeBarWindowM ; controls the bar's width, calculated from the bar window width and margin
  383. ;Progress Bar
  384. fadeBarX := fadeBarWindowM ; Relative to window update area
  385. yBar := (fadeBarWindowH-fadeBarH)//2 ; Relative to window update area
  386. ; Percentage Text
  387. Gdip_FontFamilyCreate(fadeFont) ; Creating font family
  388. ;Acquiring text font size
  389. Loop, parse, fadeText1Options, %A_Space%
  390. {
  391. If (InStr(A_LoopField, "s")=1)
  392. stringtrimleft, fadeText1Height, A_LoopField, 1
  393. }
  394. Loop, parse, fadeText2Options, %A_Space%
  395. {
  396. If (InStr(A_LoopField, "s")=1)
  397. stringtrimleft, fadeText2Height, A_LoopField, 1
  398. }
  399. If !fadeText1X
  400. fadeText1X := fadeBarX ; text1 X is set in relation to the bar X If not set by the user
  401. If !fadeText1Y
  402. fadeText1Y := round((fadeBarWindowH-fadeBarH)//2-1.5*fadeText1Height) ; text1 Y calculation If not set by the user
  403. If !fadeText2X
  404. fadeText2X := fadeBarWindowW-fadeBarWindowM ; text2 X calculation If not set by the user
  405. If !fadeText2Y
  406. fadeText2Y := round((fadeBarWindowH+fadeBarH)//2+0.5*fadeText2Height) ; text2 Y calculation If not set by the user
  407. ; Window Update Area
  408. If (fadeLyr3Type = "bar") {
  409. xTopLeft := If fadeBarWindowX ? fadeBarWindowX : (baseScreenWidth-fadeBarWindowW)//2 ; calculates where the X of the topleft corner of the bar window needs to be
  410. yTopLeft := If fadeBarWindowY ? fadeBarWindowY : (baseScreenHeight-fadeBarWindowH)//2 ; calculates where the Y of the topleft corner of the bar window needs to be
  411. } Else {
  412. xTopLeft := If fadeBarWindowX ? fadeBarWindowX : (baseScreenWidth-fadeBarWindowW)//2+fadeBarXOffset ; calculates where the X of the topleft corner of the bar window needs to be
  413. yTopLeft := If fadeBarWindowY ? fadeBarWindowY : (baseScreenHeight-fadeBarWindowH)//2+fadeBarYOffset ; calculates where the Y of the topleft corner of the bar window needs to be
  414. }
  415. } Else {
  416. xTopLeft := fadeLyr3PicX
  417. yTopLeft := fadeLyr3PicY
  418. }
  419. ;====== Loading extraction time text info
  420. If !fadeExtractionTimeTextX
  421. fadeExtractionTimeTextX := fadeBarWindowM ; text X calculation If not set by the user
  422. If !fadeExtractionTimeTextY
  423. fadeExtractionTimeTextY := round((fadeBarWindowH+fadeBarH)//2+0.5*fadeText2Height) ; text Y calculation If not set by the user
  424. ;====== Redefining Layer 3 to cover image plus bar size
  425. ; Defining Layer 3 update area
  426. If ((fadeLyr3Type = "bar") and ((fadeBar="true") or ( (fadeBar="7zOnly") and ((found7z="true") and (7zEnabled = "true") and !7zTempRomExists and use7zAnimation)) )){
  427. fadeLyr3CanvasX := xTopLeft
  428. fadeLyr3CanvasY := yTopLeft
  429. fadeLyr3CanvasW := fadeBarWindowW
  430. fadeLyr3CanvasH := fadeBarWindowH
  431. } Else If ((fadeLyr3Type = "ImageAndBar") and ((fadeBar="true") or ( (fadeBar="7zOnly") and ((found7z="true") and (7zEnabled = "true") and !7zTempRomExists and use7zAnimation)) )){
  432. fadeLyr3CanvasX := fadeLyr3PicX < xTopLeft ? fadeLyr3PicX : xTopLeft
  433. fadeLyr3CanvasY := fadeLyr3PicY < yTopLeft ? fadeLyr3PicY : yTopLeft
  434. fadeLyr3CanvasW := fadeLyr3PicX+fadeLyr3PicW-fadeLyr3CanvasX > xTopLeft+fadeBarWindowW-fadeLyr3CanvasX ? fadeLyr3PicX+fadeLyr3PicW-fadeLyr3CanvasX : xTopLeft+fadeBarWindowW-fadeLyr3CanvasX
  435. fadeLyr3CanvasH := fadeLyr3PicY+fadeLyr3PicH-fadeLyr3CanvasY > yTopLeft+fadeBarWindowH-fadeLyr3CanvasY ? fadeLyr3PicY+fadeLyr3PicH-fadeLyr3CanvasY : yTopLeft+fadeBarWindowH-fadeLyr3CanvasY
  436. } Else { ;(fadeLyr3Type = "image")
  437. fadeLyr3CanvasX := fadeLyr3PicX
  438. fadeLyr3CanvasY := fadeLyr3PicY
  439. fadeLyr3CanvasW := fadeLyr3PicW
  440. fadeLyr3CanvasH := fadeLyr3PicH
  441. }
  442. ;====== Rom Info Text
  443. romInfoText := [] ; 1,1 - romInfoText ; 1,2 romInfoTextContent ; 1,3 - romInfoTextFormatedContent ; 1,4 - romInfoTextOptions ; 1,5 - romInfoBitmap ; 1,6 - romInfoBitmapX ; 1,7 - romInfoBitmapY ; 1,8 - romInfoBitmapW ; 1,9 - romInfoBitmapH
  444. clearGameName := gameInfo["Name"].Value
  445. stringSplit, clearGameName, clearGameName, (
  446. clearGameName := clearGameName1
  447. Displacement := 0
  448. Loop, parse, fadeRomInfoOrder,|,
  449. {
  450. romInfoText[A_Index,1] := A_LoopField
  451. If (romInfoText[A_Index,1] = "Description") {
  452. descriptionTextIndex := A_Index
  453. romInfoText[A_Index,2] := gameInfo["Name"].Value
  454. If (fadeRomInfoDescription="filtered text") {
  455. romInfoText[A_Index,3] := clearGameName
  456. } else if (fadeRomInfoDescription="text") {
  457. romInfoText[A_Index,3] := romInfoText[A_Index,2]
  458. } else if (fadeRomInfoDescription="filtered text with label") {
  459. romInfoText[A_Index,3] := "Game: " . clearGameName
  460. } else if (fadeRomInfoDescription="text with label") {
  461. romInfoText[A_Index,3] := "Game: " . romInfoText[A_Index,2]
  462. }
  463. } Else If (romInfoText[A_Index,1] = "SystemName") {
  464. romInfoText[A_Index,2] := systemName
  465. If (fadeRomInfoSystemName="text with label") {
  466. romInfoText[A_Index,3] := "System: " . romInfoText[A_Index,2]
  467. } Else
  468. romInfoText[A_Index,3] := romInfoText[A_Index,2]
  469. } Else If (romInfoText[A_Index,1] = "Year") {
  470. yearTextIndex := A_Index
  471. romInfoText[A_Index,2] := gameInfo["Year"].Value
  472. If (fadeRomInfoYear="text with label") {
  473. romInfoText[A_Index,3] := "Year: " . romInfoText[A_Index,2]
  474. } Else
  475. romInfoText[A_Index,3] := romInfoText[A_Index,2]
  476. } Else If (romInfoText[A_Index,1] = "Manufacturer") {
  477. manufacturerTextIndex := A_Index
  478. romInfoText[A_Index,2] := gameInfo["Manufacturer"].Value
  479. If (fadeRomInfoManufacturer="text with label") {
  480. romInfoText[A_Index,3] := "Manufacturer: " . romInfoText[A_Index,2]
  481. } Else
  482. romInfoText[A_Index,3] := romInfoText[A_Index,2]
  483. } Else If (romInfoText[A_Index,1] = "Genre") {
  484. romInfoText[A_Index,2] := gameInfo["Genre"].Value
  485. If (fadeRomInfoGenre="text with label") {
  486. romInfoText[A_Index,3] := "Genre: " . romInfoText[A_Index,2]
  487. } Else
  488. romInfoText[A_Index,3] := romInfoText[A_Index,2]
  489. } Else If (romInfoText[A_Index,1] = "Rating") {
  490. romInfoText[A_Index,2] := gameInfo["Rating"].Value
  491. If (fadeRomInfoRating="text with label") {
  492. romInfoText[A_Index,3] := "Rating: " . romInfoText[A_Index,2]
  493. } Else
  494. romInfoText[A_Index,3] := romInfoText[A_Index,2]
  495. }
  496. }
  497. ; Resizing text if does not fit the defined width
  498. Loop, 6
  499. {
  500. currentRomInfoTextIndex := A_Index
  501. currentRomInfoTextType := "fadeRomInfo" . romInfoText[currentRomInfoTextIndex,1]
  502. if !((%currentRomInfoTextType%="Image")or(%currentRomInfoTextType%="Disabled")){
  503. RegExMatch(fadeRomInfoText%currentRomInfoTextIndex%Options, "i)W([\-\d\.]+)(p*)", Width)
  504. if Width
  505. {
  506. RegExMatch(fadeRomInfoText%currentRomInfoTextIndex%Options, "i)S([\-\d\.]+)(p*)", Size)
  507. StringReplace, textOptions, fadeRomInfoText%currentRomInfoTextIndex%Options, %Width%,
  508. Width := SubStr(Width, 2), FontSize := SubStr(Size, 2)
  509. textLength := MeasureText(romInfoText[currentRomInfoTextIndex,3],textOptions,fadeFont)
  510. if (textLength>Width) {
  511. loop,
  512. {
  513. StringReplace, textOptions, textOptions, % "S" . FontSize, % "S" . FontSize-5
  514. FontSize := FontSize - 5
  515. textLength := MeasureText(romInfoText[currentRomInfoTextIndex,3],textOptions,fadeFont)
  516. if (textLength<Width){
  517. fadeRomInfoText%currentRomInfoTextIndex%Options := RegExReplace(fadeRomInfoText%currentRomInfoTextIndex%Options, "i)S(\d+)(p*)", "s" . FontSize )
  518. RegExMatch(fadeRomInfoText%currentRomInfoTextIndex%Options, "i)Y([\-\d\.]+)(p*)", YPos)
  519. fadeRomInfoText%currentRomInfoTextIndex%Options := RegExReplace(fadeRomInfoText%currentRomInfoTextIndex%Options, "i)Y([\-\d\.]+)(p*)", "y" . Round(SubStr(YPos,2)+(5*A_Index)/2) )
  520. break
  521. }
  522. }
  523. }
  524. }
  525. }
  526. }
  527. ; Handling Rom Info images
  528. Loop, 6
  529. {
  530. currentRomInfoTextType := "fadeRomInfo" . romInfoText[A_Index,1]
  531. If (%currentRomInfoTextType%="Image") {
  532. If (romInfoText[A_Index,1] = "Description") {
  533. If romInfoText[A_Index,2]
  534. {
  535. If FileExist(RLMediaPath . "\Wheels\" . systemname . "\" . dbname . "\*.png") {
  536. fadeRomWheelImageList := []
  537. Loop, %RLMediaPath%\Wheels\%systemname%\%dbname%\*.png
  538. fadeRomWheelImageList.Insert(A_LoopFileFullPath)
  539. Random, RndmFadeRomWheelImage, 1, % fadeRomWheelImageList.MaxIndex()
  540. fadeRomWheelImage := FadeRomWheelImageList[RndmFadeRomWheelImage]
  541. imagePointer := Gdip_CreateBitmapFromFile(fadeRomWheelImage)
  542. } Else If FileExist( frontendPath . "\Media\" . systemName . "\Images\Wheel\" . dbname . ".png") {
  543. imagePointer := Gdip_CreateBitmapFromFile( frontendPath . "\Media\" . systemName . "\Images\Wheel\" . dbname . ".png" )
  544. }
  545. }
  546. } Else If (romInfoText[A_Index,1] = "SystemName") {
  547. If romInfoText[A_Index,2]
  548. {
  549. If FileExist(RLMediaPath . "\Wheels\" . systemname . "\_Default\*.png") {
  550. fadeSystemWheelImageList := []
  551. Loop, %RLMediaPath%\Wheels\%systemname%\_Default\*.png
  552. fadeSystemWheelImageList.Insert(A_LoopFileFullPath)
  553. Random, RndmFadeSystemWheelImage, 1, % fadeSystemWheelImageList.MaxIndex()
  554. fadeSystemWheelImage := fadeSystemWheelImageList[RndmFadeSystemWheelImage]
  555. imagePointer := Gdip_CreateBitmapFromFile(fadeSystemWheelImage)
  556. } Else If FileExist( frontendPath . "\Media\Main Menu\Images\Wheel\" . systemname . ".png") {
  557. imagePointer := Gdip_CreateBitmapFromFile( frontendPath . "\Media\Main Menu\Images\Wheel\" . systemname . ".png" )
  558. }
  559. }
  560. } Else {
  561. If romInfoText[A_Index,2]
  562. If FileExist( fadeImgPath . "\_Default\" . romInfoText[A_Index,1] . "\" . romInfoText[A_Index,2] . ".png" )
  563. imagePointer := Gdip_CreateBitmapFromFile( fadeImgPath . "\_Default\" . romInfoText[A_Index,1] . "\" . romInfoText[A_Index,2] . ".png" )
  564. }
  565. If imagePointer
  566. romInfoText[A_Index,5] := imagePointer
  567. }
  568. imagePointer :=
  569. }
  570. ;Defining Image W and H of images
  571. Loop, 6
  572. {
  573. currentRomInfoTextType := "fadeRomInfo" . romInfoText[A_Index,1]
  574. If (%currentRomInfoTextType%="Image") {
  575. RegExMatch(fadeRomInfoText%A_Index%Options, "i)W([\-\d\.]+)(p*)", UserDefinedW) ; getting w coordinates
  576. RegExMatch(fadeRomInfoText%A_Index%Options, "i)H([\-\d\.]+)(p*)", UserDefinedH) ; getting h coordinates
  577. stringtrimLeft, UserDefinedW, UserDefinedW, 1
  578. stringtrimLeft, UserDefinedH, UserDefinedH, 1
  579. Gdip_GetImageDimensions(romInfoText[A_Index,5], W, H)
  580. If ((UserDefinedW) and (UserDefinedH)){
  581. romInfoText[A_Index,8] := UserDefinedW
  582. romInfoText[A_Index,9] := UserDefinedH
  583. } Else If (UserDefinedW) {
  584. romInfoText[A_Index,8] := UserDefinedW
  585. romInfoText[A_Index,9] := round(H*UserDefinedW/W)
  586. } Else If (UserDefinedH) {
  587. romInfoText[A_Index,9] := UserDefinedH
  588. romInfoText[A_Index,8] := round(W*UserDefinedH/H)
  589. } Else {
  590. romInfoText[A_Index,8] := W
  591. romInfoText[A_Index,9] := H
  592. }
  593. }
  594. }
  595. If (fadeRomInfoTextPlacement="User Defined"){
  596. Loop, 6
  597. {
  598. currentRomInfoTextType := "fadeRomInfo" . romInfoText[A_Index,1]
  599. If ((%currentRomInfoTextType%="Text") or (%currentRomInfoTextType%="filtered text") or (%currentRomInfoTextType%="filtered text with label") or (%currentRomInfoTextType%="text with label"))
  600.  
  601. romInfoText[A_Index,4] := fadeRomInfoText%A_Index%Options
  602. Else If (%currentRomInfoTextType%="Image") {
  603. RegExMatch(fadeRomInfoText%A_Index%Options, "i)X([\-\d\.]+)(p*)", UserDefinedX) ; getting x coordinates
  604. RegExMatch(fadeRomInfoText%A_Index%Options, "i)Y([\-\d\.]+)(p*)", UserDefinedY) ; getting y coordinates
  605. stringtrimLeft, UserDefinedX, UserDefinedX, 1
  606. stringtrimLeft, UserDefinedY, UserDefinedY, 1
  607. romInfoText[A_Index,6] := UserDefinedX
  608. romInfoText[A_Index,7] := UserDefinedY
  609. If !UserDefinedX
  610. romInfoText[A_Index,6] := (baseScreenWidth-romInfoText[A_Index,8])//2
  611. If !UserDefinedY
  612. romInfoText[A_Index,7] := (baseScreenHeight-romInfoText[A_Index,9])//2
  613. }
  614. }
  615. } Else {
  616. Loop, 6
  617. {
  618. currentRomInfoTextType := "fadeRomInfo" . romInfoText[A_Index,1]
  619. If ((%currentRomInfoTextType%="Text") or (%currentRomInfoTextType%="filtered text") or (%currentRomInfoTextType%="filtered text with label") or (%currentRomInfoTextType%="text with label")) { ;parsing text options to remove x, y, W, H
  620.  
  621. romInfoText[A_Index,4] := RegExReplace(fadeRomInfoText%A_Index%Options, "i)X([\-\d\.]+)(p*)", " ") ; Removing x
  622. romInfoText[A_Index,4] := RegExReplace(romInfoText[A_Index,4], "i)Y([\-\d\.]+)(p*)", " ") ; Removing y
  623. romInfoText[A_Index,4] := RegExReplace(romInfoText[A_Index,4], "i)W([\-\d\.]+)(p*)", " ") ; Removing w
  624. romInfoText[A_Index,4] := RegExReplace(romInfoText[A_Index,4], "i)H([\-\d\.]+)(p*)", " ") ; Removing h
  625. romInfoText[A_Index,4] := RegExReplace(romInfoText[A_Index,4], "i)Top|Up|Bottom|Down|vCentre|vCenter", " ") ; Removing Align
  626. FoundPos := RegExMatch(romInfoText[A_Index,4], "i)S(\d+)(p*)", Size) ; Acquiring rom info font size
  627. StringTrimLeft, Size , Size,1
  628. maxromInfoTextSize := maxromInfoTextSize > Size ? maxromInfoTextSize : Size
  629. }
  630. }
  631. If (fadeRomInfoTextPlacement="corners"){
  632. romInfoText[1,4] := "x" . fadeRomInfoTextMargin . " y" . fadeRomInfoTextMargin . " Left " . romInfoText[1,4]
  633. romInfoText[1,6] := fadeRomInfoTextMargin
  634. romInfoText[1,7] := fadeRomInfoTextMargin
  635. romInfoText[2,4] := "x" . baseScreenWidth-fadeRomInfoTextMargin . " y" . fadeRomInfoTextMargin . " Right " . romInfoText[2,4]
  636. romInfoText[2,6] := baseScreenWidth-fadeRomInfoTextMargin-romInfoText[2,8]
  637. romInfoText[2,7] := fadeRomInfoTextMargin
  638. romInfoText[3,4] := "x" . fadeRomInfoTextMargin . " y" . baseScreenHeight-maxromInfoTextSize-fadeRomInfoTextMargin . " Left " . romInfoText[3,4]
  639. romInfoText[3,6] := fadeRomInfoTextMargin
  640. romInfoText[3,7] := baseScreenHeight-fadeRomInfoTextMargin-romInfoText[3,9]
  641. romInfoText[4,4] := "x" . baseScreenWidth-fadeRomInfoTextMargin . " y" . baseScreenHeight-maxromInfoTextSize-fadeRomInfoTextMargin . " Right " . romInfoText[4,4]
  642. romInfoText[4,6] := baseScreenWidth-fadeRomInfoTextMargin-romInfoText[4,8]
  643. romInfoText[4,7] := baseScreenHeight-fadeRomInfoTextMargin-romInfoText[4,9]
  644. romInfoText[5,4] := "x" . baseScreenWidth//2 . " y" . fadeRomInfoTextMargin . " Center " . romInfoText[5,4]
  645. romInfoText[5,6] := (baseScreenWidth-romInfoText[5,8])//2
  646. romInfoText[5,7] := fadeRomInfoTextMargin
  647. romInfoText[6,4] := "x" . baseScreenWidth//2 . " y" . baseScreenHeight-maxromInfoTextSize-fadeRomInfoTextMargin . " Center " . romInfoText[6,4]
  648. romInfoText[6,6] := (baseScreenWidth-romInfoText[6,8])//2
  649. romInfoText[6,7] := baseScreenHeight-fadeRomInfoTextMargin-romInfoText[6,9]
  650. } Else {
  651. Loop, 6
  652. {
  653. currentRomInfoTextType := "fadeRomInfo" . romInfoText[A_Index,1]
  654. If ((fadeRomInfoTextPlacement="bottomRight") or (fadeRomInfoTextPlacement="bottomLeft")) {
  655. If ((%currentRomInfoTextType%="Text") or (%currentRomInfoTextType%="filtered text") or (%currentRomInfoTextType%="filtered text with label") or (%currentRomInfoTextType%="text with label"))
  656.  
  657. Displacement := Displacement + (maxromInfoTextSize+10)
  658. Else If (%currentRomInfoTextType%="Image")
  659. Displacement := Displacement + ( romInfoText[A_Index,9] +10)
  660. }
  661. If (fadeRomInfoTextPlacement="topRight") {
  662. romInfoText[A_Index,4] := "x" . baseScreenWidth-fadeRomInfoTextMargin . " y" . Displacement+fadeRomInfoTextMargin . " Right " . romInfoText[A_Index,4]
  663. romInfoText[A_Index,6] := baseScreenWidth-fadeRomInfoTextMargin-romInfoText[A_Index,8]
  664. romInfoText[A_Index,7] := Displacement+fadeRomInfoTextMargin
  665. } Else If (fadeRomInfoTextPlacement="topLeft") {
  666. romInfoText[A_Index,4] := "x" . fadeRomInfoTextMargin . " y" . Displacement+fadeRomInfoTextMargin . " Left " . romInfoText[A_Index,4]
  667. romInfoText[A_Index,6] := fadeRomInfoTextMargin
  668. romInfoText[A_Index,7] := Displacement+fadeRomInfoTextMargin
  669. } Else If (fadeRomInfoTextPlacement="bottomRight") {
  670. romInfoText[A_Index,4] := "x" . baseScreenWidth-fadeRomInfoTextMargin . " y" . baseScreenHeight-Displacement-fadeRomInfoTextMargin . " Right " . romInfoText[A_Index,4]
  671. romInfoText[A_Index,6] := baseScreenWidth-fadeRomInfoTextMargin-romInfoText[A_Index,8]
  672. romInfoText[A_Index,7] := baseScreenHeight-fadeRomInfoTextMargin-Displacement
  673. } Else If (fadeRomInfoTextPlacement="bottomLeft") {
  674. romInfoText[A_Index,4] := "x" . fadeRomInfoTextMargin . " y" . baseScreenHeight-Displacement-fadeRomInfoTextMargin . " Left " . romInfoText[A_Index,4]
  675. romInfoText[A_Index,6] := fadeRomInfoTextMargin
  676. romInfoText[A_Index,7] := baseScreenHeight-fadeRomInfoTextMargin-Displacement
  677. }
  678. If ((fadeRomInfoTextPlacement="topRight") or (fadeRomInfoTextPlacement="topLeft")) {
  679. If ((%currentRomInfoTextType%="Text") or (%currentRomInfoTextType%="filtered text") or (%currentRomInfoTextType%="filtered text with label") or (%currentRomInfoTextType%="text with label"))
  680.  
  681. Displacement := Displacement + (maxromInfoTextSize+10)
  682. Else If (%currentRomInfoTextType%="Image")
  683. Displacement := Displacement + ( romInfoText[A_Index,9] +10)
  684. }
  685. }
  686. }
  687. }
  688. ;====== Statistics Info Text
  689. If !( (fadeRomInfoTextPlacement=fadestatsInfoTextPlacement) and ((fadeRomInfoTextPlacement="topRight") or (fadeRomInfoTextPlacement="topLeft") or (fadeRomInfoTextPlacement="bottomRight") or (fadeRomInfoTextPlacement="bottomLeft")) )
  690. Displacement := 0
  691. If (statisticsEnabled = "true"){
  692. If ((fadeStats_Number_of_Times_Played<>disabled) or (fadeStats_Last_Time_Played<>disabled) or (fadeStats_Average_Time_Played<>disabled) or (fadeStats_Total_Time_Played<>disabled) or (fadeStats_System_Total_Played_Time<>disabled) or (fadeStats_Total_Global_Played_Time<>disabled) ){
  693. ;Load statistics
  694. If (!romTable && mgCandidate)
  695. romTable := CreateRomTable(dbName)
  696. Totaldiscsofcurrentgame:=romTable.MaxIndex()
  697. If (Totaldiscsofcurrentgame>1)
  698. DescriptionNameWithoutDisc := romTable[1,4]
  699. Else
  700. DescriptionNameWithoutDisc := gameInfo["Name"].Value
  701. stringsplit, DescriptionNameSplit, DescriptionNameWithoutDisc, "(", ;Only game description name
  702. ClearDescriptionName := RegexReplace( DescriptionNameSplit1, "^\s+|\s+$" ) ; Statistics cleared game name
  703. IniRead, Number_of_Times_Played, % RLDataPath . "\Statistics\" . systemName . ".ini", % dbName, Number_of_Times_Played, 0
  704. IniRead, Last_Time_Played, % RLDataPath . "\Statistics\" . systemName . ".ini", % dbName, Last_Time_Played, 0
  705. IniRead, Average_Time_Played, % RLDataPath . "\Statistics\" . systemName . ".ini", % dbName, Average_Time_Played, 0
  706. IniRead, Total_Time_Played, % RLDataPath . "\Statistics\" . systemName . ".ini", % dbName, Total_Time_Played, 0
  707. IniRead, System_Total_Played_Time, % RLDataPath . "\Statistics\" . systemName . ".ini", General, System_Total_Played_Time, 0
  708. IniRead, Total_Global_Played_Time, % RLDataPath . "\Statistics\Global Statistics.ini", General, Total_Global_Played_Time, 0
  709. ;Formating stats
  710. If(Number_of_Times_Played=0)
  711. Number_of_Times_Played := "Never"
  712. Else If (Number_of_Times_Played=1)
  713. Number_of_Times_Played := Number_of_Times_Played . " time"
  714. Else
  715. Number_of_Times_Played := Number_of_Times_Played . " times"
  716. If(Last_Time_Played=0)
  717. Last_Time_Played := "Never"
  718. If (Average_Time_Played>0)
  719. Average_Time_Played := GetTimeString(Average_Time_Played) . " per session"
  720. Total_Time_Played := GetTimeString(Total_Time_Played)
  721. System_Total_Played_Time := GetTimeString(System_Total_Played_Time)
  722. Total_Global_Played_Time := GetTimeString(Total_Global_Played_Time)
  723. statsInfoText := []
  724. Loop, parse, fadeStatsInfoOrder,|,
  725. {
  726. statsInfoText[A_Index,1] := A_LoopField
  727. If (statsInfoText[A_Index,1] = "Number_of_Times_Played") {
  728. statsInfoText[A_Index,2] := Number_of_Times_Played
  729. If (fadeStats_Number_of_Times_Played="text with label") {
  730. statsInfoText[A_Index,3] := "Times Played: " . statsInfoText[A_Index,2]
  731. } Else
  732. statsInfoText[A_Index,3] := statsInfoText[A_Index,2]
  733. } Else If (statsInfoText[A_Index,1] = "Last_Time_Played") {
  734. statsInfoText[A_Index,2] := Last_Time_Played
  735. If (fadeStats_Last_Time_Played="text with label") {
  736. statsInfoText[A_Index,3] := "Last Time Played: " . statsInfoText[A_Index,2]
  737. } Else
  738. statsInfoText[A_Index,3] := statsInfoText[A_Index,2]
  739. } Else If (statsInfoText[A_Index,1] = "Average_Time_Played") {
  740. statsInfoText[A_Index,2] := Average_Time_Played
  741. If (fadeStats_Average_Time_Played="text with label") {
  742. statsInfoText[A_Index,3] := "Average Time Played: " . statsInfoText[A_Index,2]
  743. } Else
  744. statsInfoText[A_Index,3] := statsInfoText[A_Index,2]
  745. } Else If (statsInfoText[A_Index,1] = "Total_Time_Played") {
  746. statsInfoText[A_Index,2] := Total_Time_Played
  747. If (fadeStats_Total_Time_Played="text with label") {
  748. statsInfoText[A_Index,3] := "Total Time Played: " . statsInfoText[A_Index,2]
  749. } Else
  750. statsInfoText[A_Index,3] := statsInfoText[A_Index,2]
  751. } Else If (statsInfoText[A_Index,1] = "System_Total_Played_Time") {
  752. statsInfoText[A_Index,2] := System_Total_Played_Time
  753. If (fadeStats_System_Total_Played_Time="text with label") {
  754. statsInfoText[A_Index,3] := "System Total Played Time: " . statsInfoText[A_Index,2]
  755. } Else
  756. statsInfoText[A_Index,3] := statsInfoText[A_Index,2]
  757. } Else If (statsInfoText[A_Index,1] = "Total_Global_Played_Time") {
  758. statsInfoText[A_Index,2] := Total_Global_Played_Time
  759. If (fadeStats_Total_Global_Played_Time="text with label") {
  760. statsInfoText[A_Index,3] := "Total Global Played Time: " . statsInfoText[A_Index,2]
  761. } Else
  762. statsInfoText[A_Index,3] := statsInfoText[A_Index,2]
  763. }
  764. }
  765. If (fadeStatsInfoTextPlacement="User Defined"){
  766. Loop, 6
  767. {
  768. currentStatsInfoTextType := "fadeStats_" . statsInfoText[A_Index,1]
  769. If ((%currentStatsInfoTextType%="Text") or (%currentStatsInfoTextType%="text with label"))
  770. statsInfoText[A_Index,4] := fadeStatsInfoText%A_Index%Options
  771. }
  772. } Else {
  773. Loop, 6
  774. {
  775. currentStatsInfoTextType := "fadeStats_" . statsInfoText[A_Index,1]
  776. If ((%currentStatsInfoTextType%="Text") or (%currentStatsInfoTextType%="text with label")) { ;parsing text options to remove x, y, W, H
  777. statsInfoText[A_Index,4] := RegExReplace(fadeStatsInfoText%A_Index%Options, "i)X([\-\d\.]+)(p*)", " ") ; Removing x
  778. statsInfoText[A_Index,4] := RegExReplace(statsInfoText[A_Index,4], "i)Y([\-\d\.]+)(p*)", " ") ; Removing y
  779. statsInfoText[A_Index,4] := RegExReplace(statsInfoText[A_Index,4], "i)W([\-\d\.]+)(p*)", " ") ; Removing w
  780. statsInfoText[A_Index,4] := RegExReplace(statsInfoText[A_Index,4], "i)H([\-\d\.]+)(p*)", " ") ; Removing h
  781. statsInfoText[A_Index,4] := RegExReplace(statsInfoText[A_Index,4], "i)Top|Up|Bottom|Down|vCentre|vCenter", " ") ; Removing Align
  782. FoundPos := RegExMatch(statsInfoText[A_Index,4], "i)S(\d+)(p*)", Size) ; Acquiring stats info font size
  783. StringTrimLeft, Size , Size,1
  784. maxStatsInfoTextSize := maxStatsInfoTextSize > Size ? maxStatsInfoTextSize : Size
  785. }
  786. }
  787. If (fadestatsInfoTextPlacement="corners"){
  788. statsInfoText[1,4] := "x" . fadeStatsInfoTextMargin . " y" . fadeStatsInfoTextMargin . " Left " . statsInfoText[1,4]
  789. statsInfoText[2,4] := "x" . baseScreenWidth-fadeStatsInfoTextMargin . " y" . fadeStatsInfoTextMargin . " Right " . statsInfoText[2,4]
  790. statsInfoText[3,4] := "x" . fadeStatsInfoTextMargin . " y" . baseScreenHeight-maxstatsInfoTextSize-fadeStatsInfoTextMargin . " Left " . statsInfoText[3,4]
  791. statsInfoText[4,4] := "x" . baseScreenWidth-fadeStatsInfoTextMargin . " y" . baseScreenHeight-maxstatsInfoTextSize-fadeStatsInfoTextMargin . " Right " . statsInfoText[4,4]
  792. statsInfoText[5,4] := "x" . baseScreenWidth//2 . " y" . fadeStatsInfoTextMargin . " Center " . statsInfoText[5,4]
  793. statsInfoText[6,4] := "x" . baseScreenWidth//2 . " y" . baseScreenHeight-maxstatsInfoTextSize-fadeStatsInfoTextMargin . " Center " . statsInfoText[6,4]
  794. } Else {
  795. Loop, 6
  796. {
  797. If ((fadestatsInfoTextPlacement="bottomRight") or (fadestatsInfoTextPlacement="bottomLeft")) {
  798. if statsInfoText[A_Index,2]
  799. Displacement := Displacement + (maxstatsInfoTextSize+10)
  800. else if (A_Index=1)
  801. Displacement := (maxstatsInfoTextSize+10)
  802. }
  803. If (fadestatsInfoTextPlacement="topRight")
  804. statsInfoText[A_Index,4] := "x" . baseScreenWidth-fadeStatsInfoTextMargin . " y" . Displacement+fadeStatsInfoTextMargin . " Right " . statsInfoText[A_Index,4]
  805. Else If (fadestatsInfoTextPlacement="topLeft")
  806. statsInfoText[A_Index,4] := "x" . fadeStatsInfoTextMargin . " y" . Displacement+fadeStatsInfoTextMargin . " Left " . statsInfoText[A_Index,4]
  807. Else If (fadestatsInfoTextPlacement="bottomRight")
  808. statsInfoText[A_Index,4] := "x" . baseScreenWidth-fadeStatsInfoTextMargin . " y" . baseScreenHeight-Displacement-fadeStatsInfoTextMargin . " Right " . statsInfoText[A_Index,4]
  809. Else If (fadestatsInfoTextPlacement="bottomLeft")
  810. statsInfoText[A_Index,4] := "x" . fadeStatsInfoTextMargin . " y" . baseScreenHeight-Displacement-fadeStatsInfoTextMargin . " Left " . statsInfoText[A_Index,4]
  811. If ((fadestatsInfoTextPlacement="topRight") or (fadestatsInfoTextPlacement="topLeft")) {
  812. if statsInfoText[A_Index,2]
  813. Displacement := Displacement + (maxstatsInfoTextSize+10)
  814. }
  815. }
  816. }
  817. }
  818. }
  819. }
  820. ;====== Defining Drawing areas
  821. pGraphUpd(Fade_G3,fadeLyr3CanvasW,fadeLyr3CanvasH)
  822. fadeLyr4CanvasX := round(fadeLyr4PicX) , fadeLyr4CanvasY := round(fadeLyr4PicY)
  823. fadeLyr4CanvasW := round(fadeLyr4PicW), fadeLyr4CanvasH := round(fadeLyr4PicH)
  824. pGraphUpd(Fade_G4,fadeLyr4CanvasW,fadeLyr4CanvasH)
  825. fadeLyr5CanvasX := 0 , fadeLyr5CanvasY := 0
  826. fadeLyr5CanvasW := baseScreenWidth, fadeLyr5CanvasH := baseScreenHeight
  827. pGraphUpd(Fade_G5,fadeLyr5CanvasW,fadeLyr5CanvasH)
  828. ;====== Drawing Layer 3 Static
  829. Alt_UpdateLayeredWindow(Fade_hwnd3Static, Fade_hdc3Static,fadeLyr3StaticCanvasX,fadeLyr3StaticCanvasY, fadeLyr3StaticCanvasW, fadeLyr3StaticCanvasH)
  830. ;====== Drawing text info
  831. Loop, 6
  832. {
  833. currentRomInfoTextType := "fadeRomInfo" . romInfoText[A_Index,1]
  834. If ((%currentRomInfoTextType%="Text") or (%currentRomInfoTextType%="filtered text") or (%currentRomInfoTextType%="filtered text with label") or (%currentRomInfoTextType%="text with label")) {
  835. If romInfoText[A_Index,2]
  836. Gdip_Alt_TextToGraphics(Fade_G5, romInfoText[A_Index,3], romInfoText[A_Index,4], fadeFont, 0, 0)
  837. } Else If (%currentRomInfoTextType%="Image") {
  838. If romInfoText[A_Index,2]
  839. Gdip_Alt_DrawImage(Fade_G5, romInfoText[A_Index,5], romInfoText[A_Index,6], romInfoText[A_Index,7], romInfoText[A_Index,8], romInfoText[A_Index,9])
  840. }
  841. }
  842. ; Drawing Statistics text info
  843. If (statisticsEnabled = "true"){
  844. Loop, 6
  845. {
  846. currentStatsInfoTextType := "fadeStats_" . statsInfoText[A_Index,1]
  847. If ((%currentStatsInfoTextType%="Text") or (%currentStatsInfoTextType%="text with label"))
  848. If statsInfoText[A_Index,2]
  849. Gdip_Alt_TextToGraphics(Fade_G5, statsInfoText[A_Index,3], statsInfoText[A_Index,4], fadeFont, 0, 0)
  850. }
  851. }
  852. Alt_UpdateLayeredWindow(Fade_hwnd5, Fade_hdc5,fadeLyr5CanvasX,fadeLyr5CanvasY, fadeLyr5CanvasW, fadeLyr5CanvasH)
  853. ;====== drawing animated gif
  854. If GifAnimation
  855. SetTimer, FadeLayer4Anim, -1
  856. Else If (FadeLayer4AnimFilesAr.MaxIndex() > 0)
  857. SetTimer, FadeLayer4Anim, %fadeLyr4FPS%
  858. ;====== Defining Progress Bar Update for non 7z
  859. timeToMax := fadeLyr3Speed / fadeLyr3Repeat ; calculate how long layer 3 needs to take to show 100% of the image
  860. ; update fadeInExitDelay value to assure that the fadeLyr3 animation finishes before exiting fade
  861. If (((fadeLyr3Type = "Image") or (fadeLyr3Type = "ImageAndBar")) and (fadeInLyr3File) and (fadeLyr3Repeat))
  862. if (fadeLyr3Speed>fadeInDelay+fadeInExitDelay)
  863. fadeInExitDelay := fadeInExitDelay + fadeLyr3Speed-(fadeInDelay+fadeInExitDelay)
  864. ;Defining Progress Bar Update Time
  865. If ((fadeLyr3Type = "bar") or (fadeLyr3Type = "ImageAndBar")) and (fadeBar="true")
  866. progressBarTimeToMax := if (fadeBarNon7zProgressTime) ? fadeBarNon7zProgressTime : (fadeInDelay+fadeInExitDelay)
  867. ;======checking for extraction and loading sound
  868. If ((found7z="true" and 7zEnabled = "true" and !7zTempRomExists and use7zAnimation) or (rlMode="fade7z")) and (7zSounds = "true") {
  869. If not (fadeLyr3Type = image and fadeLyr3ImgFollow7zProgress = false) {
  870. If FileExist( RLMediaPath . "\Fade\" . SystemName . "\" . dbName . "\7z extracting.mp3")
  871. extractionSound := RLMediaPath . "\Fade\" . SystemName . "\" . dbName . "\7z extracting.mp3"
  872. Else If FileExist( RLMediaPath . "\Fade\" . SystemName . "\_Default\7z extracting.mp3")
  873. extractionSound := RLMediaPath . "\Fade\" . SystemName . "\_Default\7z extracting.mp3"
  874. Else If FileExist( RLMediaPath . "\Fade\_Default\7z extracting.mp3")
  875. extractionSound := RLMediaPath . "\Fade\_Default\7z extracting.mp3"
  876. If extractionSound {
  877. Log("DefaultFadeAnimation - Playing " . extractionSound)
  878. SoundPlay, %extractionSound%
  879. }
  880. }
  881. } else {
  882. If FileExist( RLMediaPath . "\Fade\" . SystemName . "\" . dbName . "\loading.mp3")
  883. loadingSound := RLMediaPath . "\Fade\" . SystemName . "\" . dbName . "\loading.mp3"
  884. Else If FileExist( RLMediaPath . "\Fade\" . SystemName . "\_Default\loading.mp3")
  885. loadingSound := RLMediaPath . "\Fade\" . SystemName . "\_Default\loading.mp3"
  886. Else If FileExist( RLMediaPath . "\Fade\_Default\loading.mp3")
  887. loadingSound := RLMediaPath . "\Fade\_Default\loading.mp3"
  888. If loadingSound {
  889. Log("DefaultFadeAnimation - Playing " . loadingSound)
  890. SoundPlay, %loadingSound%
  891. }
  892. }
  893. ;==== Create timer to update layer 3
  894. SetTimer, _DefaultFadeAnimationLoop, 50
  895. startTime := A_TickCount
  896. layer3startTime := A_TickCount
  897. If fadeInActive
  898. GoSub, FadeInDelay ; This must always be at the end of all animation functions. It's a simple timer that will force the GUI to stay up the defined amount of delay If the animation was shorter then said delay.
  899. Log("DefaultFadeAnimation - Ended")
  900. Return
  901.  
  902. _DefaultFadeAnimationLoop:
  903. if (!fadeInActive or fadeInExitComplete) {
  904. Log("DefaultFadeAnimationLoop - " . (If fadeInExitComplete ? "FadeInExit completed" : "FadeIn is no longer active") . ", stopping DefaultFadeAnimationLoop",4)
  905. SetTimer, _DefaultFadeAnimationLoop, Off
  906. if !(DefaultFadeFinishedTimerStarted){
  907. SetTimer, _DefaultFadeFinished, 500
  908. DefaultFadeFinishedTimerStarted:=true
  909. }
  910. }
  911. if (romExPercentage = 100) {
  912. If ((7zSounds = "true") and !(7zSoundChecked)){
  913. 7zSoundChecked := true
  914. ; stopping extraction sound and checking for complete sound
  915. If ((extractionSound) or (loadingSound))
  916. SoundPlay, blank.mp3 ; playing non existent file to stop extraction sound.
  917. If FileExist( RLMediaPath . "\Fade\" . SystemName . "\" . dbName . "\7z complete.mp3")
  918. completeSound := RLMediaPath . "\Fade\" . SystemName . "\" . dbName . "\7z complete.mp3"
  919. Else If FileExist( RLMediaPath . "\Fade\" . SystemName . "\_Default\7z complete.mp3")
  920. completeSound := RLMediaPath . "\Fade\" . SystemName . "\_Default\7z complete.mp3"
  921. Else If FileExist( RLMediaPath . "\Fade\_Default\7z complete.mp3")
  922. completeSound := RLMediaPath . "\Fade\_Default\7z complete.mp3"
  923. If (completeSound) {
  924. Log("DefaultFadeAnimationLoop - Playing 7z fade complete sound: " . completeSound)
  925. SoundPlay, %completeSound%
  926. }
  927. }
  928. }
  929. if AnimationLoopFinished {
  930. Log("DefaultFadeAnimationLoop - AnimationLoop has finished",4)
  931. SetTimer, _DefaultFadeAnimationLoop, Off
  932. if !(DefaultFadeFinishedTimerStarted){
  933. SetTimer, _DefaultFadeFinished, 500
  934. DefaultFadeFinishedTimerStarted:=true
  935. }
  936. Alt_UpdateLayeredWindow(Fade_hwnd3, Fade_hdc3,fadeLyr3CanvasX,fadeLyr3CanvasY, fadeLyr3CanvasW, fadeLyr3CanvasH)
  937. Log("DefaultFadeAnimationLoop - Ended",4)
  938. }
  939. ;====== Begin of animation Loop
  940. Gdip_GraphicsClear(Fade_G3)
  941. ;====== Updating 7z extraction info
  942. if !(romExPercentage = 100) {
  943. If (((found7z="true") and (7zEnabled = "true") and !(7zTempRomExists) and (use7zAnimation)) and !(rlMode="fade7z")) {
  944. If not (fadeLyr3Type = image and fadeLyr3ImgFollow7zProgress = false) {
  945. romExPercentageAndFile := RLObject.getExtractionSize(7zRomPath, 0) ; Get the current file being extracted and size of the 7z Extract Path - (Extraction Size\Progress (0=Accurate Method, 1=Fast Detection Method))
  946. If (!(7zTimerRunning) and !(7zTimerStarted)) { ; if the fade animation did not start the timer, let's start it here
  947. 7zTimerRunning := 1
  948. 7zTimedOut := ; reset counter
  949. 7zTimerStarted := true
  950. SetTimer, 7zTimeout, 250 ; poll 7z.exe every 250ms to see if it's still running
  951. Log("DefaultFadeAnimationLoop - Starting 7zTimeout Timer",4)
  952. }
  953. Loop, Parse, romExPercentageAndFile, | ; StringSplit oddly doesn't work for some unknown reason, must resort to a parsing Loop instead
  954. {
  955. If A_Index = 1
  956. {
  957. romExCurSize := A_LoopField ; Store bytes extracted
  958. romExPercentage := ( A_LoopField >= romExSize ) ? 100 : (A_LoopField / romExSize) * 100 ; Calculate percentage extracted
  959. } Else If A_Index = 2
  960. romExFile := A_LoopField
  961. }
  962. layer3Percentage := romExPercentage
  963. }
  964. } else { ; to be used for drawing the progress bar on non 7z fade or in rlMode "fade"
  965. timeElapsed := A_TickCount - startTime
  966. layer3TimeElapsed := A_TickCount - layer3startTime
  967. romExPercentage := (timeElapsed < progressBarTimeToMax) ? Round((timeElapsed / progressBarTimeToMax)*100) : 100
  968. if !fadeLyr3Drawn
  969. layer3Percentage := (layer3TimeElapsed < timeToMax) ? Round((layer3TimeElapsed / timeToMax)*100) : 100
  970. }
  971. }
  972. ;====== Drawing layer 3 image
  973. If (fadeLyr3Type = "Image") or (fadeLyr3Type = "ImageAndBar")
  974. {
  975. IfExist, % fadeInLyr3File
  976. {
  977. If fadeLyr3Repeat != 0 ; Only Loop animation If user does not want a static image
  978. {
  979. if fadeLyr3BackImageTransparency
  980. Gdip_Alt_DrawImage(Fade_G3, fadeLyr3Pic, fadeLyr3PicX-fadeLyr3CanvasX, fadeLyr3PicY-fadeLyr3CanvasY, fadeLyr3PicW, fadeLyr3PicH, , , , , fadeLyr3BackImageTransparency/100) ; draw layer 3 image with transparency
  981. If (found7z="true") and (7zEnabled = "true") and (fadeLyr3ImgFollow7zProgress="true") and !7zTempRomExists and use7zAnimation {
  982. Gdip_Alt_DrawImage(Fade_G3, fadeLyr3Pic, fadeLyr3PicX-fadeLyr3CanvasX, fadeLyr3PicY-fadeLyr3CanvasY, round(fadeLyr3PicW*layer3Percentage/100), fadeLyr3PicH, 0, 0, Round(fadeLyr3PicOrigW*layer3Percentage/100), fadeLyr3PicOrigH) ; draw layer 3 image onto screen on layer 3 and adjust the size If set
  983. If (layer3Percentage >= 100 && 7zTimedOut >= 500){
  984. If 7zEnded
  985. fadeLyr3Drawn := true
  986. 7zEnded=1 ; Often on small archives, 7z.exe ends so fast, it doesn't give us the chance to show 100% completion. By looping a 2nd time after 7z.exe is closed, the 2nd Loop after 7zEnded, sets the percentage to 100%.
  987. }
  988. } Else {
  989. If (t1 < 100 and fadeLyr3DrawnTimes<fadeLyr3Repeat) {
  990. t1 := ((timeElapsed := A_TickCount - layer3startTime) < timeToMax) ? timeElapsed / timeToMax : 100
  991. Gdip_Alt_DrawImage(Fade_G3, fadeLyr3Pic, fadeLyr3PicX-fadeLyr3CanvasX, fadeLyr3PicY-fadeLyr3CanvasY, fadeLyr3PicW*t1, fadeLyr3PicH, 0, 0, fadeLyr3PicOrigW*t1, fadeLyr3PicOrigH) ; draw layer 3 image onto screen on layer 3 and adjust the size If set
  992. } Else {
  993. layer3startTime := A_TickCount ; reset on each Loop
  994. fadeLyr3DrawnTimes++
  995. t1 := 0
  996. If (fadeLyr3DrawnTimes>=fadeLyr3Repeat) {
  997. fadeLyr3Drawn := true
  998. Gdip_Alt_DrawImage(Fade_G3, fadeLyr3Pic, fadeLyr3PicX-fadeLyr3CanvasX, fadeLyr3PicY-fadeLyr3CanvasY, fadeLyr3PicW, fadeLyr3PicH) ; draw layer 3 image onto screen on layer 3 and adjust the size If set
  999. }
  1000. }
  1001. }
  1002. } Else If !fadeLyr3Drawn { ; If fadeLyr3Repeat is set to 0 (a static image), just show it, rather then animate
  1003. Gdip_Alt_DrawImage(Fade_G3, fadeLyr3Pic, fadeLyr3PicX-fadeLyr3CanvasX, fadeLyr3PicY-fadeLyr3CanvasY, fadeLyr3PicW, fadeLyr3PicH) ; draw layer 3 image onto screen on layer 3 and adjust the size If set
  1004. fadeLyr3Drawn := true
  1005. }
  1006. } Else {
  1007. fadeLyr3Drawn := true
  1008. }
  1009. } Else {
  1010. fadeLyr3Drawn := true
  1011. }
  1012. ;====== Drawing Bar
  1013. If ((fadeLyr3Type = "bar") or (fadeLyr3Type = "ImageAndBar")) and ((fadeBar="true") or ( (fadeBar="7zOnly") and ((found7z="true") and (7zEnabled = "true") and !7zTempRomExists and use7zAnimation)) )
  1014. {
  1015. ; Bar Window
  1016. if (fadeBarWindow="Image") {
  1017. Gdip_Alt_DrawImage(Fade_G3, fadeLyr3ProgressBar, xTopLeft-fadeLyr3CanvasX, yTopLeft-fadeLyr3CanvasY, fadeBarWindowW, fadeBarWindowH)
  1018. } else if (fadeBarWindow="GDI") {
  1019. Gdip_Alt_FillRoundedRectangle(Fade_G3, fadeBrushWindow1, xTopLeft-fadeLyr3CanvasX, yTopLeft-fadeLyr3CanvasY, fadeBarWindowW, fadeBarWindowH, fadeBarWindowR)
  1020. Gdip_Alt_FillRoundedRectangle(Fade_G3, fadeBrushWindow2, xTopLeft-fadeLyr3CanvasX, yTopLeft-fadeLyr3CanvasY, fadeBarWindowW, fadeBarWindowH, fadeBarWindowR)
  1021. }
  1022. ; Bar Background
  1023. If (fadeBarBack = "true")
  1024. Gdip_Alt_FillRoundedRectangle(Fade_G3, fadeBrushBarBack, xTopLeft+fadeBarX-fadeLyr3CanvasX, yTopLeft+yBar-fadeLyr3CanvasY, fadeBarW, fadeBarH, fadeBarR)
  1025. ; Progress Bar
  1026. percentage := romExPercentage
  1027. If percentage > 100
  1028. percentage := 100
  1029. If(fadeBarW*percentage/100<3*fadeBarR) ; avoiding glitch in rounded rectangle drawing when they are too small
  1030. currentRBar := fadeBarR * ((fadeBarW*percentage/100)/(3*fadeBarR))
  1031. Else
  1032. currentRBar := fadeBarR
  1033. If (fadeBarPercentageText = "true")
  1034. Gdip_Alt_TextToGraphics(Fade_G3, round(percentage) . "%", "x" round(xTopLeft+fadeText1X+fadeBarW*percentage/100)-fadeLyr3CanvasX " y" yTopLeft+fadeText1Y-fadeLyr3CanvasY . " " . fadeText1Options, fadeFont, 0, 0)
  1035. If percentage < 100
  1036. {
  1037. If (fadeBarInfoText = "true")
  1038. {
  1039. if (found7z="true") and (7zEnabled = "true") and !7zTempRomExists and use7zAnimation
  1040. Gdip_Alt_TextToGraphics(Fade_G3, fadeText1, "x" xTopLeft+fadeText2X-fadeLyr3CanvasX " y" yTopLeft+fadeText2Y-fadeLyr3CanvasY . " " . fadeText1Options, fadeFont, 0, 0)
  1041. else
  1042. Gdip_Alt_TextToGraphics(Fade_G3, fadeText3, "x" xTopLeft+fadeText2X-fadeLyr3CanvasX " y" yTopLeft+fadeText2Y-fadeLyr3CanvasY . " " . fadeText1Options, fadeFont, 0, 0)
  1043. }
  1044. If !(fadeExtractionTime="Disabled") {
  1045. extractionElapsedTime := (A_TickCount - startTime)//1000
  1046. if ((fadeExtractionTime="Remaining Time") or (fadeExtractionTime="Labeled Remaining Time")){
  1047. if (timerUpdate + 250 < A_TickCount) {
  1048. timerUpdate := A_TickCount
  1049. tempExtractionRemainingTime := extractionElapsedTime *(100 / percentage - 1)
  1050. extractionRemainingTime := ((tempExtractionRemainingTime - extractionRemainingTime) > 0 and (tempExtractionRemainingTime - extractionRemainingTime) < 6) ? extractionRemainingTime : tempExtractionRemainingTime
  1051. extractionTimeText := (fadeExtractionTime="Labeled Remaining Time") ? "Remaining Time: " . GetTimeString(round(extractionRemainingTime)) : GetTimeString(round(extractionRemainingTime))
  1052. if (stabilityThreshold<4)
  1053. {
  1054. diff := (prevExtractionRemainingTime - extractionRemainingTime)
  1055. if (diff > 0)
  1056. stabilityThreshold++
  1057. else if (diff < 0)
  1058. stabilityThreshold:=0
  1059. extractionTimeText := "Calculating..."
  1060. }
  1061. prevExtractionRemainingTime := extractionRemainingTime
  1062. }
  1063. } else
  1064. extractionTimeText := (fadeExtractionTime="Labeled Elapsed Time") ? "Elapsed Time: " . GetTimeString(extractionElapsedTime) : GetTimeString(extractionElapsedTime)
  1065. Gdip_Alt_TextToGraphics(Fade_G3, extractionTimeText, "x" xTopLeft+fadeExtractionTimeTextX-fadeLyr3CanvasX " y" yTopLeft+fadeExtractionTimeTextY-fadeLyr3CanvasY . " " . fadeExtractionTimeTextOptions, fadeFont, 0, 0)
  1066. }
  1067. } Else { ; bar is at 100%
  1068. if !finishedBar
  1069. Log("DefaultFadeAnimationLoop - Progress bar reached 100%",4)
  1070. finishedBar:= true
  1071. If (fadeBarInfoText = "true")
  1072. {
  1073. if (found7z="true") and (7zEnabled = "true") and !7zTempRomExists and use7zAnimation
  1074. Gdip_Alt_TextToGraphics(Fade_G3, fadeText2, "x" xTopLeft+fadeText2X-fadeLyr3CanvasX " y" yTopLeft+fadeText2Y-fadeLyr3CanvasY . " " . fadeText2Options, fadeFont, 0, 0)
  1075. else
  1076. Gdip_Alt_TextToGraphics(Fade_G3, fadeText4, "x" xTopLeft+fadeText2X-fadeLyr3CanvasX " y" yTopLeft+fadeText2Y-fadeLyr3CanvasY . " " . fadeText2Options, fadeFont, 0, 0)
  1077. }
  1078. }
  1079. Gdip_Alt_FillRoundedRectangle(Fade_G3, fadeBrushBar, xTopLeft+fadeBarX-fadeLyr3CanvasX, yTopLeft+yBar-fadeLyr3CanvasY, fadeBarW*percentage/100, fadeBarH,currentRBar)
  1080. ; Process, Exist, 7z.exe ; This breaks out of 7z.exe If it's no longer running. Sometimes an extraction was very quick or there was an error and we don't want to be stuck in an infinite Loop
  1081. ; If (!ErrorLevel and fadeLyr3Drawn) ; bar is at 100% or 7z is already closed or user interrupted fade, so break out
  1082. If (7zTimedOut >= 200 and fadeLyr3Drawn) ; bar is at 100% or 7z is already closed or user interrupted fade, so break out
  1083. ; If fadeLyr3Drawn
  1084. ; Log("DefaultFadeAnimationLoop - fadeLyr3Drawn is drawn",4)
  1085. ; If !ErrorLevel
  1086. ; Log("DefaultFadeAnimationLoop - 7z.exe is no longer running",4)
  1087. If (((found7z="true") and (7zEnabled = "true") and !(7zTempRomExists) and (use7zAnimation)) and !(rlMode="fade7z")) {
  1088. Log("DefaultFadeAnimationLoop - 7z already finished or user interrupted fade, so animation loop is finished.",4)
  1089. AnimationLoopFinished := true
  1090. }
  1091. If (fadeLyr3Drawn and (finishedBar or !fadeInActive)) {
  1092. Log("DefaultFadeAnimationLoop - Fade Layer 3 is drawn and " . (If finishedBar ? "Extraction bar is at 100%" : "FadeIn is not active") . " so animation loop is finished.",4)
  1093. AnimationLoopFinished := true
  1094. }
  1095. } Else {
  1096. If fadeLyr3Drawn {
  1097. Log("DefaultFadeAnimationLoop - Fade Layer 3 is drawn so animation loop is finished.",4)
  1098. AnimationLoopFinished := true
  1099. }
  1100. }
  1101. Alt_UpdateLayeredWindow(Fade_hwnd3, Fade_hdc3,fadeLyr3CanvasX,fadeLyr3CanvasY, fadeLyr3CanvasW, fadeLyr3CanvasH)
  1102. Return
  1103.  
  1104. _DefaultFadeFinished:
  1105. if (fadeInExitComplete){
  1106. SetTimer, _DefaultFadeFinished, off
  1107. If ((7zSounds = "true") and !(7zSoundChecked)){
  1108. ; stopping extraction sound and checking for complete sound
  1109. If ((extractionSound) or (loadingSound))
  1110. SoundPlay, blank.mp3 ; playing non existent file to stop extraction sound.
  1111. If FileExist( RLMediaPath . "\Fade\" . SystemName . "\" . dbName . "\loading complete.mp3")
  1112. completeSound := RLMediaPath . "\Fade\" . SystemName . "\" . dbName . "\loading complete.mp3"
  1113. Else If FileExist( RLMediaPath . "\Fade\" . SystemName . "\_Default\loading complete.mp3")
  1114. completeSound := RLMediaPath . "\Fade\" . SystemName . "\_Default\loading complete.mp3"
  1115. Else If FileExist( RLMediaPath . "\Fade\_Default\loading complete.mp3")
  1116. completeSound := RLMediaPath . "\Fade\_Default\loading complete.mp3"
  1117. If (completeSound) {
  1118. Log("DefaultFadeAnimationLoop - Playing fade complete sound: " . completeSound)
  1119. SoundPlay, %completeSound%
  1120. }
  1121. }
  1122. }
  1123. return
  1124.  
  1125.  
  1126. ; Simple Hello World Fade Code Tutorial
  1127. HelloWorldCustomFadeAnimation:
  1128. ;====== Initializing Fade Code
  1129. fadeInActive=1
  1130. ;====== Start Loop to draw Hello World text and update 7z extraction percentage If necessary
  1131. Loop {
  1132. Gdip_GraphicsClear(Fade_G3)
  1133. ; Updating 7z extraction info
  1134. If (found7z="true") and (7zEnabled = "true") and !7zTempRomExists {
  1135. SetFormat, Float, 3 ; don't want to show decimal places in the percentage
  1136. romExPercentageAndFile := RLObject.getExtractionSize(7zRomPath, 0) ; Get the current file being extracted and size of the 7z Extract Path - (Extraction Size\Progress (0=Accurate Method, 1=Fast Detection Method))
  1137. Loop, Parse, romExPercentageAndFile, | ; StringSplit oddly doesn't work for some unknown reason, must resort to a parsing Loop instead
  1138. {
  1139. If A_Index = 1
  1140. {
  1141. romExCurSize := A_LoopField ; Store bytes extracted
  1142. romExPercentage := (A_LoopField / romExSize) * 100 ; Calculate percentage extracted
  1143. } Else If A_Index = 2
  1144. romExFile := A_LoopField
  1145. }
  1146. }
  1147. ; Defining text to be shown
  1148. FadeOutputText = Hello World
  1149. If (found7z="true") and (7zEnabled = "true") and !7zTempRomExists
  1150. FadeOutputText := % "Hello World`n Extracting file: " . romExFile . "`nPercentage Extracted: " . romExPercentage . "%"
  1151. ; Calculating the text position centered at the screen
  1152. fadeLyr3CanvasW := MeasureText(FadeOutputText, "s40 Bold","Arial")+20 ; Length of the text
  1153. fadeLyr3CanvasH := 40 ; Font Size
  1154. If (found7z="true") and (7zEnabled = "true") and !7zTempRomExists
  1155. fadeLyr3CanvasH := 140
  1156. fadeLyr3CanvasX := (baseScreenWidth-fadeLyr3CanvasW)//2
  1157. fadeLyr3CanvasY := (baseScreenHeight-fadeLyr3CanvasH)//2
  1158. ; Creating the GDI+ text element
  1159. Gdip_Alt_TextToGraphics(Fade_G3, FadeOutputText, "x" fadeLyr3CanvasW//2 " y0 Bold Center cFFffffff r4 s40", "Arial", 0, 0)
  1160. ; Showing the Hello World text
  1161. Alt_UpdateLayeredWindow(Fade_hwnd3, Fade_hdc3,fadeLyr3CanvasX,fadeLyr3CanvasY, fadeLyr3CanvasW, fadeLyr3CanvasH)
  1162. ; Breaking animation Loop
  1163. Process, Exist, 7z.exe ; This breaks out of 7z.exe If it's no longer running. Sometimes an extraction was very quick or there was an error and we don't want to be stuck in an infinite Loop
  1164. If (!ErrorLevel or (romExPercentage >= 100) or !fadeInActive) ; bar is at 100% or 7z is already closed or user interrupted fade, so break out
  1165. Break
  1166. }
  1167. ; Assuring that fade remains active for the amount of time defined at the fade delay variable
  1168. If fadeInActive
  1169. GoSub, FadeInDelay
  1170. Return
  1171.  
  1172. ; Blank animation which can be used with legacy transition
  1173. NoAnimation:
  1174. Log("NoAnimation - No Animation selected for Fade")
  1175. GoSub, FadeInDelay ; This must always be at the end of all animation functions. It's a simple timer that will force the GUI to stay up the defined amount of delay If the animation was shorter then said delay.
  1176. Return
  1177.  
  1178. ;---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  1179. ;------------------------------------------------------------ USER CUSTOM ANIMATIONS AND TRANSITIONS BELOW THIS LINE ------------------------------------------------------------
  1180. ;---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  1181.  
  1182. MyFirstAnimation:
  1183. Log("MyFirstAnimation - Started")
  1184. Log("MyFirstAnimation - Ended")
  1185. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement