AylinCE Grandmaster Cheater Supreme Reputation: 34
Joined: 16 Feb 2017 Posts: 1432
|
Posted: Fri Mar 22, 2024 2:42 pm Post subject: CE-FORM Editable Message Box! (ShowMessage Custom) |
|
|
Just an idea.
You can edit colors, options and fonts, and create fun message boxes customized for you.
Button outputs: It will give 1 or 2 output warnings. So you will know which key the user pressed.
Message overflow: You can optionally use "\n" or write a long message.
Buttons: You can give one or two buttons and determine what will be written on them.
Different options are given in the pictures.
Code: | --############################################################################--
--############################################################################--
DP1 = getScreenDPI() / 96
if fHand1 then fHand1.Destroy() fHand1=nil end
fHand1 = createForm(MainForm)
fHand1.BorderStyle="bsNone"
fHand1.setLayeredAttributes(0x000100, 255, LWA_COLORKEY | LWA_ALPHA )
fHand1.Color=0x000100
fHand1.Visible=false
local showMessageCustom=function(frm,title,text,tclr,tfclr,fclr,sclr,bclr,mr1,mr2,ops)
frm22 = frm --MainForm
result1 = 0
if not inMainThread() then messageDialog(' ',mtError) end
fHand1.Visible=true
fHand1.Popupmode=1; fHand1.Width=450*DP1 fHand1.Height=180*DP1
fHand1.caption=title
fHand1.BorderStyle="bsNone"
fHand1.Font.Style="fsBold" fHand1.Font.Name="Lucida Fax"
fHand1.setLayeredAttributes(0x000100, 255, LWA_COLORKEY | LWA_ALPHA )
fHand1.Color=0x000100
--############################################################################--
--############################################################################--
pHand1=createPanel(fHand1)
pHand1.Width=340*DP1 pHand1.Height=30*DP1
pHand1.Top=5*DP1 pHand1.Color=tclr pHand1.Font.Color=tfclr
pHand1.BevelColor=clDefault pHand1.BevelWidth=4*DP1
pHand1.OnMouseDown=function() fHand1.DragNow() end
pHand1.Caption=fHand1.caption pHand1.Font.Size=11*DP1
--############################################################################--
pImg1=createPanel(fHand1)
pImg1.Height=fHand1.Height - 80*DP1
pImg1.Width=340*DP1 pImg1.Top=35*DP1 pImg1.Color=bclr
pImg1.BevelColor=clDefault pImg1.BevelWidth=4*DP1
--############################################################################--
pHand2=createPanel(fHand1)
pHand2.Width=340*DP1 pHand2.Height=32*DP1 pHand2.Color=tclr
pHand2.BevelColor=clDefault pHand2.BevelWidth=4*DP1
--############################################################################--
if ops==1 then pHand1.Left=0*DP1 pImg1.Left=50*DP1 pHand2.Left=95*DP1
elseif ops==2 then pHand1.Left=95*DP1 pImg1.Left=50*DP1 pHand2.Left=95*DP1
elseif ops==3 then pHand1.Left=50*DP1 pImg1.Left=50*DP1 pHand2.Left=50*DP1
elseif ops==4 then pHand1.Left=0*DP1 pImg1.Left=50*DP1 pHand2.Left=0*DP1
elseif ops==5 then pHand1.Left=95*DP1 pImg1.Left=50*DP1 pHand2.Left=95*DP1
else pHand1.Left=0*DP1 pImg1.Left=50*DP1 pHand2.Left=95*DP1 end
--############################################################################--
pLbl2=createLabel(pImg1)
pLbl2.Tag=90*DP1
pLbl2.width=380*DP1
pLbl2.left=5*DP1 pLbl2.top=5*DP1
pLbl2.Font.Color=sclr --4342338
pLbl2.alignment="taCenter" pLbl2.Font.Style="fsBold" pLbl2.WordWrap=true
pLbl2.OnMouseDown=function() fHand1.DragNow() end
pLbl1=createLabel(pImg1)
pLbl1.left=15*DP1 pLbl1.top=10*DP1
pLbl1.Font.Color=fclr --13231816 --0xffffff --16776960
pLbl1.alignment="taCenter" pLbl1.Font.Style="fsBold" pLbl1.WordWrap=true
pLbl1.OnMouseDown=function() fHand1.DragNow() end
--############################################################################--
--############################################################################--
pBtn1=createButton(pHand2) pBtn1.Width=70*DP1 pBtn1.Height=22*DP1
pBtn1.Caption=mr1 pBtn1.Font.Size=10*DP1 pBtn1.Top=5
pBtn2=createButton(pHand2) pBtn2.Width=70*DP1 pBtn2.Height=22*DP1
pBtn2.Caption=mr2 pBtn2.Font.Size=10*DP1 pBtn2.Top=5
if mr2=="" then
pBtn1.Left=pHand2.Width / 2 - pBtn1.Width / 2*DP1
pBtn2.Visible=false
else
pBtn1.Left=90*DP1 pBtn2.Left=pHand2.Width - 160*DP1
end
--############################################################################--
--############################################################################--
pLbl1.caption=text
pLbl2.caption=text
pLbl1.Font.Height=12
pLbl1.Font.Size=10*DP1
pLbl1.AutoSize=true
cnt = pLbl1.width / 280
print(pLbl1.width,math.floor(cnt))
pLbl1.AutoSize=false
pLbl1.Height = 15 * math.floor(cnt)
pLbl1.OptimalFill=true
pLbl1.width=pImg1.width - 20
pLbl1.Tag = pLbl1.width - 20
pImg1.Height=pLbl1.Height + 20
pHand2.Top=pImg1.Height + pImg1.Top
pLbl1.Left=10
pLbl1.Top=10
pLbl2.AutoSize=false
pLbl2.Font.Height=pLbl1.Font.Height
pLbl2.Font.Size=pLbl1.Font.Size*DP1
pLbl2.Height = pLbl1.Height
pLbl2.width = pLbl1.width
pLbl2.Left = pLbl1.Left - 2
pLbl2.Top = pLbl1.Top - 2
fHand1.Height=pHand1.Height + pImg1.Height + pHand2.Height + 30
fHand1.Left = frm22.Width / 2 + frm22.Left - fHand1.Width / 2
fHand1.Top = frm22.Height / 2 + frm22.Top - fHand1.Height / 2
fHand1.Visible=false
pBtn1.OnClick=function()
result1 = 1
fHand1.ModalResult=mrOK
return result1
end
pBtn2.OnClick=function()
result1 = 2
fHand1.ModalResult=mrOK
end
beep()
fHand1.showModal()
return result1
end
--############################################################################--
--############################################################################--
function showMessageEx(text,mr1,mr2,ops)
frm=MainForm -- owner form name (UDF1..)
title="By AylinCE Trainers (2024)"
tclr=16776960 -- title & btn panels color
tfclr=0 --65280
fclr=16777215 -- label font color
sclr=6381921 -- label shadow font color
bclr=12339115 -- message background color
if mr1=="" then mr1="OK" end --button 1
if mr2=="" then mr2="" end
--mr2="CANCEL" -- button 2
result2 = showMessageCustom(frm,title,text,tclr,tfclr,fclr,sclr,bclr,mr1,mr2,ops)
return result2
end
--############################################################################--
--############################################################################--
msg1 = "Have you researched what else can be done with Cheat Engine? People seeing Trainers with different functions and visuals, what a few buttons can create, the dance of codes, different dimensions of entertainment and the gathering of many factors open to development. What else can you do with CE?"
msg2 = "People seeing Trainers with different functions and visuals, what a few buttons can create, the dance of codes, different dimensions of entertainment and the gathering of many factors open to development. What else can you do with CE?"
msg3 = "Have you researched what else can be done with Cheat Engine?"
--aa21 = showMessageEx(msg1,"","",4)
--print(aa21)
--aa22 = showMessageEx(msg2,"OK","CANCEL",1)
--print(aa22)
aa23 = showMessageEx(msg3,"YES","NO",2)
print(aa23) |
Until we see you in another different and fun post, enjoy.
Description: |
|
Filesize: |
5.9 KB |
Viewed: |
6046 Time(s) |
|
Description: |
|
Filesize: |
12.61 KB |
Viewed: |
6046 Time(s) |
|
Description: |
|
Filesize: |
16.33 KB |
Viewed: |
6046 Time(s) |
|
_________________
|
|