AT LAST! I fixed the keyboard input :-)
This commit is contained in:
parent
849426664f
commit
510c4c87a9
@ -13,6 +13,7 @@ type
|
|||||||
procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND;
|
procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND;
|
||||||
// procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS;
|
// procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS;
|
||||||
// procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS;
|
// procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS;
|
||||||
|
procedure WMGetDlgCode(var Message: TMessage); message WM_GETDLGCODE;
|
||||||
protected
|
protected
|
||||||
|
|
||||||
public
|
public
|
||||||
@ -54,6 +55,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
procedure TCustomDrawControl.WMGetDlgCode(var Message: TMessage);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
Message.Result := Message.Result or DLGC_WANTARROWS;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomDrawControl.Paint;
|
procedure TCustomDrawControl.Paint;
|
||||||
begin
|
begin
|
||||||
if Assigned(FOnPaint) then FOnPaint(Self);
|
if Assigned(FOnPaint) then FOnPaint(Self);
|
||||||
|
@ -370,11 +370,6 @@ var
|
|||||||
|
|
||||||
{$R *.DFM}
|
{$R *.DFM}
|
||||||
|
|
||||||
procedure DrawGraph;
|
|
||||||
begin
|
|
||||||
EditForm.TriangleView.Invalidate;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ Triangle transformations }
|
{ Triangle transformations }
|
||||||
|
|
||||||
function OffsetTriangleRandom(t: TTriangle): TTriangle;
|
function OffsetTriangleRandom(t: TTriangle): TTriangle;
|
||||||
@ -1336,19 +1331,21 @@ FoundCorner:
|
|||||||
if Shift = [ssShift] then // snap to axis
|
if Shift = [ssShift] then // snap to axis
|
||||||
begin
|
begin
|
||||||
if abs(fx-Pivot.X) > abs(fy-Pivot.Y) then begin
|
if abs(fx-Pivot.X) > abs(fy-Pivot.Y) then begin
|
||||||
MainTriangles[SelectedTriangle].x[SelectedCorner] := fx;
|
vx := fx;
|
||||||
MainTriangles[SelectedTriangle].y[SelectedCorner] := Pivot.Y;
|
vy := Pivot.Y;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
MainTriangles[SelectedTriangle].x[SelectedCorner] := Pivot.x;
|
vx := Pivot.x;
|
||||||
MainTriangles[SelectedTriangle].y[SelectedCorner] := fy;
|
vy := fy;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else begin // just move
|
else begin // just move
|
||||||
MainTriangles[SelectedTriangle].x[SelectedCorner] := fx;
|
vx := fx;
|
||||||
MainTriangles[SelectedTriangle].y[SelectedCorner] := fy;
|
vy := fy;
|
||||||
end;
|
end;
|
||||||
StatusBar.Panels[2].Text := Format('Move: %3.3f ; %3.3f', [fx-(Pivot.X+oldx), fy-(Pivot.Y+oldy)]);
|
MainTriangles[SelectedTriangle].x[SelectedCorner] := vx;
|
||||||
|
MainTriangles[SelectedTriangle].y[SelectedCorner] := vy;
|
||||||
|
StatusBar.Panels[2].Text := Format('Move: %3.3f ; %3.3f', [vx-(Pivot.X+oldx), vy-(Pivot.Y+oldy)]);
|
||||||
end;
|
end;
|
||||||
// --
|
// --
|
||||||
HasChanged := True;
|
HasChanged := True;
|
||||||
@ -2131,12 +2128,10 @@ begin
|
|||||||
FillRect(Rect);
|
FillRect(Rect);
|
||||||
|
|
||||||
Font.Color := clWhite;
|
Font.Color := clWhite;
|
||||||
//TextOut(Rect.Left+h+2, Rect.Top, eqListBox.Items[Index]);
|
TextOut(Rect.Left+h+2, Rect.Top, IntToStr(Index+1));
|
||||||
TextOut(Rect.Left+h+2, Rect.Top, IntToStr(Index+1)); // hack
|
|
||||||
|
|
||||||
pen.Color := TrgColor;
|
pen.Color := TrgColor;
|
||||||
brush.Color := pen.Color shr 1 and $7f7f7f;
|
brush.Color := pen.Color shr 1 and $7f7f7f;
|
||||||
//pen.Style := psClear;
|
|
||||||
|
|
||||||
ax:=Rect.Left+h-2;
|
ax:=Rect.Left+h-2;
|
||||||
ay:=Rect.Top+1;
|
ay:=Rect.Top+1;
|
||||||
|
Loading…
Reference in New Issue
Block a user