View previous topic :: View next topic |
Author |
Message |
Octopus3535 How do I cheat?
Reputation: 0
Joined: 12 Mar 2016 Posts: 4 Location: the void
|
Posted: Thu Aug 10, 2023 9:07 pm Post subject: Trainer Scaling/Resizing |
|
|
I made a trainer, and for the most part it works fine for me. I made at 2160p so it's a bit large. On smaller screens like 1080p it cuts off the bottom and there's no way to get to it. Is there away to make it so you can resize the window and everything shrinks proportionately? I've tried messing with ChildSizing and AutoScroll. Auto scroll breaks the trainer and when opened has an error message about an access violation. Child sizing seemed like it worked but moved everything so it was unusable. So i anchored everything and it doesn't work anymore.
I have included said trainer and layout.
|
|
Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1516
|
Posted: Fri Aug 11, 2023 1:31 am Post subject: |
|
|
You can get ideas from this code.
My advice is to use scaling as the default 96.
Probably the code I've hidden won't do you any good.
But if you want to resize the control for each pixel change, have a look at the hidden code.
(Still, this may cause you to add too many lines of code.)
Code: | if myForm1 then myForm1.Destroy() myForm1=nil end
DP1=getScreenDPI()/96 -- default CE dpi
myForm1=createForm() or {}
--myForm1 = your Trainer name UDF1 or ..
--[[
function dpiScrn()
local scrHeight = getScreenHeight()
local scrWidth = getScreenWidth()
print(scrHeight,scrWidth)
local DP1
if tonumber(scrWidth)==1680 then
DP1=getScreenDPI()/50
elseif scrWidth=="1080" then
DP1=getScreenDPI()/76
elseif scrWidth=="900" then
DP1=getScreenDPI()/100
else
DP1=getScreenDPI()/96 -- default CE dpi
end
return DP1
end
DP1=dpiScrn()
]]
myForm1.height=200*DP1 myForm1.width=350*DP1 myForm1.left=261*DP1 myForm1.top=98*DP1
myForm1.PopupMode=0 myForm1.caption="myForm1"
myForm1.Position="poDesktopCenter" myForm1.BorderStyle="bsSingle" myForm1.ShowInTaskBar="stAlways"
-------------------------
--local myForm1 = {}
----------------------- myForm1.CEButton1 -----
myForm1.CEButton1=createButton(myForm1)
myForm1.CEButton1.AutoSize=false
myForm1.CEButton1.height=30*DP1 myForm1.CEButton1.width=100*DP1 myForm1.CEButton1.left=50*DP1 myForm1.CEButton1.top=50*DP1
myForm1.CEButton1.caption="CEButton1"
myForm1.CEButton1.Font.Style="fsBold" myForm1.CEButton1.Font.Size=0*DP1
-----------------------
----------------------- myForm1.CEEdit1 -----
myForm1.CEEdit1=createEdit(myForm1)
myForm1.CEEdit1.AutoSize=false
myForm1.CEEdit1.height=30*DP1 myForm1.CEEdit1.width=100*DP1 myForm1.CEEdit1.left=200*DP1 myForm1.CEEdit1.top=50*DP1
myForm1.CEEdit1.text=""
myForm1.CEEdit1.alignment="taLeftJustify"
myForm1.CEEdit1.Font.Style="fsBold" myForm1.CEEdit1.Font.Size=0*DP1
-----------------------
----------------------- myForm1.CEButton2 -----
myForm1.CEButton2=createButton(myForm1)
myForm1.CEButton2.AutoSize=false
myForm1.CEButton2.height=30*DP1 myForm1.CEButton2.width=100*DP1 myForm1.CEButton2.left=50*DP1 myForm1.CEButton2.top=85*DP1
myForm1.CEButton2.caption="CEButton1"
myForm1.CEButton2.Font.Style="fsBold" myForm1.CEButton2.Font.Size=0*DP1
-----------------------
----------------------- myForm1.CEButton3 -----
myForm1.CEButton3=createButton(myForm1)
myForm1.CEButton3.AutoSize=false
myForm1.CEButton3.height=30*DP1 myForm1.CEButton3.width=100*DP1 myForm1.CEButton3.left=50*DP1 myForm1.CEButton3.top=120*DP1
myForm1.CEButton3.caption="CEButton1"
myForm1.CEButton3.Font.Style="fsBold" myForm1.CEButton3.Font.Size=0*DP1
-----------------------
----------------------- myForm1.CEButton4 -----
myForm1.CEButton4=createButton(myForm1)
myForm1.CEButton4.AutoSize=false
myForm1.CEButton4.height=30*DP1 myForm1.CEButton4.width=100*DP1 myForm1.CEButton4.left=50*DP1 myForm1.CEButton4.top=155*DP1
myForm1.CEButton4.caption="CEButton1"
myForm1.CEButton4.Font.Style="fsBold" myForm1.CEButton4.Font.Size=0*DP1
-----------------------
----------------------- myForm1.CEEdit2 -----
myForm1.CEEdit2=createEdit(myForm1)
myForm1.CEEdit2.AutoSize=false
myForm1.CEEdit2.height=30*DP1 myForm1.CEEdit2.width=100*DP1 myForm1.CEEdit2.left=200*DP1 myForm1.CEEdit2.top=85*DP1
myForm1.CEEdit2.text=""
myForm1.CEEdit2.alignment="taLeftJustify"
myForm1.CEEdit2.Font.Style="fsBold" myForm1.CEEdit2.Font.Size=0*DP1
-----------------------
----------------------- myForm1.CEEdit3 -----
myForm1.CEEdit3=createEdit(myForm1)
myForm1.CEEdit3.AutoSize=false
myForm1.CEEdit3.height=30*DP1 myForm1.CEEdit3.width=100*DP1 myForm1.CEEdit3.left=200*DP1 myForm1.CEEdit3.top=120*DP1
myForm1.CEEdit3.text=""
myForm1.CEEdit3.alignment="taLeftJustify"
myForm1.CEEdit3.Font.Style="fsBold" myForm1.CEEdit3.Font.Size=0*DP1
-----------------------
----------------------- myForm1.CEEdit4 -----
myForm1.CEEdit4=createEdit(myForm1)
myForm1.CEEdit4.AutoSize=false
myForm1.CEEdit4.height=30*DP1 myForm1.CEEdit4.width=100*DP1 myForm1.CEEdit4.left=200*DP1 myForm1.CEEdit4.top=155*DP1
myForm1.CEEdit4.text=""
myForm1.CEEdit4.alignment="taLeftJustify"
myForm1.CEEdit4.Font.Style="fsBold" myForm1.CEEdit4.Font.Size=0*DP1
-----------------------
myForm1.CEButton1.OnClick=function()
local scrHeight = getScreenHeight()
local scrWidth = getScreenWidth()
print(scrHeight,scrWidth)
end |
_________________
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25788 Location: The netherlands
|
Posted: Fri Aug 11, 2023 5:27 pm Post subject: |
|
|
find the CE exe, and copy it to cheatengine-somethingelse.exe
rightclick the new file and go to properties->compatibility tab
click on "change high dpi settings" and set "override high DPI scaling behaviour" to "system"
Now use that .exe to create your trainers and make sure that the "scaled" property of the form is set to true. This will make it scale images buttons and everything else according to the design on low dpi
(This is for ce 7.5 trainers, earlier versions always run at low dpi)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
|