| AylinCE Grandmaster Cheater Supreme
 
  Reputation: 37 
 Joined: 16 Feb 2017
 Posts: 1527
 
 
 | 
			
				|  Posted: Wed Apr 01, 2020 4:38 am    Post subject: |   |  
				| 
 |  
				| Good job dude congratulations. I like these kinds of images. It makes classic paintings fun.
 I think I was given permission to edit.
 Like every user, I set it up for myself.
 
 
  	  | Code: |  	  | ----------------------------- The function function createButtonIcon(frm, x, y, w, h, col, ico, txtcol, txtsz, txt, bname, func)
 
 local btnCn = createPanel(frm)
 btnCn.setSize(w,h)
 btnCn.setPosition(x,y)
 btnCn.Color = col
 btnCn.BorderStyle = 'bsNone'
 btnCn.BevelOuter = 'bvNove'
 btnCn.BevelInner = 'bvNove'
 btnCn.Font.Color = txtcol
 btnCn.Font.Size = txtsz
 btnCn.Caption = "       "..txt
 btnCn.OnMouseMove=function() btnCn.Color=col + 70 end
 btnCn.OnMouseLeave=function() btnCn.Color=col end
 btnCn.OnClick=function() func() end
 
 local i = frm.getComponentCount()
 
 if bname == "" or bname == nil then
 btnCn.Name = 'btn'..i
 else
 btnCn.Name = bname
 end
 
 
 local btnIco = createImage(btnCn)
 btnIco.Height = btnCn.Height-10
 btnIco.Width = btnIco.Height
 btnIco.setPosition(10, (btnCn.Height - btnIco.Height) / 2)
 btnIco.Anchors = '[akTop,akLeft,akRight,akBottom]'
 btnIco.Stretch = true
 btnIco.Picture.loadFromStream(findTableFile(ico).stream)
 
 end
 --------------------------------------- Example
 myPicture1 = ("a11.png")
 myPicture2 = ("a12.png")
 myPicture3 = ("a13.png")
 function func1()  end
 function func2()  end
 function func3()  end
 
 f = createForm()
 f.Caption = 'Test Custom Button With Icon'
 createButtonIcon(f, 10,10, 200, 50, 1115250, myPicture1, 0xffffff, 14, 'Cheat Engine', nil, func1)
 createButtonIcon(f, 40,65, 200, 50, 1231210, myPicture2, 0xffffff, 12, 'Auto Assembler', nil, func2)
 createButtonIcon(f, 10,120, 200, 50, 0, myPicture3, 25250, 15, 'My Hack #1', nil, func3)
 | 
 
 thanks again.
 _________________
 
 |  |