From 75babc1be495e6c7cdd7ece12692d4d3ad5e3c52 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Fri, 2 Jul 2021 18:20:47 +0200 Subject: [PATCH] fix borders --- config/ConfigFormUnit.cpp | 6 + config/ConfigFormUnit.dfm | 322 +++++++++++++++++++++----------------- config/ConfigFormUnit.h | 5 + 3 files changed, 186 insertions(+), 147 deletions(-) diff --git a/config/ConfigFormUnit.cpp b/config/ConfigFormUnit.cpp index 097a942..c106f38 100644 --- a/config/ConfigFormUnit.cpp +++ b/config/ConfigFormUnit.cpp @@ -413,3 +413,9 @@ void __fastcall TConfigForm::NonexclusiveChkClick(TObject *Sender) SaveSettings(); } +void __fastcall TConfigForm::PboxPaint(TObject *Sender) +{ + TPaintBox *pbox = static_cast(Sender); + pbox->Canvas->Rectangle(pbox->ClientRect); +} + diff --git a/config/ConfigFormUnit.dfm b/config/ConfigFormUnit.dfm index 7b2026d..08e2f16 100644 --- a/config/ConfigFormUnit.dfm +++ b/config/ConfigFormUnit.dfm @@ -2682,150 +2682,6 @@ object ConfigForm: TConfigForm OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 - object DisplayPnl: TPanel - Left = 191 - Top = 8 - Width = 499 - Height = 465 - BevelOuter = bvNone - Color = clWhite - ParentBackground = False - ShowCaption = False - TabOrder = 1 - StyleElements = [seFont, seBorder] - object PresentationLbl: TLabel - Left = 40 - Top = 28 - Width = 87 - Height = 21 - Caption = 'Presentation' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -16 - Font.Name = 'Segoe UI' - Font.Style = [] - ParentFont = False - StyleElements = [seClient, seBorder] - end - object MaintasLbl: TLabel - Left = 40 - Top = 105 - Width = 145 - Height = 21 - Margins.Top = 18 - Caption = 'Maintain aspect ratio' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -16 - Font.Name = 'Segoe UI' - Font.Style = [] - ParentFont = False - StyleElements = [seClient, seBorder] - end - object VsyncLbl: TLabel - Left = 40 - Top = 173 - Width = 93 - Height = 21 - Margins.Top = 18 - Caption = 'Enable VSync' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -16 - Font.Name = 'Segoe UI' - Font.Style = [] - ParentFont = False - StyleElements = [seClient, seBorder] - end - object AdjmouseLbl: TLabel - Left = 40 - Top = 241 - Width = 168 - Height = 21 - Margins.Top = 18 - Caption = 'Adjust mouse sensitivity' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -16 - Font.Name = 'Segoe UI' - Font.Style = [] - ParentFont = False - StyleElements = [seClient, seBorder] - end - object DevmodeLbl: TLabel - Left = 40 - Top = 309 - Width = 216 - Height = 21 - Margins.Top = 18 - Caption = 'Lock cursor to window / screen' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -16 - Font.Name = 'Segoe UI' - Font.Style = [] - ParentFont = False - StyleElements = [seClient, seBorder] - end - object PresentationCbx: TComboBox - Left = 48 - Top = 55 - Width = 185 - Height = 29 - BevelEdges = [] - BevelInner = bvNone - BevelOuter = bvSpace - Style = csDropDownList - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -16 - Font.Name = 'Segoe UI' - Font.Style = [] - ParentFont = False - TabOrder = 0 - OnChange = PresentationCbxChange - Items.Strings = ( - 'Fullscreen' - 'Borderless' - 'Windowed') - end - object MaintasChk: TToggleSwitch - Left = 40 - Top = 132 - Width = 50 - Height = 20 - ShowStateCaption = False - TabOrder = 1 - OnClick = MaintasChkClick - end - object VsyncChk: TToggleSwitch - Left = 40 - Top = 200 - Width = 50 - Height = 20 - ShowStateCaption = False - TabOrder = 2 - OnClick = VsyncChkClick - end - object AdjmouseChk: TToggleSwitch - Left = 40 - Top = 268 - Width = 50 - Height = 20 - ShowStateCaption = False - TabOrder = 3 - OnClick = AdjmouseChkClick - end - object DevmodeChk: TToggleSwitch - Left = 40 - Top = 336 - Width = 50 - Height = 20 - ShowStateCaption = False - TabOrder = 4 - OnClick = DevmodeChkClick - end - end object CompatibilityPnl: TPanel Left = 191 Top = 8 @@ -2927,8 +2783,15 @@ object ConfigForm: TConfigForm ParentFont = False StyleElements = [seClient, seBorder] end + object MaxfpsPbox: TPaintBox + Left = 40 + Top = 54 + Width = 291 + Height = 31 + OnPaint = PboxPaint + end object MaxgameticksCbx: TComboBox - Left = 48 + Left = 41 Top = 55 Width = 289 Height = 29 @@ -3103,8 +2966,22 @@ object ConfigForm: TConfigForm ParentFont = False StyleElements = [seClient, seBorder] end + object RendererPbox: TPaintBox + Left = 40 + Top = 54 + Width = 187 + Height = 31 + OnPaint = PboxPaint + end + object ShaderPbox: TPaintBox + Left = 40 + Top = 131 + Width = 427 + Height = 31 + OnPaint = PboxPaint + end object RendererCbx: TComboBox - Left = 48 + Left = 41 Top = 55 Width = 185 Height = 29 @@ -3145,7 +3022,7 @@ object ConfigForm: TConfigForm OnClick = SavesettingsChkClick end object ShaderCbx: TComboBox - Left = 48 + Left = 41 Top = 132 Width = 425 Height = 29 @@ -3181,6 +3058,157 @@ object ConfigForm: TConfigForm OnClick = BoxingChkClick end end + object DisplayPnl: TPanel + Left = 191 + Top = 8 + Width = 499 + Height = 465 + BevelOuter = bvNone + Color = clWhite + ParentBackground = False + ShowCaption = False + TabOrder = 1 + StyleElements = [seFont, seBorder] + object PresentationLbl: TLabel + Left = 40 + Top = 28 + Width = 87 + Height = 21 + Caption = 'Presentation' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'Segoe UI' + Font.Style = [] + ParentFont = False + StyleElements = [seClient, seBorder] + end + object MaintasLbl: TLabel + Left = 40 + Top = 105 + Width = 145 + Height = 21 + Margins.Top = 18 + Caption = 'Maintain aspect ratio' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'Segoe UI' + Font.Style = [] + ParentFont = False + StyleElements = [seClient, seBorder] + end + object VsyncLbl: TLabel + Left = 40 + Top = 173 + Width = 93 + Height = 21 + Margins.Top = 18 + Caption = 'Enable VSync' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'Segoe UI' + Font.Style = [] + ParentFont = False + StyleElements = [seClient, seBorder] + end + object AdjmouseLbl: TLabel + Left = 40 + Top = 241 + Width = 168 + Height = 21 + Margins.Top = 18 + Caption = 'Adjust mouse sensitivity' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'Segoe UI' + Font.Style = [] + ParentFont = False + StyleElements = [seClient, seBorder] + end + object DevmodeLbl: TLabel + Left = 40 + Top = 309 + Width = 216 + Height = 21 + Margins.Top = 18 + Caption = 'Lock cursor to window / screen' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'Segoe UI' + Font.Style = [] + ParentFont = False + StyleElements = [seClient, seBorder] + end + object PresentationPbox: TPaintBox + Left = 40 + Top = 54 + Width = 187 + Height = 31 + OnPaint = PboxPaint + end + object PresentationCbx: TComboBox + Left = 41 + Top = 55 + Width = 185 + Height = 29 + BevelEdges = [] + BevelInner = bvNone + BevelOuter = bvSpace + Style = csDropDownList + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'Segoe UI' + Font.Style = [] + ParentFont = False + TabOrder = 1 + OnChange = PresentationCbxChange + Items.Strings = ( + 'Fullscreen' + 'Borderless' + 'Windowed') + end + object MaintasChk: TToggleSwitch + Left = 40 + Top = 132 + Width = 50 + Height = 20 + ShowStateCaption = False + TabOrder = 0 + OnClick = MaintasChkClick + end + object VsyncChk: TToggleSwitch + Left = 40 + Top = 200 + Width = 50 + Height = 20 + ShowStateCaption = False + TabOrder = 2 + OnClick = VsyncChkClick + end + object AdjmouseChk: TToggleSwitch + Left = 40 + Top = 268 + Width = 50 + Height = 20 + ShowStateCaption = False + TabOrder = 3 + OnClick = AdjmouseChkClick + end + object DevmodeChk: TToggleSwitch + Left = 40 + Top = 336 + Width = 50 + Height = 20 + ShowStateCaption = False + TabOrder = 4 + OnClick = DevmodeChkClick + end + end object MenuPnl: TPanel Left = 0 Top = 8 diff --git a/config/ConfigFormUnit.h b/config/ConfigFormUnit.h index 6b6f34d..3a43cc1 100644 --- a/config/ConfigFormUnit.h +++ b/config/ConfigFormUnit.h @@ -56,6 +56,10 @@ __published: // Von der IDE verwaltete Komponenten TLabel *FixpitchLbl; TLabel *NonexclusiveLbl; TToggleSwitch *NonexclusiveChk; + TPaintBox *PresentationPbox; + TPaintBox *RendererPbox; + TPaintBox *ShaderPbox; + TPaintBox *MaxfpsPbox; void __fastcall DisplayBtnClick(TObject *Sender); void __fastcall AdvDisplayBtnClick(TObject *Sender); void __fastcall CompatibilityBtnClick(TObject *Sender); @@ -77,6 +81,7 @@ __published: // Von der IDE verwaltete Komponenten void __fastcall MinfpsChkClick(TObject *Sender); void __fastcall FixpitchChkClick(TObject *Sender); void __fastcall NonexclusiveChkClick(TObject *Sender); + void __fastcall PboxPaint(TObject *Sender); private: // Benutzer-Deklarationen void SaveSettings(); bool GetBool(TIniFile *ini, System::UnicodeString key, bool defValue);