|
@@ -20,6 +20,7 @@ type
|
|
function ToolDeformationGridNeeded: boolean;
|
|
function ToolDeformationGridNeeded: boolean;
|
|
procedure ValidateDeformationGrid;
|
|
procedure ValidateDeformationGrid;
|
|
protected
|
|
protected
|
|
|
|
+ class var ReturnHintShown: boolean;
|
|
deformationGridNbX,deformationGridNbY,deformationGridX,deformationGridY: integer;
|
|
deformationGridNbX,deformationGridNbY,deformationGridX,deformationGridY: integer;
|
|
deformationGridMoving: boolean;
|
|
deformationGridMoving: boolean;
|
|
deformationOrigin: TPointF;
|
|
deformationOrigin: TPointF;
|
|
@@ -35,6 +36,7 @@ type
|
|
function GetIsSelectingTool: boolean; override;
|
|
function GetIsSelectingTool: boolean; override;
|
|
function DoToolUpdate({%H-}toolDest: TBGRABitmap): TRect; override;
|
|
function DoToolUpdate({%H-}toolDest: TBGRABitmap): TRect; override;
|
|
public
|
|
public
|
|
|
|
+ class procedure ForgetHintShown;
|
|
constructor Create(AManager: TToolManager); override;
|
|
constructor Create(AManager: TToolManager); override;
|
|
function ToolUp: TRect; override;
|
|
function ToolUp: TRect; override;
|
|
function GetContextualToolbars: TContextualToolbars; override;
|
|
function GetContextualToolbars: TContextualToolbars; override;
|
|
@@ -48,7 +50,7 @@ type
|
|
|
|
|
|
TToolTextureMapping = class(TGenericTool)
|
|
TToolTextureMapping = class(TGenericTool)
|
|
private
|
|
private
|
|
- class var FHintShowed: boolean;
|
|
|
|
|
|
+ class var ScaleHintShown, ReturnHintShown: boolean;
|
|
FCurrentBounds: TRect;
|
|
FCurrentBounds: TRect;
|
|
FLastTexture: TBGRABitmap;
|
|
FLastTexture: TBGRABitmap;
|
|
FTextureAfterAlpha: TBGRABitmap;
|
|
FTextureAfterAlpha: TBGRABitmap;
|
|
@@ -89,6 +91,7 @@ type
|
|
function GetStatusText: string; override;
|
|
function GetStatusText: string; override;
|
|
function GetAllowedBackFillTypes: TVectorialFillTypes; override;
|
|
function GetAllowedBackFillTypes: TVectorialFillTypes; override;
|
|
public
|
|
public
|
|
|
|
+ class procedure ForgetHintShown;
|
|
constructor Create(AManager: TToolManager); override;
|
|
constructor Create(AManager: TToolManager); override;
|
|
function ToolUp: TRect; override;
|
|
function ToolUp: TRect; override;
|
|
function GetContextualToolbars: TContextualToolbars; override;
|
|
function GetContextualToolbars: TContextualToolbars; override;
|
|
@@ -526,12 +529,11 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
result := EmptyRect;
|
|
result := EmptyRect;
|
|
- if not FHintShowed then
|
|
|
|
|
|
+ if not ScaleHintShown then
|
|
begin
|
|
begin
|
|
Manager.ToolPopup(tpmHoldKeysScaleMode, VK_SHIFT);
|
|
Manager.ToolPopup(tpmHoldKeysScaleMode, VK_SHIFT);
|
|
- FHintShowed:= true;
|
|
|
|
|
|
+ ScaleHintShown:= true;
|
|
end;
|
|
end;
|
|
- Manager.HintReturnValidates;
|
|
|
|
if quadMoving then
|
|
if quadMoving then
|
|
begin
|
|
begin
|
|
if quadMovingIndex = -1 then
|
|
if quadMovingIndex = -1 then
|
|
@@ -724,6 +726,12 @@ begin
|
|
Result:= [vftTexture];
|
|
Result:= [vftTexture];
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+class procedure TToolTextureMapping.ForgetHintShown;
|
|
|
|
+begin
|
|
|
|
+ ScaleHintShown:= false;
|
|
|
|
+ ReturnHintShown:= false;
|
|
|
|
+end;
|
|
|
|
+
|
|
constructor TToolTextureMapping.Create(AManager: TToolManager);
|
|
constructor TToolTextureMapping.Create(AManager: TToolManager);
|
|
begin
|
|
begin
|
|
inherited Create(AManager);
|
|
inherited Create(AManager);
|
|
@@ -783,6 +791,11 @@ begin
|
|
DrawQuad;
|
|
DrawQuad;
|
|
FCanReadaptTexture:= false;
|
|
FCanReadaptTexture:= false;
|
|
result := FCurrentBounds;
|
|
result := FCurrentBounds;
|
|
|
|
+ if not ReturnHintShown then
|
|
|
|
+ begin
|
|
|
|
+ Manager.ToolPopup(tpmreturnValides);
|
|
|
|
+ ReturnHintShown:= true;
|
|
|
|
+ end;
|
|
exit;
|
|
exit;
|
|
end;
|
|
end;
|
|
if quadMoving then
|
|
if quadMoving then
|
|
@@ -1034,7 +1047,6 @@ var xb,yb,NbX,NbY: integer;
|
|
|
|
|
|
begin
|
|
begin
|
|
result := EmptyRect;
|
|
result := EmptyRect;
|
|
- Manager.HintReturnValidates;
|
|
|
|
|
|
|
|
if not deformationGridMoving then
|
|
if not deformationGridMoving then
|
|
begin
|
|
begin
|
|
@@ -1192,6 +1204,11 @@ begin
|
|
result := EmptyRect;
|
|
result := EmptyRect;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+class procedure TToolDeformationGrid.ForgetHintShown;
|
|
|
|
+begin
|
|
|
|
+ ReturnHintShown := false;
|
|
|
|
+end;
|
|
|
|
+
|
|
constructor TToolDeformationGrid.Create(AManager: TToolManager);
|
|
constructor TToolDeformationGrid.Create(AManager: TToolManager);
|
|
begin
|
|
begin
|
|
inherited Create(AManager);
|
|
inherited Create(AManager);
|
|
@@ -1278,7 +1295,14 @@ end;
|
|
function TToolDeformationGrid.ToolUp: TRect;
|
|
function TToolDeformationGrid.ToolUp: TRect;
|
|
begin
|
|
begin
|
|
if deformationGridMoving then
|
|
if deformationGridMoving then
|
|
- result := OnlyRenderChange
|
|
|
|
|
|
+ begin
|
|
|
|
+ result := OnlyRenderChange;
|
|
|
|
+ if not ReturnHintShown then
|
|
|
|
+ begin
|
|
|
|
+ Manager.ToolPopup(tpmreturnValides);
|
|
|
|
+ ReturnHintShown := true;
|
|
|
|
+ end;
|
|
|
|
+ end
|
|
else
|
|
else
|
|
Result:=EmptyRect;
|
|
Result:=EmptyRect;
|
|
deformationGridMoving := false;
|
|
deformationGridMoving := false;
|