diff --git a/editor/studio/AMXX_Studio.dof b/editor/studio/AMXX_Studio.dof index 480e7c8f..c227b268 100755 --- a/editor/studio/AMXX_Studio.dof +++ b/editor/studio/AMXX_Studio.dof @@ -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= diff --git a/editor/studio/AMXX_Studio.exe b/editor/studio/AMXX_Studio.exe index 23963491..64772063 100755 Binary files a/editor/studio/AMXX_Studio.exe and b/editor/studio/AMXX_Studio.exe differ diff --git a/editor/studio/AMXX_Studio.res b/editor/studio/AMXX_Studio.res index f6ab7a40..5c96b5bc 100755 Binary files a/editor/studio/AMXX_Studio.res and b/editor/studio/AMXX_Studio.res differ diff --git a/editor/studio/UnitMainTools.pas b/editor/studio/UnitMainTools.pas index 7fdb23fb..c0559952 100755 --- a/editor/studio/UnitMainTools.pas +++ b/editor/studio/UnitMainTools.pas @@ -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 '') 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. + diff --git a/editor/studio/UnitfrmSettings.dfm b/editor/studio/UnitfrmSettings.dfm index 1d385383..a2bd38f7 100755 --- a/editor/studio/UnitfrmSettings.dfm +++ b/editor/studio/UnitfrmSettings.dfm @@ -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 diff --git a/editor/studio/UnitfrmSettings.pas b/editor/studio/UnitfrmSettings.pas index 61d7ee0b..c2d46c60 100755 --- a/editor/studio/UnitfrmSettings.pas +++ b/editor/studio/UnitfrmSettings.pas @@ -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; diff --git a/editor/studio/UnitfrmSplashscreen.pas b/editor/studio/UnitfrmSplashscreen.pas index 6e6e6871..0ed69b13 100755 --- a/editor/studio/UnitfrmSplashscreen.pas +++ b/editor/studio/UnitfrmSplashscreen.pas @@ -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