Fixed another small shortcut bug
Updated "Select color" dialog Removed "Do not restore caret" property, not useful
This commit is contained in:
parent
e2a521583a
commit
d95f2cba37
|
@ -115,7 +115,7 @@ AutoIncBuild=1
|
|||
MajorVer=1
|
||||
MinorVer=1
|
||||
Release=0
|
||||
Build=12
|
||||
Build=13
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
|
@ -126,7 +126,7 @@ CodePage=1252
|
|||
[Version Info Keys]
|
||||
CompanyName=AMX Mod X Dev Team
|
||||
FileDescription=
|
||||
FileVersion=1.1.0.12
|
||||
FileVersion=1.1.0.13
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -482,11 +482,16 @@ begin
|
|||
frmSelectColor.HSL.SelectedColor := Color;
|
||||
frmSelectColor.chkDefault1.Checked := Color = clDefault;
|
||||
frmSelectColor.chkDefault2.Checked := Color = clDefault;
|
||||
frmSelectColor.chkNone1.Checked := Color = clNone;
|
||||
frmSelectColor.chkNone2.Checked := Color = clNone;
|
||||
|
||||
frmSelectColor.OldSwatch.Color := Color;
|
||||
Result := frmSelectColor.ShowModal = mrOk;
|
||||
if Result then begin
|
||||
if frmSelectColor.chkDefault1.Checked then
|
||||
Color := clDefault
|
||||
else if frmSelectColor.chkNone1.Checked then
|
||||
Color := clNone
|
||||
else
|
||||
Color := frmSelectColor.NewSwatch.Color;
|
||||
|
||||
|
@ -580,8 +585,6 @@ var i: integer;
|
|||
begin
|
||||
//> INI-Values <//
|
||||
{ Tools }
|
||||
frmSettings.chkRestoreCaret.Checked := eConfig.ReadBool('Editor', 'LimitCaretRestore', True);
|
||||
frmSettings.txtLines.Text := eConfig.ReadString('Editor', 'LimitCaretRestoreVal', '600');
|
||||
frmSettings.txtDefaultName.Text := eConfig.ReadString('Misc', 'DefaultPluginName', 'New Plugin');
|
||||
frmSettings.txtDefaultVersion.Text := eConfig.ReadString('Misc', 'DefaultPluginVersion', '1.0');
|
||||
frmSettings.txtDefaultAuthor.Text := eConfig.ReadString('Misc', 'DefaultPluginAuthor', 'Your name');
|
||||
|
@ -950,14 +953,9 @@ begin
|
|||
frmMain.sciEditor.Modified := Document.Modified;
|
||||
|
||||
if RestoreCaret then begin
|
||||
if (eConfig.ReadBool('Editor', 'CheckRestoreCaret', True)) and (eConfig.ReadInteger('Editor', 'CheckRestoreLines', 600) < CountChars(Document.Code, #13)) then begin
|
||||
Screen.Cursor := crDefault;
|
||||
exit;
|
||||
end;
|
||||
|
||||
frmMain.sciEditor.LineScroll(0, (0 - frmMain.sciEditor.GetFirstVisibleLine) + Document.TopLine);
|
||||
frmMain.sciEditor.SelStart := Document.SelStart;
|
||||
frmMain.sciEditor.SelLength := Document.SelLength;
|
||||
frmMain.sciEditor.LineScroll(0, (0 - frmMain.sciEditor.GetFirstVisibleLine) + Document.TopLine);
|
||||
end;
|
||||
Screen.Cursor := crDefault;
|
||||
Plugin_DocChange(Document.Index, Document.FileName, Document.Highlighter, RestoreCaret, False);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
object frmMain: TfrmMain
|
||||
Left = 260
|
||||
Top = 195
|
||||
Top = 305
|
||||
Width = 888
|
||||
Height = 640
|
||||
Caption = 'AMXX-Studio'
|
||||
|
|
|
@ -542,8 +542,6 @@ begin
|
|||
eConfig.WriteBool('Editor', 'UnindentClosingBrace', frmAutoIndent.chkUnindentPressingClosingBrace.Checked);
|
||||
eConfig.WriteBool('Editor', 'UnindentEmptyLine', frmAutoIndent.chkUnindentLine.Checked);
|
||||
{ Editor }
|
||||
eConfig.WriteBool('Editor', 'LimitCaretRestore', frmSettings.chkRestoreCaret.Checked);
|
||||
eConfig.WriteString('Editor', 'LimitCaretRestoreVal', frmSettings.txtLines.Text);
|
||||
if FileExists(sciPropertyLoader.FileName) then
|
||||
sciPropertyLoader.Save;
|
||||
{ Compiler }
|
||||
|
|
Binary file not shown.
|
@ -30,9 +30,11 @@ type
|
|||
EBlue: TmbXPSpinEdit;
|
||||
NewSwatch: TmbColorPreview;
|
||||
OldSwatch: TmbColorPreview;
|
||||
chkDefault1: TCheckBox;
|
||||
bvlSpace1: TBevel;
|
||||
bvlSpace2: TBevel;
|
||||
chkDefault1: TCheckBox;
|
||||
chkNone1: TCheckBox;
|
||||
chkNone2: TCheckBox;
|
||||
chkDefault2: TCheckBox;
|
||||
procedure ColorModelChange(Sender: TObject);
|
||||
procedure HSLChange(Sender: TObject);
|
||||
|
@ -47,7 +49,8 @@ type
|
|||
function GetHint(c: TColor): string;
|
||||
procedure SetAllToSel(c: TColor);
|
||||
procedure PagesChange(Sender: TObject);
|
||||
procedure chkDefault2Click(Sender: TObject);
|
||||
procedure checkMouseUp(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
protected
|
||||
procedure CreateParams(var Params: TCreateParams); override;
|
||||
procedure CreateWnd; override;
|
||||
|
@ -62,204 +65,224 @@ implementation
|
|||
{$R *.dfm}
|
||||
|
||||
procedure TfrmSelectColor.CreateParams(var Params: TCreateParams);
|
||||
begin
|
||||
inherited CreateParams(Params);
|
||||
begin
|
||||
inherited CreateParams(Params);
|
||||
Params.Style := WS_CAPTION or WS_SYSMENU;
|
||||
Params.ExStyle := WS_EX_DLGMODALFRAME or WS_EX_WINDOWEDGE;
|
||||
end;
|
||||
Params.ExStyle := WS_EX_DLGMODALFRAME or WS_EX_WINDOWEDGE;
|
||||
end;
|
||||
|
||||
procedure TfrmSelectColor.CreateWnd;
|
||||
begin
|
||||
inherited CreateWnd;
|
||||
SendMessage(Self.Handle, WM_SETICON, 1, 0);
|
||||
end;
|
||||
begin
|
||||
inherited CreateWnd;
|
||||
SendMessage(Self.Handle, WM_SETICON, 1, 0);
|
||||
end;
|
||||
|
||||
procedure TfrmSelectColor.ColorModelChange(Sender: TObject);
|
||||
begin
|
||||
case ColorModel.ItemIndex of
|
||||
0:
|
||||
begin
|
||||
LRed.Caption := '&Red:';
|
||||
LGreen.Caption := '&Green:';
|
||||
LBlue.Caption := '&Blue:';
|
||||
ERed.MaxValue := 255;
|
||||
EGreen.MaxValue := 255;
|
||||
EBlue.MaxValue := 255;
|
||||
ERed.Value := GetRValue(NewSwatch.Color);
|
||||
EGreen.Value := GetGValue(NewSwatch.Color);
|
||||
EBlue.Value := GetBValue(NewSwatch.Color);
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
LRed.Caption := 'H&ue:';
|
||||
LGreen.Caption := '&Sat:';
|
||||
LBlue.Caption := '&Lum:';
|
||||
ERed.MaxValue := 238;
|
||||
EGreen.MaxValue := 240;
|
||||
EBlue.MaxValue := 240;
|
||||
RGBtoHSLRange(NewSwatch.Color, h, s, l);
|
||||
ERed.Value := h;
|
||||
EGreen.Value := s;
|
||||
EBlue.Value := l;
|
||||
end;
|
||||
end;
|
||||
case ColorModel.ItemIndex of
|
||||
0:
|
||||
begin
|
||||
LRed.Caption := '&Red:';
|
||||
LGreen.Caption := '&Green:';
|
||||
LBlue.Caption := '&Blue:';
|
||||
ERed.MaxValue := 255;
|
||||
EGreen.MaxValue := 255;
|
||||
EBlue.MaxValue := 255;
|
||||
ERed.Value := GetRValue(NewSwatch.Color);
|
||||
EGreen.Value := GetGValue(NewSwatch.Color);
|
||||
EBlue.Value := GetBValue(NewSwatch.Color);
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
LRed.Caption := 'H&ue:';
|
||||
LGreen.Caption := '&Sat:';
|
||||
LBlue.Caption := '&Lum:';
|
||||
ERed.MaxValue := 238;
|
||||
EGreen.MaxValue := 240;
|
||||
EBlue.MaxValue := 240;
|
||||
RGBtoHSLRange(NewSwatch.Color, h, s, l);
|
||||
ERed.Value := h;
|
||||
EGreen.Value := s;
|
||||
EBlue.Value := l;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSelectColor.HSLChange(Sender: TObject);
|
||||
begin
|
||||
if HSL.Manual then
|
||||
case ColorModel.ItemIndex of
|
||||
0:
|
||||
begin
|
||||
ERed.Value := HSL.RValue;
|
||||
EGreen.Value := HSL.GValue;
|
||||
EBlue.Value := HSL.BValue;
|
||||
NewSwatch.Color := HSL.SelectedColor;
|
||||
if HSL.Manual then
|
||||
case ColorModel.ItemIndex of
|
||||
0:
|
||||
begin
|
||||
ERed.Value := HSL.RValue;
|
||||
EGreen.Value := HSL.GValue;
|
||||
EBlue.Value := HSL.BValue;
|
||||
NewSwatch.Color := HSL.SelectedColor;
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
ERed.Value := HSL.HValue;
|
||||
EGreen.Value := HSL.SValue;
|
||||
EBlue.Value := HSL.LValue;
|
||||
NewSwatch.Color := HSL.SelectedColor;
|
||||
end;
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
ERed.Value := HSL.HValue;
|
||||
EGreen.Value := HSL.SValue;
|
||||
EBlue.Value := HSL.LValue;
|
||||
NewSwatch.Color := HSL.SelectedColor;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSelectColor.ERedChange(Sender: TObject);
|
||||
begin
|
||||
if (ERed.Text <> '') and ERed.Focused then
|
||||
case ColorModel.ItemIndex of
|
||||
0:
|
||||
begin
|
||||
HSL.RValue := ERed.Value;
|
||||
NewSwatch.Color := RGB(ERed.Value, EGreen.Value, EBlue.Value);
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
HSL.HValue := ERed.Value;
|
||||
NewSwatch.Color := HSLRangeToRGB(ERed.Value, EGreen.Value, EBlue.Value);
|
||||
end;
|
||||
end;
|
||||
if (ERed.Text <> '') and ERed.Focused then
|
||||
case ColorModel.ItemIndex of
|
||||
0:
|
||||
begin
|
||||
HSL.RValue := ERed.Value;
|
||||
NewSwatch.Color := RGB(ERed.Value, EGreen.Value, EBlue.Value);
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
HSL.HValue := ERed.Value;
|
||||
NewSwatch.Color := HSLRangeToRGB(ERed.Value, EGreen.Value, EBlue.Value);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSelectColor.EGreenChange(Sender: TObject);
|
||||
begin
|
||||
if (EGreen.Text <> '') and EGreen.Focused then
|
||||
case ColorModel.ItemIndex of
|
||||
0:
|
||||
begin
|
||||
HSL.GValue := EGreen.Value;
|
||||
NewSwatch.Color := RGB(ERed.Value, EGreen.Value, EBlue.Value);
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
HSL.SValue := EGreen.Value;
|
||||
NewSwatch.Color := HSLRangeToRGB(ERed.Value, EGreen.Value, EBlue.Value);
|
||||
end;
|
||||
end;
|
||||
if (EGreen.Text <> '') and EGreen.Focused then
|
||||
case ColorModel.ItemIndex of
|
||||
0:
|
||||
begin
|
||||
HSL.GValue := EGreen.Value;
|
||||
NewSwatch.Color := RGB(ERed.Value, EGreen.Value, EBlue.Value);
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
HSL.SValue := EGreen.Value;
|
||||
NewSwatch.Color := HSLRangeToRGB(ERed.Value, EGreen.Value, EBlue.Value);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSelectColor.EBlueChange(Sender: TObject);
|
||||
begin
|
||||
if (EBlue.Text <> '') and EBlue.Focused then
|
||||
case ColorModel.ItemIndex of
|
||||
0:
|
||||
begin
|
||||
HSL.BValue := EBlue.Value;
|
||||
NewSwatch.Color := RGB(ERed.Value, EGreen.Value, EBlue.Value);
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
HSL.LValue := EBlue.Value;
|
||||
NewSwatch.Color := HSLRangeToRGB(ERed.Value, EGreen.Value, EBlue.Value);
|
||||
end;
|
||||
end;
|
||||
if (EBlue.Text <> '') and EBlue.Focused then
|
||||
case ColorModel.ItemIndex of
|
||||
0:
|
||||
begin
|
||||
HSL.BValue := EBlue.Value;
|
||||
NewSwatch.Color := RGB(ERed.Value, EGreen.Value, EBlue.Value);
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
HSL.LValue := EBlue.Value;
|
||||
NewSwatch.Color := HSLRangeToRGB(ERed.Value, EGreen.Value, EBlue.Value);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSelectColor.FormKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
case Key of
|
||||
VK_RETURN: ModalResult := mrOK;
|
||||
VK_ESCAPE: ModalResult := mrCancel;
|
||||
end;
|
||||
case Key of
|
||||
VK_RETURN: ModalResult := mrOK;
|
||||
VK_ESCAPE: ModalResult := mrCancel;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmSelectColor.HexaChange(Sender: TObject);
|
||||
begin
|
||||
NewSwatch.Color := Hexa.SelectedColor;
|
||||
NewSwatch.Color := Hexa.SelectedColor;
|
||||
end;
|
||||
|
||||
function TfrmSelectColor.GetHint(c: TColor): string;
|
||||
begin
|
||||
Result := Format('RGB(%u, %u, %u)'#13'Hex: %s', [GetRValue(c), GetGValue(c), GetBValue(c), ColorToHex(c)]);
|
||||
Result := Format('RGB(%u, %u, %u)'#13'Hex: %s', [GetRValue(c), GetGValue(c), GetBValue(c), ColorToHex(c)]);
|
||||
end;
|
||||
|
||||
procedure TfrmSelectColor.NewSwatchColorChange(Sender: TObject);
|
||||
begin
|
||||
NewSwatch.Hint := GetHint(NewSwatch.Color);
|
||||
NewSwatch.Hint := GetHint(NewSwatch.Color);
|
||||
end;
|
||||
|
||||
procedure TfrmSelectColor.OldSwatchColorChange(Sender: TObject);
|
||||
begin
|
||||
OldSwatch.Hint := GetHint(OldSwatch.Color);
|
||||
SetAllToSel(OldSwatch.Color);
|
||||
OldSwatch.Hint := GetHint(OldSwatch.Color);
|
||||
SetAllToSel(OldSwatch.Color);
|
||||
end;
|
||||
|
||||
procedure TfrmSelectColor.SetAllToSel(c: TColor);
|
||||
begin
|
||||
case Pages.ActivePageIndex of
|
||||
case Pages.ActivePageIndex of
|
||||
// Standard Page
|
||||
0: Hexa.SelectedColor := c;
|
||||
0: Hexa.SelectedColor := c;
|
||||
// Custom Page
|
||||
1:
|
||||
begin
|
||||
HSL.SelectedColor := c;
|
||||
case ColorModel.ItemIndex of
|
||||
0:
|
||||
1:
|
||||
begin
|
||||
ERed.Value := GetRValue(c);
|
||||
EGreen.Value := GetGValue(c);
|
||||
EBlue.Value := GetBValue(c);
|
||||
HSL.SelectedColor := c;
|
||||
case ColorModel.ItemIndex of
|
||||
0:
|
||||
begin
|
||||
ERed.Value := GetRValue(c);
|
||||
EGreen.Value := GetGValue(c);
|
||||
EBlue.Value := GetBValue(c);
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
RGBtoHSLRange(c, h, s, l);
|
||||
ERed.Value := h;
|
||||
EGreen.Value := s;
|
||||
EBlue.Value := l;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
RGBtoHSLRange(c, h, s, l);
|
||||
ERed.Value := h;
|
||||
EGreen.Value := s;
|
||||
EBlue.Value := l;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
NewSwatch.Color := c;
|
||||
end;
|
||||
NewSwatch.Color := c;
|
||||
end;
|
||||
|
||||
procedure TfrmSelectColor.PagesChange(Sender: TObject);
|
||||
begin
|
||||
SetAllToSel(NewSwatch.Color);
|
||||
SetAllToSel(NewSwatch.Color);
|
||||
end;
|
||||
|
||||
procedure TfrmSelectColor.chkDefault2Click(Sender: TObject);
|
||||
procedure TfrmSelectColor.checkMouseUp(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
chkDefault1.Checked := (Sender As TCheckBox).Checked;
|
||||
chkDefault2.Checked := (Sender As TCheckBox).Checked;
|
||||
if (Sender = chkDefault1) or (Sender = chkDefault2) then begin
|
||||
chkDefault1.Checked := (Sender as TCheckBox).Checked;
|
||||
chkDefault2.Checked := (Sender as TCheckBox).Checked;
|
||||
chkNone1.Checked := False;
|
||||
chkNone2.Checked := False;
|
||||
newSwatch.Color := clDefault;
|
||||
end
|
||||
else if (Sender = chkNone1) or (Sender = chkNone2) then begin
|
||||
chkNone1.Checked := (Sender as TCheckBox).Checked;
|
||||
chkNone2.Checked := (Sender as TCheckBox).Checked;
|
||||
chkDefault1.Checked := False;
|
||||
chkDefault2.Checked := False;
|
||||
newSwatch.Color := clNone;
|
||||
end
|
||||
else begin
|
||||
if Standard.Visible then
|
||||
newSwatch.Color := Hexa.Color
|
||||
else
|
||||
newSwatch.Color := HSL.Color;
|
||||
end;
|
||||
|
||||
lblColor1.Enabled := not (Sender As TCheckBox).Checked;
|
||||
bvlSpace1.Enabled := not (Sender As TCheckBox).Checked;
|
||||
Hexa.Enabled := not (Sender As TCheckBox).Checked;
|
||||
lblColor2.Enabled := not (Sender As TCheckBox).Checked;
|
||||
lblColorModel.Enabled := not (Sender As TCheckBox).Checked;
|
||||
LRed.Enabled := not (Sender As TCheckBox).Checked;
|
||||
LGreen.Enabled := not (Sender As TCheckBox).Checked;
|
||||
LBlue.Enabled := not (Sender As TCheckBox).Checked;
|
||||
bvlSpace2.Enabled := not (Sender As TCheckBox).Checked;
|
||||
HSL.Enabled := not (Sender As TCheckBox).Checked;
|
||||
ColorModel.Enabled := not (Sender As TCheckBox).Checked;
|
||||
ERed.Enabled := not (Sender As TCheckBox).Checked;
|
||||
EGreen.Enabled := not (Sender As TCheckBox).Checked;
|
||||
EBlue.Enabled := not (Sender As TCheckBox).Checked;
|
||||
lblColor1.Enabled := not (Sender as TCheckBox).Checked;
|
||||
bvlSpace1.Enabled := not (Sender as TCheckBox).Checked;
|
||||
Hexa.Enabled := not (Sender as TCheckBox).Checked;
|
||||
lblColor2.Enabled := not (Sender as TCheckBox).Checked;
|
||||
lblColorModel.Enabled := not (Sender as TCheckBox).Checked;
|
||||
LRed.Enabled := not (Sender as TCheckBox).Checked;
|
||||
LGreen.Enabled := not (Sender as TCheckBox).Checked;
|
||||
LBlue.Enabled := not (Sender as TCheckBox).Checked;
|
||||
bvlSpace2.Enabled := not (Sender as TCheckBox).Checked;
|
||||
HSL.Enabled := not (Sender as TCheckBox).Checked;
|
||||
ColorModel.Enabled := not (Sender as TCheckBox).Checked;
|
||||
ERed.Enabled := not (Sender as TCheckBox).Checked;
|
||||
EGreen.Enabled := not (Sender as TCheckBox).Checked;
|
||||
EBlue.Enabled := not (Sender as TCheckBox).Checked;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ object frmSettings: TfrmSettings
|
|||
Top = 0
|
||||
Width = 353
|
||||
Height = 260
|
||||
ActivePage = jspShortcuts
|
||||
ActivePage = jspHighlighter
|
||||
PropagateEnable = False
|
||||
Align = alClient
|
||||
OnChange = jplSettingsChange
|
||||
|
@ -355,14 +355,14 @@ object frmSettings: TfrmSettings
|
|||
Caption = 'Tools'
|
||||
object bvlTools1: TBevel
|
||||
Left = 4
|
||||
Top = 66
|
||||
Top = 68
|
||||
Width = 347
|
||||
Height = 3
|
||||
Shape = bsTopLine
|
||||
end
|
||||
object lblCodeFolding: TLabel
|
||||
Left = 6
|
||||
Top = 164
|
||||
Top = 142
|
||||
Width = 67
|
||||
Height = 13
|
||||
Caption = 'Code-Folding:'
|
||||
|
@ -376,7 +376,7 @@ object frmSettings: TfrmSettings
|
|||
end
|
||||
object lblAutoIndent: TLabel
|
||||
Left = 194
|
||||
Top = 164
|
||||
Top = 142
|
||||
Width = 63
|
||||
Height = 13
|
||||
Caption = 'Auto-Indent:'
|
||||
|
@ -428,7 +428,7 @@ object frmSettings: TfrmSettings
|
|||
end
|
||||
object pnlCodeFolding: TPanel
|
||||
Left = 6
|
||||
Top = 180
|
||||
Top = 158
|
||||
Width = 183
|
||||
Height = 49
|
||||
BevelOuter = bvLowered
|
||||
|
@ -463,7 +463,7 @@ object frmSettings: TfrmSettings
|
|||
Left = 6
|
||||
Top = 92
|
||||
Width = 343
|
||||
Height = 67
|
||||
Height = 43
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 6
|
||||
object imgCaretFore: TImage
|
||||
|
@ -506,13 +506,6 @@ object frmSettings: TfrmSettings
|
|||
Height = 13
|
||||
Caption = 'Period:'
|
||||
end
|
||||
object bvlCaret2: TBevel
|
||||
Left = 1
|
||||
Top = 42
|
||||
Width = 340
|
||||
Height = 3
|
||||
Shape = bsTopLine
|
||||
end
|
||||
object cmdSelectCaretFore: TFlatButton
|
||||
Left = 28
|
||||
Top = 20
|
||||
|
@ -558,32 +551,6 @@ object frmSettings: TfrmSettings
|
|||
TabOrder = 3
|
||||
OnChange = txtPeriodChange
|
||||
end
|
||||
object chkRestoreCaret: TFlatCheckBox
|
||||
Left = 4
|
||||
Top = 46
|
||||
Width = 331
|
||||
Height = 17
|
||||
Caption = 'Do not restore caret if the document has more than xxxxxx lines'
|
||||
TabOrder = 4
|
||||
TabStop = True
|
||||
OnClick = chkRestoreCaretClick
|
||||
end
|
||||
object txtLines: TFlatEdit
|
||||
Left = 270
|
||||
Top = 47
|
||||
Width = 37
|
||||
Height = 14
|
||||
ColorFlat = clWhite
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -7
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
Text = '600'
|
||||
OnChange = txtLinesChange
|
||||
end
|
||||
end
|
||||
object chkIndentGuides: TFlatCheckBox
|
||||
Left = 6
|
||||
|
@ -596,7 +563,7 @@ object frmSettings: TfrmSettings
|
|||
end
|
||||
object pnlAutoIndent: TPanel
|
||||
Left = 194
|
||||
Top = 180
|
||||
Top = 158
|
||||
Width = 155
|
||||
Height = 49
|
||||
BevelOuter = bvLowered
|
||||
|
|
|
@ -105,9 +105,6 @@ type
|
|||
cmdLoad: TFlatButton;
|
||||
cmdUnload: TFlatButton;
|
||||
cmdRemove: TFlatButton;
|
||||
chkRestoreCaret: TFlatCheckBox;
|
||||
txtLines: TFlatEdit;
|
||||
bvlCaret2: TBevel;
|
||||
optDontSave: TFlatRadioButton;
|
||||
lblPAWN: TLabel;
|
||||
pnlSMALLCompiler: TPanel;
|
||||
|
@ -186,11 +183,9 @@ type
|
|||
cmdResetShortcuts: TFlatButton;
|
||||
txtShortcut: TFlatEdit;
|
||||
procedure jplSettingsChange(Sender: TObject);
|
||||
procedure txtLinesChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure chkRestoreCaretClick(Sender: TObject);
|
||||
procedure txtFontSizeChange(Sender: TObject);
|
||||
procedure cboLanguageChange(Sender: TObject);
|
||||
procedure chkUseDefaultFontClick(Sender: TObject);
|
||||
|
@ -283,12 +278,6 @@ begin
|
|||
txtCPPOutputChange(Sender);
|
||||
end;
|
||||
|
||||
procedure TfrmSettings.txtLinesChange(Sender: TObject);
|
||||
begin
|
||||
if not IsNumeric(txtLines.Text) then
|
||||
txtLines.Text := '600';
|
||||
end;
|
||||
|
||||
procedure TfrmSettings.FormCreate(Sender: TObject);
|
||||
begin
|
||||
eConfig := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'config\Settings.ini');
|
||||
|
@ -322,17 +311,11 @@ end;
|
|||
procedure TfrmSettings.FormShow(Sender: TObject);
|
||||
var i: integer;
|
||||
begin
|
||||
txtLines.Enabled := chkRestoreCaret.Checked;
|
||||
cboLanguage.OnChange(Self);
|
||||
for i := 0 to trvSettings.Items.Count -1 do
|
||||
trvSettings.Items[i].Expand(True);
|
||||
end;
|
||||
|
||||
procedure TfrmSettings.chkRestoreCaretClick(Sender: TObject);
|
||||
begin
|
||||
txtLines.Enabled := chkRestoreCaret.Checked;
|
||||
end;
|
||||
|
||||
procedure TfrmSettings.txtFontSizeChange(Sender: TObject);
|
||||
begin
|
||||
if not IsNumeric(txtFontSize.Text) then begin
|
||||
|
@ -476,6 +459,9 @@ begin
|
|||
chkVisible.Checked := Visible;
|
||||
txtFontSize.Text := IntToStr(TSciStyle(TSciLangItem(frmMain.sciEditor.LanguageManager.LanguageList.Items[cboLanguage.ItemIndex]).Styles.Items[lstStyles.ItemIndex]).FontSize);
|
||||
|
||||
Foreground := ForeColor;
|
||||
Background := BackColor;
|
||||
|
||||
PaintForeground(ForeColor);
|
||||
PaintBackground(BackColor);
|
||||
end;
|
||||
|
|
|
@ -215,7 +215,7 @@ begin
|
|||
Handled := True;
|
||||
end;
|
||||
|
||||
if not frmMain.Focused then exit;
|
||||
if GetForegroundWindow <> frmMain.Handle then exit;
|
||||
|
||||
// stop IRC Paster if escape is pressed
|
||||
if (Msg.CharCode = VK_ESCAPE) then begin
|
||||
|
@ -257,6 +257,8 @@ begin
|
|||
Handled := True;
|
||||
if (eShortcut = Shortcut(Ord('K'), [ssCtrl])) then
|
||||
Handled := True;
|
||||
if (eShortcut = Shortcut(Ord('S'), [ssCtrl])) then
|
||||
Handled := True;
|
||||
if (eShortcut = Shortcut(Ord('B'), [ssCtrl, ssShift])) then
|
||||
Handled := True;
|
||||
if (eShortcut = Shortcut(Ord('C'), [ssCtrl, ssShift])) then
|
||||
|
|
Loading…
Reference in New Issue
Block a user