-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
263 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
object EditorDefaultFrame: TEditorDefaultFrame | ||
Left = 0 | ||
Height = 388 | ||
Top = 0 | ||
Width = 552 | ||
ClientHeight = 388 | ||
ClientWidth = 552 | ||
DesignTimePPI = 120 | ||
ParentFont = False | ||
TabOrder = 0 | ||
DesignLeft = -631 | ||
DesignTop = 843 | ||
object RadioGroup1: TRadioGroup | ||
AnchorSideLeft.Control = Owner | ||
AnchorSideTop.Control = Owner | ||
AnchorSideRight.Control = Owner | ||
AnchorSideRight.Side = asrBottom | ||
Left = 0 | ||
Height = 88 | ||
Top = 0 | ||
Width = 552 | ||
Anchors = [akTop, akLeft, akRight] | ||
AutoFill = True | ||
AutoSize = True | ||
Caption = 'On New Tab' | ||
ChildSizing.LeftRightSpacing = 6 | ||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | ||
ChildSizing.EnlargeVertical = crsHomogenousChildResize | ||
ChildSizing.ShrinkHorizontal = crsScaleChilds | ||
ChildSizing.ShrinkVertical = crsScaleChilds | ||
ChildSizing.Layout = cclLeftToRightThenTopToBottom | ||
ChildSizing.ControlsPerLine = 1 | ||
ClientHeight = 58 | ||
ClientWidth = 548 | ||
Items.Strings = ( | ||
'Load File' | ||
'Set Script' | ||
) | ||
OnSelectionChanged = RadioGroup1SelectionChanged | ||
TabOrder = 0 | ||
end | ||
object Notebook1: TNotebook | ||
AnchorSideLeft.Control = Owner | ||
AnchorSideTop.Control = RadioGroup1 | ||
AnchorSideTop.Side = asrBottom | ||
AnchorSideRight.Control = Owner | ||
AnchorSideRight.Side = asrBottom | ||
AnchorSideBottom.Control = Owner | ||
AnchorSideBottom.Side = asrBottom | ||
Left = 0 | ||
Height = 290 | ||
Top = 98 | ||
Width = 552 | ||
PageIndex = 1 | ||
Anchors = [akTop, akLeft, akRight, akBottom] | ||
BorderSpacing.Top = 10 | ||
TabOrder = 1 | ||
object PageLoadFile: TPage | ||
object FileNameEdit1: TFileNameEdit | ||
AnchorSideLeft.Control = LabelFileName | ||
AnchorSideLeft.Side = asrBottom | ||
AnchorSideTop.Control = PageLoadFile | ||
AnchorSideRight.Control = PageLoadFile | ||
AnchorSideRight.Side = asrBottom | ||
Left = 103 | ||
Height = 33 | ||
Top = 0 | ||
Width = 444 | ||
FileName = 'FileNameEdit1' | ||
FilterIndex = 0 | ||
HideDirectories = False | ||
ButtonWidth = 29 | ||
NumGlyphs = 1 | ||
Anchors = [akTop, akLeft, akRight] | ||
BorderSpacing.Left = 5 | ||
BorderSpacing.Right = 5 | ||
MaxLength = 0 | ||
TabOrder = 0 | ||
Text = 'FileNameEdit1' | ||
end | ||
object LabelFileName: TLabel | ||
AnchorSideLeft.Control = PageLoadFile | ||
AnchorSideTop.Control = FileNameEdit1 | ||
AnchorSideBottom.Control = FileNameEdit1 | ||
AnchorSideBottom.Side = asrBottom | ||
Left = 5 | ||
Height = 33 | ||
Top = 0 | ||
Width = 93 | ||
Anchors = [akTop, akLeft, akBottom] | ||
BorderSpacing.Left = 5 | ||
Caption = 'File To Load' | ||
Layout = tlCenter | ||
end | ||
end | ||
object PageSetScript: TPage | ||
object Label1: TLabel | ||
Left = 5 | ||
Height = 25 | ||
Top = 0 | ||
Width = 547 | ||
Align = alTop | ||
BorderSpacing.Left = 5 | ||
Caption = 'Script' | ||
end | ||
object Memo1: TMemo | ||
Left = 5 | ||
Height = 255 | ||
Top = 30 | ||
Width = 542 | ||
Align = alClient | ||
BorderSpacing.Around = 5 | ||
Lines.Strings = ( | ||
'Memo1' | ||
) | ||
TabOrder = 0 | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
Author: Raymond van Venetië and Merlijn Wajer | ||
Project: Simba (https://github.com/MerlijnWajer/Simba) | ||
License: GNU General Public License (https://www.gnu.org/licenses/gpl-3.0) | ||
} | ||
unit simba.settingsform_editor_default; | ||
|
||
{$i simba.inc} | ||
|
||
interface | ||
|
||
uses | ||
Classes, SysUtils, Forms, Controls, StdCtrls, ExtCtrls, EditBtn; | ||
|
||
type | ||
TEditorDefaultFrame = class(TFrame) | ||
FileNameEdit1: TFileNameEdit; | ||
Label1: TLabel; | ||
LabelFileName: TLabel; | ||
Memo1: TMemo; | ||
Notebook1: TNotebook; | ||
PageLoadFile: TPage; | ||
PageSetScript: TPage; | ||
RadioGroup1: TRadioGroup; | ||
|
||
procedure RadioGroup1SelectionChanged(Sender: TObject); | ||
public | ||
procedure Load; | ||
procedure Save; | ||
end; | ||
|
||
implementation | ||
|
||
uses | ||
simba.settings; | ||
|
||
procedure TEditorDefaultFrame.RadioGroup1SelectionChanged(Sender: TObject); | ||
begin | ||
case RadioGroup1.ItemIndex of | ||
0: PageLoadFile.Show(); | ||
1: PageSetScript.Show(); | ||
end; | ||
end; | ||
|
||
procedure TEditorDefaultFrame.Load; | ||
begin | ||
Memo1.Lines.Text := SimbaSettings.Editor.DefaultScript.Value; | ||
FileNameEdit1.FileName := SimbaSettings.Editor.DefaultScriptFile.Value; | ||
RadioGroup1.ItemIndex := SimbaSettings.Editor.DefaultScriptType.Value; | ||
end; | ||
|
||
procedure TEditorDefaultFrame.Save; | ||
begin | ||
SimbaSettings.Editor.DefaultScript.Value := Memo1.Lines.Text; | ||
SimbaSettings.Editor.DefaultScriptFile.Value := FileNameEdit1.FileName; | ||
SimbaSettings.Editor.DefaultScriptType.Value := RadioGroup1.ItemIndex; | ||
end; | ||
|
||
{$R *.lfm} | ||
|
||
end. | ||
|
Oops, something went wrong.