vanheartnet

Roblox Portable Tool

Feb 7th, 2021
827
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.86 KB | None | 0 0
  1.  
  2. ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
  3. ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
  4. ;@Ahk2Exe-Set FileDescription, Portable Roblox Tool © VANHEARTNET
  5. ;@Ahk2Exe-Set FileVersion, 1.0.0.1
  6. ;@Ahk2Exe-SetInternalName Roblox Portable Tool
  7. ;@Ahk2Exe-SetName Portable Roblox
  8. ;@Ahk2Exe-SetOrigFileName Portable Roblox Tool
  9. ;@Ahk2Exe-Set ProductName, Portable Roblox Tool
  10. ;@Ahk2Exe-Set ProductVersion, 1.0.0.1
  11. ;@Ahk2Exe-Set Description, Portable Roblox Tool
  12. ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
  13. ;@Ahk2Exe-Obey U_au, = "%A_IsUnicode%" ? 2 : 1 ; Script ANSI or Unicode?
  14. ;@Ahk2Exe-PostExec "BinMod.exe" "%A_WorkFileName%"
  15. ;@Ahk2Exe-Cont "%U_au%2.>AUTOHOTKEY SCRIPT<.01VANHEARTNET "
  16. ;@Ahk2Exe-SetMainIcon icon1.ico
  17. ;@Ahk2Exe-AddResource Icon1.ico, 160 ; Replaces 'H on blue'
  18. ;@Ahk2Exe-AddResource Icon1.ico, 206 ; Replaces 'S on green'
  19. ;@Ahk2Exe-AddResource Icon1.ico, 207 ; Replaces 'H on red'
  20. ;@Ahk2Exe-AddResource Icon1.ico, 208 ; Replaces 'S on red'
  21.  
  22.  
  23.  
  24. #SingleInstance,Force
  25. #Persistent
  26. #NoEnv
  27. Menu,tray, NoStandard
  28. ;~ Menu, Tray, Tip, PORTABLE VALORANT
  29. Menu, Tray, Add, Exit,Exit1
  30. SetWorkingDir, %A_ScriptDir%
  31. SetBatchLines, 20ms
  32. #MaxHotkeysPerInterval 99000000
  33. #HotkeyInterval 99000000
  34. #KeyHistory 0
  35. ListLines Off
  36. Process, Priority, , A
  37. SetKeyDelay, -1, -1
  38. SetMouseDelay, -1
  39. SetDefaultMouseSpeed, 0
  40. SetWinDelay, -1
  41. SetControlDelay, -1
  42. DetectHiddenWindows, On
  43. SetTitleMatchMode, 3
  44. SendMode Input
  45. #Include <Gdip_All>
  46. #Include <GDIpHelper>
  47.  
  48. if not A_IsAdmin
  49. Run, *RunAs "%A_ScriptFullpath%"
  50.  
  51. pToken:=Gdip_Startup()
  52.  
  53. ;Create a empty array called HB_Button
  54. global HB_Button:=[]
  55.  
  56. IfExist,url.ini
  57. {
  58. IniRead,BR,url.ini,Protocol,browser
  59. if(BR=0)
  60. BR:="None"
  61. }
  62. else
  63. BR:="None"
  64.  
  65. CC:="ff4da6"
  66. Gui,1:+AlwaysOntop
  67. Gui,1:Color,360320,999999
  68. IfNotExist,%A_MyDocuments%\Panalo.mp3
  69. FileInstall,Panalo.mp3,%A_MyDocuments%\Panalo.mp3
  70. Gui,1:Font,s8 Bold cFFFF00, Arial Black
  71. Gui,1:Add,Text,x20 y0 w270 Center,- V - A - N - H - E - A - R - T - N - E - T -
  72.  
  73. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:=10 , y := 20 , w := 140 , h := 40 , Button_Color := "865ABB" , Button_Background_Color := "360320" , Text := "Remove Roblox" , Font := "Arial" , Font_Size := 12 " Bold" , Font_Color_Top := CC , Font_Color_Bottom := "111111" , Window := "1" , Label := "Test_Button_Press" , Default_Button := 1 , Roundness:=5 ) )
  74. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x+=w+10 , y := 20 , w := 140 , h := 40 , Button_Color := "865ABB" , Button_Background_Color := "360320" , Text := "Desktop Shortcut" , Font := "Arial" , Font_Size := 12 " Bold" , Font_Color_Top := CC , Font_Color_Bottom := "111111" , Window := "1" , Label := "Create_Shortcut" , Default_Button := 1 , Roundness:=5 ) )
  75. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:=10 , y +=h+5 , w := 140 , h := 40 , Button_Color := "865ABB" , Button_Background_Color := "360320" , Text := "Create MKLink" , Font := "Arial" , Font_Size := 12 " Bold" , Font_Color_Top := CC , Font_Color_Bottom := "111111" , Window := "1" , Label := "Create_MKLink" , Default_Button := 1 , Roundness:=5 ) )
  76. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x+=w+10 , y:=y , w := 140 , h := 40 , Button_Color := "865ABB" , Button_Background_Color := "360320" , Text := "Delete MKLink" , Font := "Arial" , Font_Size := 12 " Bold" , Font_Color_Top := CC , Font_Color_Bottom := "111111" , Window := "1" , Label := "Delete_MKLink" , Default_Button := 1 , Roundness:=5 ) )
  77.  
  78. Gui,1:Font,
  79. Gui,1:Font,s8 Bold c888888, Arial Black
  80. Gui,1:Add,Text,x70 y120 Center, URL Protocol AppData Method:
  81. Gui,1:Font,s8 Bold c00FFFF, Arial Black
  82. Gui,1:Add,Text,x71 y121 Center, URL Protocol AppData Method:
  83.  
  84. Gui,1:Font,
  85. Gui,1:Font,s15 Bold c000000, Calibri
  86. Gui,1:Add,Edit,x20 y+10 w270 r1 Center vEdit1,%BR%
  87. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:=10 , y:=185 , w := 140 , h := 40 , Button_Color := "865ABB" , Button_Background_Color := "360320" , Text := "Save" , Font := "Arial" , Font_Size := 12 " Bold" , Font_Color_Top := "00FF00" , Font_Color_Bottom := "111111" , Window := "1" , Label := "Save" , Default_Button := 1 , Roundness:=5 ) )
  88. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x+=w+10 , y:=185 , w := 140 , h := 40 , Button_Color := "865ABB" , Button_Background_Color := "360320" , Text := "Delete Appdata" , Font := "Arial" , Font_Size := 12 " Bold" , Font_Color_Top := "FF0000" , Font_Color_Bottom := "111111" , Window := "1" , Label := "Delete_App" , Default_Button := 1 , Roundness:=5 ) )
  89. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:=10 , y+=h+5 , w := 290 , h := 50 , Button_Color := "865ABB" , Button_Background_Color := "360320" , Text := "Launch Roblox" , Font := "Arial" , Font_Size := 12 " Bold" , Font_Color_Top := "ffccff" , Font_Color_Bottom := "111111" , Window := "1" , Label := "Launch_Roblox" , Default_Button := 1 , Roundness:=5 ) )
  90. Gui,1:Font,
  91. Gui,1:Font,s10 Bold cff0000, Times New Roman
  92. Gui,1:Add,Text,x20 y280 w270 Center vText1, Panalo - Ez Mil
  93. GuiControl ,1:Focus , Text1
  94. Gui,1:Show,w310 h300,Roblox Portable Tool
  95.  
  96. IfNotExist, Roblox Portable by © VANHEARTNET.exe
  97. {
  98. MsgBox,Error,Please Move to Roblox Portable Folder. `n`n-VANHEARTNET
  99. ExitApp
  100. }
  101. SetTimer, HB_Button_Hover , 50
  102. SetTimer,PlayMusic, 100
  103. Loop
  104. {
  105. SoundPlay,%A_MyDocuments%\Panalo.mp3,1
  106. sleep,5000
  107. }
  108. return
  109. Delete_App:
  110. ;-----------------------------------------------------
  111. ; In the button label, add the focus grab line
  112. GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  113. ; Add the button press function call and test
  114. if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  115. return
  116. ;----------------------------------------------
  117. SoundBeep, 5000
  118. Gui,1:Submit,Nohide
  119. FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\%Edit1%,1
  120. MsgBox,262208,Message,Delete Complete!
  121. return
  122. Save:
  123. ;-----------------------------------------------------
  124. ; In the button label, add the focus grab line
  125. GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  126. ; Add the button press function call and test
  127. if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  128. return
  129. ;----------------------------------------------
  130. SoundBeep, 5000
  131. Gui,1:Submit,Nohide
  132. Gui,1:+Owndialogs
  133. if (Edit1="") or (Edit1=0)
  134. {
  135. IniWrite,0,url.ini,Protocol,browser
  136. return
  137. }
  138. else if(Edit1="None")
  139. {
  140. IniWrite,0,url.ini,Protocol,browser
  141. return
  142. }
  143. IfExist, Appdata\%Edit1%
  144. {
  145. FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\%Edit1%,1
  146. Run, *RunAs cmd.exe /c mklink /d "C:\Users\%A_UserName%\AppData\Local\%Edit1%" "`%CD`%\Appdata\%Edit1%",,Hide
  147. }
  148. else
  149. return
  150. IniWrite,%Edit1%,url.ini,Protocol,browser
  151. MsgBox,262208,Message,Complete!
  152. return
  153. Launch_Roblox:
  154. ;-----------------------------------------------------
  155. ; In the button label, add the focus grab line
  156. GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  157. ; Add the button press function call and test
  158. if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  159. return
  160. ;----------------------------------------------
  161. SoundBeep, 5000
  162. IfNotExist, Roblox Portable by © VANHEARTNET.exe
  163. {
  164. MsgBox,Error,Please Move to Roblox Portable Folder. `n`n-VANHEARTNET
  165. ExitApp
  166. }
  167. else
  168. Run, *RunAs cmd.exe /c "Roblox Portable by © VANHEARTNET.exe",,Hide
  169. return
  170.  
  171. PlayMusic:
  172. TX--
  173. GuiControl,1:Move,Text1,x%TX%
  174. if(TX="-180")
  175. {
  176. TX:=310
  177. GuiControl,1:Move,Text1,x%TX%
  178. }
  179. Return
  180.  
  181. GuiClose:
  182. Esc::
  183. Exit1:
  184. FileDelete,%A_MyDocuments%\Panalo.mp3
  185. ExitApp
  186. Create_Shortcut:
  187. ;-----------------------------------------------------
  188. ; In the button label, add the focus grab line
  189. GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  190. ; Add the button press function call and test
  191. if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  192. return
  193. ;----------------------------------------------
  194. SoundBeep, 5000
  195. StringReplace,FullPath,A_ScriptFullPath,%A_ScriptName%,Roblox Portable by © VANHEARTNET.exe,All
  196. FileCreateShortcut,%FullPath%,%A_Desktop%\Roblox.lnk,%FullPath%,
  197. return
  198. Delete_MKLink:
  199. ;-----------------------------------------------------
  200. ; In the button label, add the focus grab line
  201. GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  202. ; Add the button press function call and test
  203. if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  204. return
  205. ;----------------------------------------------
  206. SoundBeep, 5000
  207. FileRemoveDir,C:\Program Files (x86)\Roblox,1
  208. FileRemoveDir,C:\ProgramData\Roblox,1
  209. FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\Roblox,1
  210. Gui,1:+Owndialogs
  211. MsgBox, 262208, Success, Roblox Folder in System has been Deleted!
  212. return
  213. Create_MKLink:
  214. ;-----------------------------------------------------
  215. ; In the button label, add the focus grab line
  216. GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  217. ; Add the button press function call and test
  218. if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  219. return
  220. ;----------------------------------------------
  221. SoundBeep, 5000
  222. Run, *RunAs cmd.exe /c mklink /d "C:\Program Files (x86)\Roblox" "`%CD`%\Roblox" && mklink /d "C:\ProgramData\Roblox" "`%CD`%\Programdata\Roblox" && mklink /d "C:\Users\%A_UserName%\AppData\Local\Roblox" "`%CD`%\AppData\Roblox",,Hide
  223. Gui,1:+Owndialogs
  224. MsgBox, 262208, Message, MKLink Success!!! `n`n-Thank You...
  225. return
  226.  
  227. Test_Button_Press:
  228. ;-----------------------------------------------------
  229. ; In the button label, add the focus grab line
  230. GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  231. ; Add the button press function call and test
  232. if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  233. return
  234. ;----------------------------------------------
  235. SoundBeep, 5000
  236. FileRemoveDir,C:\Program Files (x86)\Roblox,1
  237. FileRemoveDir,C:\ProgramData\Roblox,1
  238. FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\Roblox,1
  239. FileRemoveDir, %A_Temp%\reg,1
  240. IfExist,C:\Users\%A_UserName%\Desktop\Roblox Studio.lnk
  241. FileDelete,C:\Users\%A_UserName%\Desktop\Roblox Studio.lnk
  242. else IfExist,C:\Users\%A_UserName%\Desktop\Roblox Player.lnk
  243. FileDelete,C:\Users\%A_UserName%\Desktop\Roblox Player.lnk
  244. IfExist,url.ini
  245. FileDelete,url.ini
  246. RegN:=0
  247. Loop, 3
  248. {
  249. RegN++
  250. If (RegN=1)
  251. SetRegView, 32
  252. if (RegN=2)
  253. SetRegView,64
  254. if(RegN=3){
  255. SetRegView,Default
  256. RegN:=0
  257. }
  258. RegDelete,HKLM,Software\ROBLOX Corporation,
  259. RegDelete,HKLM,SOFTWARE\ROBLOX Corporation,
  260. RegDelete,HKLM,SOFTWARE\Wow6432Node\ROBLOX Corporation,
  261. RegDelete,HKEY_CLASSES_ROOT,Roblox.Place,
  262. RegDelete,HKEY_CLASSES_ROOT,roblox-player,
  263. RegDelete,HKEY_CLASSES_ROOT,roblox-studio,
  264. Sleep, 100
  265. }
  266. Gui,1:+Owndialogs
  267. MsgBox, 262208, Success, Roblox Folder in System has been Deleted!`nRoblox Registry has been Deleted!`nRoblox Portable Settings has been Reset!
  268. return
  269.  
  270. ;-----------------------------------------------------------------
  271. ;Add the hover fuction to the bottom of your script (or go lib route if you know how to)
  272. HB_Button_Hover(){
  273. Static Index , Hover_On
  274. MouseGetPos,,,, ctrl , 2
  275. if( ! Hover_On && ctrl ){
  276. loop , % HB_Button.Length()
  277. if( ctrl = HB_Button[ A_Index ].hwnd )
  278. HB_Button[ A_Index ].Draw_Hover() , Index := A_Index , Hover_On := 1 , break
  279. }else if( Hover_On = 1 )
  280. if( ctrl != HB_Button[ Index ].Hwnd )
  281. HB_Button[ Index ].Draw_Default() , Hover_On := 0
  282. }
  283. ;-----------------------------------------------------------------
  284.  
  285.  
  286.  
  287. ;-----------------------------------------------------------------
  288. ;Add the button class to the bottom of your script (or go lib route if you know how to)
  289.  
  290. class HB_Flat_Rounded_Button_Type_1 {
  291. __New( x := 10 , y := 10 , w := 150 , h := 40 , Button_Color := "FF0000" , Button_Background_Color := "222222" , Text := "Button" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "FFFFFF" , Window := "1" , Label := "" , Default_Button := 1, Roundness:=5 ){
  292. This.Roundness:=Roundness
  293. This.Text_Color_Top := "0xFF" Font_Color_Top
  294. This.Text_Color_Bottom := "0xFF" Font_Color_Bottom
  295. This.Font := Font
  296. This.Font_Size := Font_Size
  297. This.Text := Text
  298. This.X := x
  299. This.Y := y
  300. This.W := w
  301. This.H := h
  302. This.Button_Background_Color := "0xFF" Button_Background_Color
  303. This.Button_Color := "0xFF" Button_Color
  304. This.Window := Window
  305. This.Label := Label
  306. This.Default_Button := Default_Button
  307. This.Create_Default_Bitmap()
  308. This.Create_Hover_Bitmap()
  309. This.Create_Pressed_Bitmap()
  310. This.Create_Trigger()
  311. sleep, 20
  312. This.Draw_Default()
  313. }
  314. Create_Trigger(){
  315. global
  316. num := HB_Button.Length()+1
  317. Gui , % This.Window ": Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
  318. This.Number := Num , This.Hwnd := Hwnd
  319. }
  320. Create_Default_Bitmap(){
  321. ;Bitmap Created Using: HB Bitmap Maker
  322. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;96x29
  323. G := Gdip_GraphicsFromImage( pBitmap )
  324. Gdip_SetSmoothingMode( G , 2 )
  325. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  326. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  327. Gdip_DeleteBrush( Brush )
  328. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF61646A" , "0xFF2E2124" , 1 , 1 )
  329. Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  330. Gdip_DeleteBrush( Brush )
  331.  
  332. ;---------------------------------------------------
  333. if(This.Default_Button)
  334. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF4C4F54" , "0xFF35373B" , 1 , 1 )
  335. else
  336. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , This.Button_Color , "0xFF35373B" , 1 , 1 )
  337. ;-------------------------------------------
  338.  
  339. Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-2 , This.H-5 , This.Roundness )
  340. Gdip_DeleteBrush( Brush )
  341. Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
  342. Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  343. Gdip_DeletePen( Pen )
  344. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  345. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y2 " , This.Font , This.W , This.H-1 )
  346. Gdip_DeleteBrush( Brush )
  347. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  348. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y1 " , This.Font , This.W , This.H-1 )
  349. Gdip_DeleteBrush( Brush )
  350. Gdip_DeleteGraphics( G )
  351. This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  352. Gdip_DisposeImage(pBitmap)
  353. }
  354. Create_Hover_Bitmap(){
  355. ;Bitmap Created Using: HB Bitmap Maker
  356. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;96x29
  357. G := Gdip_GraphicsFromImage( pBitmap )
  358. Gdip_SetSmoothingMode( G , 2 )
  359. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  360. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  361. Gdip_DeleteBrush( Brush )
  362.  
  363. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF61646A" , "0xFF2E2124" , 1 , 1 )
  364. Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  365. Gdip_DeleteBrush( Brush )
  366. ;---------------------------------------------------------------------------
  367. if(This.Default_Button)
  368. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF55585D" , "0xFF3B3E41" , 1 , 1 )
  369.  
  370. else
  371. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0x44A826A2" , "0xFF3B3E41" , 1 , 1 )
  372. ;----------------------------------------------------------------
  373. Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-2 , This.H-5 , This.Roundness )
  374. Gdip_DeleteBrush( Brush )
  375. Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
  376. Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  377. Gdip_DeletePen( Pen )
  378. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  379. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y2" , This.Font , This.W , This.H-1 )
  380. Gdip_DeleteBrush( Brush )
  381. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  382. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y1" , This.Font , This.W , This.H-1 )
  383. Gdip_DeleteBrush( Brush )
  384. Gdip_DeleteGraphics( G )
  385. This.Hover_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  386. Gdip_DisposeImage(pBitmap)
  387. }
  388. Create_Pressed_Bitmap(){
  389. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  390. G := Gdip_GraphicsFromImage( pBitmap )
  391. Gdip_SetSmoothingMode( G , 2 )
  392. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  393. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  394. Gdip_DeleteBrush( Brush )
  395. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF2A2C2E" , "0xFF45474E" , 1 , 1 )
  396. Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  397. Gdip_DeleteBrush( Brush )
  398. Brush := Gdip_BrushCreateSolid( "0xFF2A2C2E" )
  399. Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , This.W , This.H-8 , This.Roundness )
  400. Gdip_DeleteBrush( Brush )
  401. Brush := Gdip_BrushCreateSolid( "0xFF46474D" )
  402. Gdip_FillRoundedRectangle( G , Brush , 0 , 7 , This.W , This.H-8 , This.Roundness )
  403. Gdip_DeleteBrush( Brush )
  404. ;------------------------------------------------------------------
  405. if(This.Default_Button)
  406. Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , This.W ,This.H-7 , "0xFF333639" , "0xFF43474B" , 1 , 1 )
  407. else
  408. Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , This.W ,This.H-7 , "0xFF333639" , "0xFF0066aa" , 1 , 1 )
  409. ;-----------------------------------------------------------------------
  410. Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-3 , This.H-6 , This.Roundness )
  411. Gdip_DeleteBrush( Brush )
  412. Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
  413. Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  414. Gdip_DeletePen( Pen )
  415. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  416. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y3" , This.Font , This.W , This.H-1 )
  417. Gdip_DeleteBrush( Brush )
  418. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  419. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y2" , This.Font , This.W , This.H-1 )
  420. Gdip_DeleteBrush( Brush )
  421. Gdip_DeleteGraphics( G )
  422. This.Pressed_Bitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
  423. Gdip_DisposeImage( pBitmap )
  424. }
  425. Draw_Default(){
  426. SetImage( This.Hwnd , This.Default_Bitmap )
  427. }
  428. Draw_Hover(){
  429. SetImage( This.Hwnd , This.Hover_Bitmap )
  430. }
  431. Draw_Pressed(){
  432. SetImage( This.Hwnd , This.Pressed_Bitmap )
  433. SetTimer , HB_Button_Hover , Off
  434. While( GetKeyState( "LButton" ) )
  435. sleep , 10
  436. SetTimer , HB_Button_Hover , On
  437. MouseGetPos,,,, ctrl , 2
  438. if( This.Hwnd != ctrl ){
  439. This.Draw_Default()
  440. return False
  441. }else {
  442. This.Draw_Hover()
  443. return true
  444. }
  445. }
  446. }
Advertisement
Add Comment
Please, Sign In to add comment