Skip to content

Commit

Permalink
Added help window at startup (can be disabled)
Browse files Browse the repository at this point in the history
Added some more options
  • Loading branch information
NeeeeB committed Oct 8, 2017
1 parent 0ee65ae commit 84474eb
Show file tree
Hide file tree
Showing 6 changed files with 308 additions and 32 deletions.
34 changes: 17 additions & 17 deletions GameListEditor.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,27 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="ProjectiOSDeviceResourceRules">
<DeployClass Name="DependencyModule">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXResource">
Expand Down Expand Up @@ -549,27 +564,12 @@
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyModule">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<DeployClass Name="ProjectiOSDeviceResourceRules">
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
Expand Down
26 changes: 23 additions & 3 deletions Help.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,39 @@ object Frm_Help: TFrm_Help
PixelsPerInch = 96
TextHeight = 13
object Btn_Close: TButton
Left = 368
Left = 384
Top = 483
Width = 75
Height = 25
Caption = 'Close'
TabOrder = 0
OnClick = Btn_CloseClick
end
object Mmo_Help: TMemo
object Chk_ShowTips: TCheckBox
Left = 8
Top = 483
Width = 105
Height = 17
Caption = 'Don'#39't show again'
TabOrder = 1
end
object Red_Help: TRichEdit
Left = 8
Top = 8
Width = 853
Height = 469
TabOrder = 1
Alignment = taCenter
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Lines.Strings = (
'')
ParentFont = False
ReadOnly = True
ScrollBars = ssVertical
TabOrder = 2
Zoom = 100
end
end
214 changes: 208 additions & 6 deletions Help.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,229 @@
interface

uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
Winapi.Windows, Winapi.Messages,
System.SysUtils, System.Variants, System.Classes, System.IniFiles,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,
Vcl.ComCtrls;

resourcestring
Rst_Title1 = 'Choose your folder :';

Rst_Help1 = 'Select the folder where your systems folders are stored.' + SlineBreak +
'It can be on your PC or on your Raspberry Pi.' + SlineBreak + SlineBreak +
'If you choose a folder on the Pi, you will be prompted with a message explaining' +
'that EmulationStation will be stopped in order to save your changes to the gamelist.xml.' + sLineBreak +
'When you close the application, Recalbox will be rebooted to reflect your changes.' + SlineBreak + SlineBreak +
'You have to check the box of a field to enable its modification.' + SlineBreak +
'It is done on purpose, to avoid accidentally change fields content.';

Rst_Title2 = 'Enable God Mode:';

Rst_Help2 = 'Enabling this option will let you delete games directly from the application.' + sLineBreak +
'A delete button will be added to the GUI.' + sLineBreak +
'You will be prompted to confirm when you click on the delete button.' + sLineBreak +
'Deleting a game will remove its entry from the gamelist, delete the matching picture,' +
'and delete the file from your folder.';

Rst_Title3 = 'Delete without prompt:';

Rst_Help3 = 'Enabling this option will disable the prompt to confirm when you delete a game.' + sLineBreak +
'Use with caution.';

Rst_Title4 = 'Disable Pi prompts:';

Rst_Help4 = 'Checking this option will disable all the prompts related' +
'to the EmulationStation stop and the Recalbox reboot.';

Rst_Title5 = 'Auto Hash:';

Rst_Help5 = 'Enabling this option will Auto hash the files when you click on More Infos.' + sLineBreak +
'Do this if you have a powerful computer or if your systems only contain small roms.' + sLineBreak +
'Hashing files can be very slow so use it with caution.' + sLineBreak +
'If you do not enable this option, you will be prompted to hash' +
'or not the file when you click on More Infos.';

Rst_Title6 = 'Show tips at start:';

Rst_Help6 = 'Enabling this option will the show the help windows on application start.' + sLineBreak +
'You can disable the help window for the next launches, by disabling this' +
'option or by checking the box "Don''t show again" in the help window, before closing it.';

Rst_Title7 = 'Use Genesis logo:';

Rst_Help7 = 'This will let you use the Genesis logo and name instead of Megadrive.';

Rst_Title8 = 'System - Convert to lowercase:';

Rst_Help8 = 'Will convert all the text to lowercase for the whole selected system (every game will be converted).';

Rst_Title9 = 'System - Convert to uppercase:';

Rst_Help9 = 'Will convert all the text to uppercase for the whole selected system (every game will be converted).';

Rst_Title10 = 'System - Remove region from games names:';

Rst_Help10 = 'Will remove the region tag in the name (i.e [xxxx]) for every game of the selected system.';

Rst_Title11 = 'Game - Convert to lowercase:';

Rst_Help11 = 'Will convert all the text to lowercase for the selected game.';

Rst_Title12 = 'Game - Convert to uppercase:';

Rst_Help12 = 'Will convert all the text to uppercase for the selected game.';

type
TFrm_Help = class(TForm)
Btn_Close: TButton;
Mmo_Help: TMemo;
Chk_ShowTips: TCheckBox;
Red_Help: TRichEdit;
procedure Btn_CloseClick(Sender: TObject);
private
{ Déclarations privées }
procedure FormatText;
public
procedure Execute;
function Execute( aChecked: Boolean ): Boolean;
end;

implementation

{$R *.dfm}

procedure TFrm_Help.Execute;
function TFrm_Help.Execute( aChecked: Boolean ): Boolean;
begin
FormatText;
Chk_ShowTips.Checked:= aChecked;
ShowModal;
Result:= not ( Chk_ShowTips.Checked );
end;

//remplit le richedit avec le texte de l'aide en mettant couleur etc..
procedure TFrm_Help.FormatText;
begin
with Red_Help do begin
SelStart:= GetTextLen;
SelText:= sLineBreak;

SelAttributes.Style:= [fsUnderline,fsBold];
SelAttributes.Size:= 13;
SelText:= Rst_Title1;
SelText:= sLineBreak;
SelAttributes.Style:= [];
SelAttributes.Size:= 8;
SelText:= Rst_Help1;
SelText:= sLineBreak;
SelText:= sLineBreak;

SelAttributes.Style:= [fsUnderline,fsBold];
SelAttributes.Size:= 13;
SelText:= Rst_Title2;
SelText:= sLineBreak;
SelAttributes.Style:= [];
SelAttributes.Size:= 8;
SelText:= Rst_Help2;
SelText:= sLineBreak;
SelText:= sLineBreak;

SelAttributes.Style:= [fsUnderline,fsBold];
SelAttributes.Size:= 13;
SelText:= Rst_Title3;
SelText:= sLineBreak;
SelAttributes.Style:= [];
SelAttributes.Size:= 8;
SelText:= Rst_Help3;
SelText:= sLineBreak;
SelText:= sLineBreak;

SelAttributes.Style:= [fsUnderline,fsBold];
SelAttributes.Size:= 13;
SelText:= Rst_Title4;
SelText:= sLineBreak;
SelAttributes.Style:= [];
SelAttributes.Size:= 8;
SelText:= Rst_Help4;
SelText:= sLineBreak;
SelText:= sLineBreak;

SelAttributes.Style:= [fsUnderline,fsBold];
SelAttributes.Size:= 13;
SelText:= Rst_Title5;
SelText:= sLineBreak;
SelAttributes.Style:= [];
SelAttributes.Size:= 8;
SelText:= Rst_Help5;
SelText:= sLineBreak;
SelText:= sLineBreak;

SelAttributes.Style:= [fsUnderline,fsBold];
SelAttributes.Size:= 13;
SelText:= Rst_Title6;
SelText:= sLineBreak;
SelAttributes.Style:= [];
SelAttributes.Size:= 8;
SelText:= Rst_Help6;
SelText:= sLineBreak;
SelText:= sLineBreak;

SelAttributes.Style:= [fsUnderline,fsBold];
SelAttributes.Size:= 13;
SelText:= Rst_Title7;
SelText:= sLineBreak;
SelAttributes.Style:= [];
SelAttributes.Size:= 8;
SelText:= Rst_Help7;
SelText:= sLineBreak;
SelText:= sLineBreak;

SelAttributes.Style:= [fsUnderline,fsBold];
SelAttributes.Size:= 13;
SelText:= Rst_Title8;
SelText:= sLineBreak;
SelAttributes.Style:= [];
SelAttributes.Size:= 8;
SelText:= Rst_Help8;
SelText:= sLineBreak;
SelText:= sLineBreak;

SelAttributes.Style:= [fsUnderline,fsBold];
SelAttributes.Size:= 13;
SelText:= Rst_Title9;
SelText:= sLineBreak;
SelAttributes.Style:= [];
SelAttributes.Size:= 8;
SelText:= Rst_Help9;
SelText:= sLineBreak;
SelText:= sLineBreak;

SelAttributes.Style:= [fsUnderline,fsBold];
SelAttributes.Size:= 13;
SelText:= Rst_Title10;
SelText:= sLineBreak;
SelAttributes.Style:= [];
SelAttributes.Size:= 8;
SelText:= Rst_Help10;
SelText:= sLineBreak;
SelText:= sLineBreak;

SelAttributes.Style:= [fsUnderline,fsBold];
SelAttributes.Size:= 13;
SelText:= Rst_Title11;
SelText:= sLineBreak;
SelAttributes.Style:= [];
SelAttributes.Size:= 8;
SelText:= Rst_Help11;
SelText:= sLineBreak;
SelText:= sLineBreak;

SelAttributes.Style:= [fsUnderline,fsBold];
SelAttributes.Size:= 13;
SelText:= Rst_Title12;
SelText:= sLineBreak;
SelAttributes.Style:= [];
SelAttributes.Size:= 8;
SelText:= Rst_Help12;
SelText:= sLineBreak;
SelText:= sLineBreak;
end;
end;

//action au click sur le bouton close
Expand Down
12 changes: 11 additions & 1 deletion Main.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -6868,11 +6868,21 @@ object Frm_Editor: TFrm_Editor
Enabled = False
OnClick = Mnu_DeleteWoPromptClick
end
object Mnu_PiPrompts: TMenuItem
AutoCheck = True
Caption = 'Disable Pi prompts'
OnClick = Mnu_PiPromptsClick
end
object Mnu_AutoHash: TMenuItem
AutoCheck = True
Caption = 'Auto Hash'
OnClick = Mnu_AutoHashClick
end
object Mnu_ShowTips: TMenuItem
AutoCheck = True
Caption = 'Show tips at start'
OnClick = Mnu_ShowTipsClick
end
object N2: TMenuItem
Caption = '-'
end
Expand Down Expand Up @@ -7042,7 +7052,7 @@ object Frm_Editor: TFrm_Editor
Left = 176
Top = 208
Bitmap = {
494C0101010008003C0010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
494C010101000800440010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000001000000001002000000000000010
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
Expand Down
Loading

0 comments on commit 84474eb

Please sign in to comment.