Skip to content

Commit

Permalink
Now StructureView closes when exiting EditMode, Fixed build issue wit…
Browse files Browse the repository at this point in the history
…h previous version that didn't show Root StoryItem
  • Loading branch information
[email protected] authored and [email protected] committed Dec 25, 2021
1 parent 773134c commit e78d04b
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 39 deletions.
12 changes: 6 additions & 6 deletions App/READCOM.App.Globals.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -30375,7 +30375,7 @@ object Globals: TGlobals
item
MultiResBitmap = <
item
Size = 24
Size = 64
end>
IconName = 'play'
SVGText =
Expand Down Expand Up @@ -30746,7 +30746,7 @@ object Globals: TGlobals
item
MultiResBitmap = <
item
Size = 24
Size = 64
end>
IconName = 'Home'
SVGText =
Expand Down Expand Up @@ -30792,8 +30792,8 @@ object Globals: TGlobals
Layers = <
item
Name = 'play'
SourceRect.Right = 24.000000000000000000
SourceRect.Bottom = 24.000000000000000000
SourceRect.Right = 64.000000000000000000
SourceRect.Bottom = 64.000000000000000000
end>
end
item
Expand Down Expand Up @@ -30880,8 +30880,8 @@ object Globals: TGlobals
Layers = <
item
Name = 'Home'
SourceRect.Right = 24.000000000000000000
SourceRect.Bottom = 24.000000000000000000
SourceRect.Right = 64.000000000000000000
SourceRect.Bottom = 64.000000000000000000
end>
end
item
Expand Down
8 changes: 4 additions & 4 deletions App/Views/READCOM.Views.Menu.HUD.pas
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,7 @@ procedure TStoryHUD.SetStructureViewVisible(const Value: Boolean);
if Value then
MultiView.Width := FMultiViewOpenedWidth
else
begin
FMultiViewOpenedWidth := MultiView.Width;
MultiView.Width := 0;
end;

actionStructure.Checked := Value;
end;
Expand All @@ -134,7 +131,10 @@ procedure TStoryHUD.actionMenuExecute(Sender: TObject);

procedure TStoryHUD.actionEditExecute(Sender: TObject);
begin
layoutEdit.Visible := EditMode;
layoutEdit.Visible := EditMode; //show Edit-related buttons

if not EditMode then
StructureViewVisible := false; //hide StructureView when existing EditMode
end;

{$endregion}
Expand Down
11 changes: 9 additions & 2 deletions App/Views/READCOM.Views.StoryItem.pas
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,12 @@ procedure TStoryItem.SetActive(const Value: Boolean);
if (Value = IsActive) then exit; //Important

if (Value) then //make active
FActiveStoryItem := Self //note: don't call Active := false on any previously ActiveStoryItem, this is a singleton pattern and want to raise a single event
begin
if Assigned(FActiveStoryItem) then
FActiveStoryItem.Active := false; //deactivate the previously active StoryItem

FActiveStoryItem := Self
end
else //make inactive
FActiveStoryItem := nil;

Expand All @@ -456,9 +461,11 @@ procedure TStoryItem.SetActive(const Value: Boolean);

class procedure TStoryItem.SetActiveStoryItem(const Value: IStoryItem);
begin
if (Value = FActiveStoryItem) then exit;

if Assigned(Value) then //not checking if ActivationOrder <> -1, since an out-of-activation-order StoryItem may be activated directly via a target
Value.Active := true //this will also deactivate the ActiveStoryItem if any
else if Assigned(FActiveStoryItem) then //if SetActiveStoryItem(nil) was called then deactivate ActiveStoryItem if any
else {if Assigned(FActiveStoryItem) then} //if SetActiveStoryItem(nil) was called then deactivate ActiveStoryItem (no need to check if it is Assigned [not nil], since the "Value = FActiveStoryItem" check above would have exited)
FActiveStoryItem.Active := false;
end;

Expand Down
14 changes: 7 additions & 7 deletions Zoomicon.Downloader/Zoomicon.Downloader.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@
</Source>
</Delphi.Personality>
<Deployment Version="3">
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="OSX32">
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="iOSSimulator">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
Expand All @@ -194,17 +194,17 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="iOSSimulator">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="..\..\..\..\..\..\Public\Documents\Embarcadero\Studio\21.0\Bpl\Zoomicon.Downloader.bpl" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>Zoomicon_Downloader.bpl</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="OSX32">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="OSX32">
<Operation>1</Operation>
Expand Down
2 changes: 1 addition & 1 deletion Zoomicon.Generics/Zoomicon.Generics.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -911,9 +911,9 @@
</DeployClass>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
Expand Down
8 changes: 4 additions & 4 deletions Zoomicon.GitStore/Zoomicon.GitStore.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@
</Source>
</Delphi.Personality>
<Deployment Version="3">
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="OSX32">
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="iOSSimulator">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
Expand All @@ -200,8 +200,8 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="iOSSimulator">
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="OSX32">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
Expand Down
2 changes: 1 addition & 1 deletion Zoomicon.Introspection/Zoomicon.Introspection.FMX.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -908,9 +908,9 @@
</DeployClass>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
Expand Down
4 changes: 2 additions & 2 deletions Zoomicon.Media/Zoomicon.Media.FMX.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -903,10 +903,10 @@
</DeployClass>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
Expand Down
2 changes: 1 addition & 1 deletion Zoomicon.Puzzler/Zoomicon.Puzzler.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -906,8 +906,8 @@
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
Expand Down
2 changes: 1 addition & 1 deletion Zoomicon.Zooming/Zoomicon.Zooming.FMX.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -917,8 +917,8 @@
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
Expand Down
18 changes: 9 additions & 9 deletions Zooming.Helpers/Zoomicon.Helpers.FMX.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,8 @@
<Platform value="Win64">True</Platform>
</Platforms>
<Deployment Version="3">
<DeployFile LocalName="..\..\..\..\..\..\Public\Documents\Embarcadero\Studio\22.0\Bpl\Zoomicon.Helpers.FMX.bpl" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>Zoomicon_Helpers_FMX.bpl</RemoteName>
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="OSX32">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
Expand All @@ -212,13 +211,14 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="OSX32">
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="iOSSimulator">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="iOSSimulator">
<DeployFile LocalName="..\..\..\..\..\..\Public\Documents\Embarcadero\Studio\22.0\Bpl\Zoomicon.Helpers.FMX.bpl" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>Zoomicon_Helpers_FMX.bpl</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
Expand Down Expand Up @@ -929,9 +929,9 @@
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
Expand Down
2 changes: 1 addition & 1 deletion Zooming.Helpers/Zoomicon.Helpers.RTL.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -901,9 +901,9 @@
</DeployClass>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
Expand Down

0 comments on commit e78d04b

Please sign in to comment.