Skip to content

Commit

Permalink
test and fix hotkey stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
cheat-engine committed Sep 29, 2016
1 parent c9b254d commit 43d4bdd
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 23 deletions.
3 changes: 2 additions & 1 deletion Cheat Engine/CEFuncProc.pas
Expand Up @@ -289,7 +289,8 @@ type TScanSettings = record

type tspeedhackspeed=record
speed: single;
sleeptime: dword; //obsolete
disablewhenreleased: boolean;
keycombo: TKeyCombo;
end;


Expand Down
8 changes: 4 additions & 4 deletions Cheat Engine/MainUnit.pas
Expand Up @@ -1410,7 +1410,7 @@ procedure TMainForm.Hotkey2(var Message: TMessage);
editsh2.Text := format('%.3f', [speedhackspeed2.speed]);
btnSetSpeedhack2.Click;

if speedhackspeed1.disablewhenreleased then
if speedhackspeed2.disablewhenreleased then
begin
//spawn a timer
if speedhackDisableTimer=nil then
Expand All @@ -1437,7 +1437,7 @@ procedure TMainForm.Hotkey2(var Message: TMessage);
editsh2.Text := format('%.3f', [speedhackspeed3.speed]);
btnSetSpeedhack2.Click;

if speedhackspeed1.disablewhenreleased then
if speedhackspeed3.disablewhenreleased then
begin
//spawn a timer
if speedhackDisableTimer=nil then
Expand All @@ -1464,7 +1464,7 @@ procedure TMainForm.Hotkey2(var Message: TMessage);
editsh2.Text := format('%.3f', [speedhackspeed4.speed]);
btnSetSpeedhack2.Click;

if speedhackspeed1.disablewhenreleased then
if speedhackspeed4.disablewhenreleased then
begin
//spawn a timer
if speedhackDisableTimer=nil then
Expand All @@ -1491,7 +1491,7 @@ procedure TMainForm.Hotkey2(var Message: TMessage);
editsh2.Text := format('%.3f', [speedhackspeed5.speed]);
btnSetSpeedhack2.Click;

if speedhackspeed1.disablewhenreleased then
if speedhackspeed5.disablewhenreleased then
begin
//spawn a timer
if speedhackDisableTimer=nil then
Expand Down
13 changes: 7 additions & 6 deletions Cheat Engine/bin/main.lua
Expand Up @@ -788,9 +788,13 @@ methods
Application Class: (Inheritance: CustomApplication->Component->Object)
properties
Title: The title of cheat engine in the bar
Icon: The icon of Cheat Engine inn the bar
methods
bringToFront(): Shows the cheat engine app
processMessages()
terminate()
minimize()
Form Class: (Inheritance: ScrollingWinControl->CustomControl->WinControl->Control->Component->Object)
Expand Down Expand Up @@ -1432,6 +1436,8 @@ createPNG(width, height) - Returns a PortableNetworkGraphic object
JpegImage Class: (Inheritence: CustomBitmap->RasterImage->Graphic->Object)
createJpeg(width, height) - Returns a Jpeg object
Icon Class: (Inheritence: CustomBitmap->RasterImage->Graphic->Object)
createIcon(width, height) - Returns an Icon object
Picture Class : (Inheritance: Object) : Container for the Graphic class
Expand All @@ -1442,18 +1448,13 @@ properties
PNG
Bitmap
Jpeg
Icon
methods
loadFromFile(filename)
saveToFile(filename)
loadFromStream(stream, originalextension OPTIONAL) : Loads a picture from a stream. Note that the stream position must be set to the start of the picture
assign(sourcepicture)
getGraphic() : Gets the Graphic object of this picture
getPNG(): Returns a PortableNetworkGraphic Class object (Can be used from scratch)
getBitmap(): Returns a Bitmap Class object (Can be used from scratch)
getJpeg(): Returns a JpegImage Class object (Picture must be initialized with a jpeg file first)
GenericHotkey Class : (Inheritance: Object)
Expand Down
18 changes: 9 additions & 9 deletions Cheat Engine/formChangedAddresses.lfm
Expand Up @@ -14,7 +14,7 @@ object frmChangedAddresses: TfrmChangedAddresses
LCLVersion = '1.6.0.4'
object lblInfo: TLabel
Left = 0
Height = 32
Height = 15
Top = 0
Width = 379
Align = alTop
Expand All @@ -24,20 +24,20 @@ object frmChangedAddresses: TfrmChangedAddresses
end
object Panel1: TPanel
Left = 0
Height = 34
Top = 251
Height = 33
Top = 252
Width = 379
Align = alBottom
Anchors = [akRight, akBottom]
AutoSize = True
ClientHeight = 34
ClientHeight = 33
ClientWidth = 379
TabOrder = 0
object OKButton: TButton
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Panel1
Left = 4
Height = 26
Height = 25
Top = 4
Width = 90
AutoSize = True
Expand All @@ -55,12 +55,12 @@ object frmChangedAddresses: TfrmChangedAddresses
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
Left = 196
Height = 24
Height = 23
Top = 4
Width = 179
Anchors = [akTop, akRight]
BorderSpacing.Right = 3
ItemHeight = 16
ItemHeight = 15
ItemIndex = 2
Items.Strings = (
'Byte'
Expand All @@ -76,8 +76,8 @@ object frmChangedAddresses: TfrmChangedAddresses
end
object Changedlist: TListView
Left = 0
Height = 219
Top = 32
Height = 237
Top = 15
Width = 379
Align = alClient
Columns = <
Expand Down
4 changes: 2 additions & 2 deletions Cheat Engine/formPointerOrPointeeUnit.lfm
@@ -1,7 +1,7 @@
object formPointerOrPointee: TformPointerOrPointee
Left = 626
Left = 169
Height = 99
Top = 269
Top = 810
Width = 354
AutoSize = True
BorderIcons = [biSystemMenu]
Expand Down
1 change: 1 addition & 0 deletions Cheat Engine/frameHotkeyConfigUnit.lfm
Expand Up @@ -110,6 +110,7 @@ object frameHotkeyConfig: TframeHotkeyConfig
BorderSpacing.Top = 2
BorderSpacing.Right = 2
OnKeyDown = Edit1KeyDown
OnMouseDown = Edit1MouseDown
ReadOnly = True
TabOrder = 0
end
Expand Down
17 changes: 17 additions & 0 deletions Cheat Engine/frameHotkeyConfigUnit.pas
Expand Up @@ -34,6 +34,8 @@ TframeHotkeyConfig = class(TFrame)
Label4: TLabel;
Label5: TLabel;
PopupMenu1: TPopupMenu;
procedure Edit1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure edtSHSpeedChange(Sender: TObject);
procedure ListBox1Click(Sender: TObject);
procedure Edit1KeyDown(Sender: TObject; var Key: Word;
Expand Down Expand Up @@ -181,6 +183,21 @@ procedure TframeHotkeyConfig.edtSHSpeedChange(Sender: TObject);

end;

procedure TframeHotkeyConfig.Edit1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var key: word;
begin
key:=0;
case button of
mbMiddle: key:=VK_MBUTTON;
mbExtra1: key:=VK_XBUTTON1;
mbExtra2: key:=VK_XBUTTON2;
end;

if key<>0 then
Edit1KeyDown(edit1, key, shift);
end;

procedure TframeHotkeyConfig.Edit1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var i: integer;
Expand Down
3 changes: 2 additions & 1 deletion Cheat Engine/release/readme.txt
Expand Up @@ -40,7 +40,7 @@ Single stepping now shows an indication if an condition jump will be taken
Added a watchlist to the debugger
Added the 'align' assembler pseudo command (allocates memory so the next line is aligned on a block of the required size)
Added the 'Not' option for scans, which causes all addresses that match the given entry as invalid
Changed the Unicode text to UTF-16. Text scans are now UTF8/UTF16 (no wincp)
Changed the Unicode text to UTF-16. Text scans are now UTF8/UTF16 (no codepage)
Hexview can now show and edit values in 3 different textencodings. (Ascii, UTF-8 and UTF-16)
Rescan pointerscans on pointerscans that where done on a range can now change the offset

Expand All @@ -53,6 +53,7 @@ getFileVersion(): A function to get version information from a file
mouse_event() : Lets you send mouse events to windows. (move, click, etc...)
loadFontFromStream() : Lets you load a font from a memory stream. (Useful for trainers that use a custom font)
added several thread synchronization objects
control class: added bringToFront and sendToBack

lua changes:
dbk_writesIgnoreWriteProtection() now also disables virtualprotectex calls from CE
Expand Down

0 comments on commit 43d4bdd

Please sign in to comment.