Skip to content

Commit 51bc7df

Browse files
Added Help and About buttons, allowing to set StoryPoints and Home, Implemented Previous/Next navigation
1 parent 7335ef3 commit 51bc7df

15 files changed

+860
-294
lines changed

Diff for: App/READCOM.App.Globals.dfm

+155-52
Large diffs are not rendered by default.

Diff for: App/READCOM.App.Globals.pas

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ interface
66
System.SysUtils, System.Classes, FMX.Types, FMX.Controls,
77
System.ImageList, FMX.ImgList, FMX.SVGIconImageList;
88

9+
const
10+
URL_HELP = 'https://github.com/Zoomicon/READCOM_App/wiki';
11+
912
type
1013
TGlobals = class(TDataModule)
1114
DefaultStyleBook: TStyleBook;

Diff for: App/READCOM.App.Models.pas

+31-5
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,18 @@ interface
7979
function GetRootStoryItem: IStoryItem;
8080
procedure SetRootStoryItem(const Value: IStoryItem);
8181

82+
{ HomeStoryItem }
83+
function GetHomeStoryItem: IStoryItem;
84+
procedure SetHomeStoryItem(const Value: IStoryItem);
85+
8286
{ ActiveStoryItem }
8387
function GetActiveStoryItem: IStoryItem;
8488
procedure SetActiveStoryItem(const Value: IStoryItem);
8589

8690
{ Navigation }
91+
procedure ActivateHome;
92+
procedure ActivateRoot;
93+
procedure ActivateParent;
8794
procedure ActivatePrevious;
8895
procedure ActivateNext;
8996

@@ -93,6 +100,7 @@ interface
93100

94101
property StoryMode: TStoryMode read GetStoryMode write SetStoryMode; //default AnimatedStoryMode
95102
property RootStoryItem: IStoryItem read GetRootStoryItem write SetRootStoryItem;
103+
property HomeStoryItem: IStoryItem read GetHomeStoryItem write SetHomeStoryItem;
96104
property ActiveStoryItem: IStoryItem read GetActiveStoryItem write SetActiveStoryItem;
97105
end;
98106

@@ -119,10 +127,6 @@ interface
119127
{ AudioStoryItems }
120128
function GetAudioStoryItems: TIAudioStoryItemList;
121129

122-
{ ActivationOrder }
123-
function GetActivationOrder: Integer;
124-
procedure SetActivationOrder(const Value: Integer); //-1 for not taking part in activation chain
125-
126130
{ Active }
127131
function IsActive: Boolean;
128132
procedure SetActive(const Value: Boolean);
@@ -131,6 +135,24 @@ interface
131135
function IsEditMode: Boolean;
132136
procedure SetEditMode(const Value: Boolean);
133137

138+
{ Home }
139+
function IsHome: Boolean; //note: a Home StoryItem doesn't have to be StoryPoint, could be just the startup instructions that are shown once and not when looping through the StoryPoints
140+
procedure SetHome(const Value: Boolean);
141+
142+
{ StoryPoint }
143+
function IsStoryPoint: boolean;
144+
procedure SetStoryPoint(const Value: boolean);
145+
146+
{ Previous/Next StoryPoint }
147+
function GetPreviousStoryPoint: IStoryItem;
148+
function GetNextStoryPoint: IStoryItem;
149+
//
150+
function GetAncestorStoryPoint: IStoryItem;
151+
function GetFirstChildStoryPoint: IStoryItem;
152+
function GetLastChildStoryPoint: IStoryItem;
153+
function GetPreviousSiblingStoryPoint: IStoryItem;
154+
function GetNextSiblingStoryPoint: IStoryItem;
155+
134156
{ Hidden }
135157
function IsHidden: Boolean;
136158
procedure SetHidden(const Value: Boolean);
@@ -155,10 +177,14 @@ interface
155177
property ParentStoryItem: IStoryItem read GetParentStoryItem write SetParentStoryItem; //default nil //stored false
156178
property StoryItems: TIStoryItemList read GetStoryItems write SetStoryItems; //default nil
157179
property AudioStoryItems: TIAudioStoryItemList read GetAudioStoryItems; //stored false
158-
property ActivationOrder: Integer read GetActivationOrder write SetActivationOrder; //default -1 (not taking part in activation chain)
159180
property Active: Boolean read IsActive write SetActive; //default false
160181
property EditMode: Boolean read IsEditMode write SetEditMode; //default false
182+
property Home: Boolean read IsHome write SetHome; //default false
183+
property StoryPoint: Boolean read IsStoryPoint write SetStoryPoint; //default false
184+
property PreviousStoryPoint: IStoryItem read GetPreviousStoryPoint; //stored false
185+
property NextStoryPoint: IStoryItem read GetNextStoryPoint; //stored false
161186
property Hidden: Boolean read IsHidden write SetHidden; //default false
187+
property Anchored: Boolean read IsAnchored write SetAnchored; //default true
162188
property TargetsVisible: Boolean read GetTargetsVisible write SetTargetsVisible; //default false
163189
property Options: IStoryItemOptions read GetOptions; //stored false
164190
end;

Diff for: App/READCOM.App.dpr

+21-20
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,17 @@ uses
55
System.StartUpCopy,
66
FMX.Forms,
77
CodeSiteLogging,
8-
READCOM.App.Models in 'READCOM.App.Models.pas',
9-
READCOM.Views.Options.StoryItemOptions in 'Views\Options\READCOM.Views.Options.StoryItemOptions.pas' {StoryItemOptions: TFrame},
10-
READCOM.Views.Options.BitmapImageStoryItemOptions in 'Views\Options\READCOM.Views.Options.BitmapImageStoryItemOptions.pas' {BitmapImageStoryItemOptions: TFrame},
11-
READCOM.Views.StoryItem in 'Views\READCOM.Views.StoryItem.pas' {StoryItem: TFrame},
12-
READCOM.Views.ImageStoryItem in 'Views\READCOM.Views.ImageStoryItem.pas' {ImageStoryItem: TFrame},
13-
READCOM.Views.BitmapImageStoryItem in 'Views\READCOM.Views.BitmapImageStoryItem.pas' {BitmapImageStoryItem: TFrame},
14-
READCOM.Views.VectorImageStoryItem in 'Views\READCOM.Views.VectorImageStoryItem.pas' {BitmapImageStoryItem: TFrame},
15-
READCOM.Views.AudioStoryItem in 'Views\READCOM.Views.AudioStoryItem.pas' {AudioStoryItem: TFrame},
16-
READCOM.Views.PanelStoryItem in 'Views\READCOM.Views.PanelStoryItem.pas' {PanelStoryItem: TFrame},
17-
READCOM.Views.Menu.HUD in 'Views\READCOM.Views.Menu.HUD.pas' {StoryHUD: TFrame},
18-
READCOM.Views.Main in 'Views\READCOM.Views.Main.pas' {MainForm},
8+
u_UrlOpen in 'u_UrlOpen.pas',
9+
FormMessage in '..\3rdPartyLib\object-debugger-for-firemonkey\FormMessage.pas' {MessageForm},
10+
ObjectDebuggerFMXFrame in '..\3rdPartyLib\object-debugger-for-firemonkey\ObjectDebuggerFMXFrame.pas' {FMXObjectDebuggerFrame: TFrame},
11+
ObjectDebuggerFMXForm in '..\3rdPartyLib\object-debugger-for-firemonkey\DemoDesktop\ObjectDebuggerFMXForm.pas' {ObjectDebuggerFMXForm},
1912
Zoomicon.Media.FMX in '..\Zoomicon.Media\Zoomicon.Media.FMX.pas',
2013
Zoomicon.Media.Models in '..\Zoomicon.Media\Zoomicon.Media.Models.pas',
2114
Zoomicon.Generics.Functors in '..\Zoomicon.Generics\Functors\Zoomicon.Generics.Functors.pas',
2215
Zoomicon.Generics.Collections in '..\Zoomicon.Generics\Collections\Zoomicon.Generics.Collections.pas',
23-
READCOM.App.Globals in 'READCOM.App.Globals.pas' {Globals: TDataModule},
2416
Zoomicon.Puzzler.Classes in '..\Zoomicon.Puzzler\Zoomicon.Puzzler.Classes.pas',
2517
Zoomicon.Puzzler.Models in '..\Zoomicon.Puzzler\Zoomicon.Puzzler.Models.pas',
26-
READCOM.Views.About in 'Views\READCOM.Views.About.pas' {AboutFrame: TFrame},
27-
u_UrlOpen in 'u_UrlOpen.pas',
28-
READCOM.Views.TextStoryItem in 'Views\READCOM.Views.TextStoryItem.pas' {TextStoryItem: TFrame},
2918
Zoomicon.Text in '..\Zoomicon.Text\Zoomicon.Text.pas',
30-
FormMessage in '..\3rdPartyLib\object-debugger-for-firemonkey\FormMessage.pas' {MessageForm},
31-
ObjectDebuggerFMXFrame in '..\3rdPartyLib\object-debugger-for-firemonkey\ObjectDebuggerFMXFrame.pas' {FMXObjectDebuggerFrame: TFrame},
32-
ObjectDebuggerFMXForm in '..\3rdPartyLib\object-debugger-for-firemonkey\DemoDesktop\ObjectDebuggerFMXForm.pas' {ObjectDebuggerFMXForm},
3319
Zoomicon.Introspection.FMX.StructureView in '..\Zoomicon.Introspection\Zoomicon.Introspection.FMX.StructureView.pas' {StructureView: TFrame},
3420
Zoomicon.Manipulation.FMX.CustomManipulator in '..\Zoomicon.Manipulation\Zoomicon.Manipulation.FMX.CustomManipulator.pas' {CustomManipulator: TFrame},
3521
Zoomicon.Manipulation.FMX.Manipulator in '..\Zoomicon.Manipulation\Zoomicon.Manipulation.FMX.Manipulator.pas' {Manipulator: TFrame},
@@ -42,10 +28,25 @@ uses
4228
Zoomicon.Helpers.FMX.Layouts.ScaledLayoutHelpers in '..\Zooming.Helpers\Zoomicon.Helpers.FMX.Layouts\Zoomicon.Helpers.FMX.Layouts.ScaledLayoutHelpers.pas',
4329
Zoomicon.Helpers.FMX.Layouts.ScrollBoxHelpers in '..\Zooming.Helpers\Zoomicon.Helpers.FMX.Layouts\Zoomicon.Helpers.FMX.Layouts.ScrollBoxHelpers.pas',
4430
Zoomicon.Helpers.RTL.ClassListHelpers in '..\Zooming.Helpers\Zoomicon.Helpers.RTL\Zoomicon.Helpers.RTL.ClassListHelpers.pas',
45-
READCOM.Views.StoryItemFactory in 'Views\READCOM.Views.StoryItemFactory.pas',
4631
Zoomicon.Generics.Factories in '..\Zoomicon.Generics\Factories\Zoomicon.Generics.Factories.pas',
4732
Zoomicon.Generics.Registries in '..\Zoomicon.Generics\Collections\Zoomicon.Generics.Registries.pas',
48-
Zoomicon.Helpers.FMX.ImgList.ImageListHelpers in '..\Zooming.Helpers\Zoomicon.Helpers.FMX.ImgList\Zoomicon.Helpers.FMX.ImgList.ImageListHelpers.pas';
33+
Zoomicon.Helpers.FMX.ImgList.ImageListHelpers in '..\Zooming.Helpers\Zoomicon.Helpers.FMX.ImgList\Zoomicon.Helpers.FMX.ImgList.ImageListHelpers.pas',
34+
Zoomicon.Helpers.FMX.TreeView.TreeViewHelpers in '..\Zooming.Helpers\Zoomicon.Helpers.FMX.TreeView\Zoomicon.Helpers.FMX.TreeView.TreeViewHelpers.pas',
35+
READCOM.App.Globals in 'READCOM.App.Globals.pas' {Globals: TDataModule},
36+
READCOM.App.Models in 'READCOM.App.Models.pas',
37+
READCOM.Views.Options.StoryItemOptions in 'Views\Options\READCOM.Views.Options.StoryItemOptions.pas' {StoryItemOptions: TFrame},
38+
READCOM.Views.Options.BitmapImageStoryItemOptions in 'Views\Options\READCOM.Views.Options.BitmapImageStoryItemOptions.pas' {BitmapImageStoryItemOptions: TFrame},
39+
READCOM.Views.StoryItem in 'Views\READCOM.Views.StoryItem.pas' {StoryItem: TFrame},
40+
READCOM.Views.ImageStoryItem in 'Views\READCOM.Views.ImageStoryItem.pas' {ImageStoryItem: TFrame},
41+
READCOM.Views.BitmapImageStoryItem in 'Views\READCOM.Views.BitmapImageStoryItem.pas' {BitmapImageStoryItem: TFrame},
42+
READCOM.Views.VectorImageStoryItem in 'Views\READCOM.Views.VectorImageStoryItem.pas' {BitmapImageStoryItem: TFrame},
43+
READCOM.Views.AudioStoryItem in 'Views\READCOM.Views.AudioStoryItem.pas' {AudioStoryItem: TFrame},
44+
READCOM.Views.TextStoryItem in 'Views\READCOM.Views.TextStoryItem.pas' {TextStoryItem: TFrame},
45+
READCOM.Views.PanelStoryItem in 'Views\READCOM.Views.PanelStoryItem.pas' {PanelStoryItem: TFrame},
46+
READCOM.Views.StoryItemFactory in 'Views\READCOM.Views.StoryItemFactory.pas',
47+
READCOM.Views.Menu.HUD in 'Views\READCOM.Views.Menu.HUD.pas' {StoryHUD: TFrame},
48+
READCOM.Views.Main in 'Views\READCOM.Views.Main.pas' {MainForm},
49+
READCOM.Views.About in 'Views\READCOM.Views.About.pas' {AboutFrame: TFrame};
4950

5051
{$R *.res}
5152

0 commit comments

Comments
 (0)