mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-25 01:57:47 +01:00
save and load settings from ddraw.ini
This commit is contained in:
parent
b119d3fd9d
commit
81b4408833
@ -3,11 +3,15 @@
|
|||||||
#include <vcl.h>
|
#include <vcl.h>
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include <IniFiles.hpp>
|
||||||
|
#include <StrUtils.hpp>
|
||||||
|
#include <IOUtils.hpp>
|
||||||
#include "ConfigFormUnit.h"
|
#include "ConfigFormUnit.h"
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#pragma package(smart_init)
|
#pragma package(smart_init)
|
||||||
#pragma resource "*.dfm"
|
#pragma resource "*.dfm"
|
||||||
TConfigForm *ConfigForm;
|
TConfigForm *ConfigForm;
|
||||||
|
bool Initialized;
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
__fastcall TConfigForm::TConfigForm(TComponent* Owner)
|
__fastcall TConfigForm::TConfigForm(TComponent* Owner)
|
||||||
: TForm(Owner)
|
: TForm(Owner)
|
||||||
@ -35,3 +39,241 @@ void __fastcall TConfigForm::CompatibilityBtnClick(TObject *Sender)
|
|||||||
DisplayPnl->Visible = false;
|
DisplayPnl->Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __fastcall TConfigForm::FormCreate(TObject *Sender)
|
||||||
|
{
|
||||||
|
auto *ini = new TIniFile(".\\ddraw.ini");
|
||||||
|
|
||||||
|
/* Display Settings */
|
||||||
|
|
||||||
|
auto s = LowerCase(ini->ReadString("ddraw", "windowed", "false"));
|
||||||
|
bool windowed = s == "true" || s == "yes" || s == "1";
|
||||||
|
|
||||||
|
s = LowerCase(ini->ReadString("ddraw", "fullscreen", "false"));
|
||||||
|
bool fullscreen = s == "true" || s == "yes" || s == "1";
|
||||||
|
|
||||||
|
s = LowerCase(ini->ReadString("ddraw", "nonexclusive", "false"));
|
||||||
|
bool nonexclusive = s == "true" || s == "yes" || s == "1";
|
||||||
|
|
||||||
|
|
||||||
|
if (windowed && fullscreen) {
|
||||||
|
PresentationCbx->ItemIndex = 2;
|
||||||
|
}
|
||||||
|
else if (windowed) {
|
||||||
|
PresentationCbx->ItemIndex = 3;
|
||||||
|
}
|
||||||
|
else if (nonexclusive) {
|
||||||
|
PresentationCbx->ItemIndex = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PresentationCbx->ItemIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
s = LowerCase(ini->ReadString("ddraw", "maintas", "false"));
|
||||||
|
MaintasChk->State = s == "true" || s == "yes" || s == "1" ? tssOn : tssOff;
|
||||||
|
|
||||||
|
s = LowerCase(ini->ReadString("ddraw", "vsync", "false"));
|
||||||
|
VsyncChk->State = s == "true" || s == "yes" || s == "1" ? tssOn : tssOff;
|
||||||
|
|
||||||
|
s = LowerCase(ini->ReadString("ddraw", "adjmouse", "false"));
|
||||||
|
AdjmouseChk->State = s == "true" || s == "yes" || s == "1" ? tssOn : tssOff;
|
||||||
|
|
||||||
|
s = LowerCase(ini->ReadString("ddraw", "devmode", "false"));
|
||||||
|
DevmodeChk->State = s == "true" || s == "yes" || s == "1" ? tssOn : tssOff;
|
||||||
|
|
||||||
|
/* Advanced Display Settings */
|
||||||
|
|
||||||
|
auto renderer = LowerCase(ini->ReadString("ddraw", "renderer", "auto"));
|
||||||
|
|
||||||
|
if (StartsStr("d", renderer)) {
|
||||||
|
RendererCbx->ItemIndex = 1;
|
||||||
|
}
|
||||||
|
else if (StartsStr("o", renderer)) {
|
||||||
|
RendererCbx->ItemIndex = 2;
|
||||||
|
}
|
||||||
|
else if (StartsStr("s", renderer) || StartsStr("g", renderer)) {
|
||||||
|
RendererCbx->ItemIndex = 3;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
RendererCbx->ItemIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
TStringDynArray list = TDirectory::GetFiles(
|
||||||
|
"Shaders",
|
||||||
|
"*.glsl",
|
||||||
|
TSearchOption::soAllDirectories);
|
||||||
|
|
||||||
|
for (int i = 0; i < list.Length; i++)
|
||||||
|
ShaderCbx->AddItem(list[i], NULL);
|
||||||
|
|
||||||
|
auto shader = ini->ReadString("ddraw", "shader", "");
|
||||||
|
ShaderCbx->ItemIndex = ShaderCbx->Items->IndexOf(shader);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int maxfps = ini->ReadInteger("ddraw", "maxfps", -1);
|
||||||
|
MaxfpsChk->State = maxfps != 0 ? tssOn : tssOff;
|
||||||
|
|
||||||
|
s = LowerCase(ini->ReadString("ddraw", "boxing", "false"));
|
||||||
|
BoxingChk->State = s == "true" || s == "yes" || s == "1" ? tssOn : tssOff;
|
||||||
|
|
||||||
|
s = LowerCase(ini->ReadString("ddraw", "border", "false"));
|
||||||
|
BorderChk->State = s == "true" || s == "yes" || s == "1" ? tssOn : tssOff;
|
||||||
|
|
||||||
|
int savesettings = ini->ReadInteger("ddraw", "savesettings", 1);
|
||||||
|
SavesettingsChk->State = savesettings != 0 ? tssOn : tssOff;
|
||||||
|
|
||||||
|
delete ini;
|
||||||
|
|
||||||
|
Initialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TConfigForm::SaveSettings()
|
||||||
|
{
|
||||||
|
if (!Initialized)
|
||||||
|
return;
|
||||||
|
|
||||||
|
auto *ini = new TIniFile(".\\ddraw.ini");
|
||||||
|
|
||||||
|
/* Display Settings */
|
||||||
|
|
||||||
|
switch(PresentationCbx->ItemIndex)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
ini->WriteString("ddraw", "windowed", "false");
|
||||||
|
ini->WriteString("ddraw", "fullscreen", "false");
|
||||||
|
ini->WriteString("ddraw", "nonexclusive", "false");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
ini->WriteString("ddraw", "windowed", "false");
|
||||||
|
ini->WriteString("ddraw", "fullscreen", "false");
|
||||||
|
ini->WriteString("ddraw", "nonexclusive", "true");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ini->WriteString("ddraw", "windowed", "true");
|
||||||
|
ini->WriteString("ddraw", "fullscreen", "true");
|
||||||
|
ini->WriteString("ddraw", "nonexclusive", "false");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
ini->WriteString("ddraw", "windowed", "true");
|
||||||
|
ini->WriteString("ddraw", "fullscreen", "false");
|
||||||
|
ini->WriteString("ddraw", "nonexclusive", "false");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ini->WriteString(
|
||||||
|
"ddraw",
|
||||||
|
"renderer",
|
||||||
|
LowerCase(RendererCbx->Text));
|
||||||
|
|
||||||
|
ini->WriteString(
|
||||||
|
"ddraw",
|
||||||
|
"maintas",
|
||||||
|
MaintasChk->State == tssOn ? "true" : "false");
|
||||||
|
|
||||||
|
ini->WriteString(
|
||||||
|
"ddraw",
|
||||||
|
"vsync",
|
||||||
|
VsyncChk->State == tssOn ? "true" : "false");
|
||||||
|
|
||||||
|
ini->WriteString(
|
||||||
|
"ddraw",
|
||||||
|
"adjmouse",
|
||||||
|
AdjmouseChk->State == tssOn ? "true" : "false");
|
||||||
|
|
||||||
|
ini->WriteString(
|
||||||
|
"ddraw",
|
||||||
|
"devmode",
|
||||||
|
DevmodeChk->State == tssOn ? "true" : "false");
|
||||||
|
|
||||||
|
/* Advanced Display Settings */
|
||||||
|
|
||||||
|
ini->WriteString("ddraw", "renderer", LowerCase(RendererCbx->Text));
|
||||||
|
ini->WriteString("ddraw", "shader", ShaderCbx->Text);
|
||||||
|
|
||||||
|
ini->WriteInteger(
|
||||||
|
"ddraw",
|
||||||
|
"maxfps",
|
||||||
|
MaxfpsChk->State == tssOn ? -1 : 0);
|
||||||
|
|
||||||
|
ini->WriteString(
|
||||||
|
"ddraw",
|
||||||
|
"boxing",
|
||||||
|
BoxingChk->State == tssOn ? "true" : "false");
|
||||||
|
|
||||||
|
ini->WriteString(
|
||||||
|
"ddraw",
|
||||||
|
"border",
|
||||||
|
BorderChk->State == tssOn ? "true" : "false");
|
||||||
|
|
||||||
|
ini->WriteInteger(
|
||||||
|
"ddraw",
|
||||||
|
"savesettings",
|
||||||
|
SavesettingsChk->State == tssOn ? 1 : 0);
|
||||||
|
|
||||||
|
delete ini;
|
||||||
|
}
|
||||||
|
|
||||||
|
void __fastcall TConfigForm::PresentationCbxChange(TObject *Sender)
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void __fastcall TConfigForm::MaintasChkClick(TObject *Sender)
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void __fastcall TConfigForm::VsyncChkClick(TObject *Sender)
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void __fastcall TConfigForm::AdjmouseChkClick(TObject *Sender)
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void __fastcall TConfigForm::DevmodeChkClick(TObject *Sender)
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void __fastcall TConfigForm::RendererCbxChange(TObject *Sender)
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void __fastcall TConfigForm::ShaderCbxChange(TObject *Sender)
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void __fastcall TConfigForm::MaxfpsChkClick(TObject *Sender)
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void __fastcall TConfigForm::BoxingChkClick(TObject *Sender)
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void __fastcall TConfigForm::BorderChkClick(TObject *Sender)
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void __fastcall TConfigForm::SavesettingsChkClick(TObject *Sender)
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -2679,68 +2679,150 @@ object ConfigForm: TConfigForm
|
|||||||
B88CB18EFF1FA2974C1C31AF16A40000000049454E44AE426082}
|
B88CB18EFF1FA2974C1C31AF16A40000000049454E44AE426082}
|
||||||
OldCreateOrder = False
|
OldCreateOrder = False
|
||||||
Position = poDesktopCenter
|
Position = poDesktopCenter
|
||||||
|
OnCreate = FormCreate
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object MenuPnl: TPanel
|
object DisplayPnl: TPanel
|
||||||
Left = 0
|
Left = 191
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 185
|
Width = 499
|
||||||
Height = 465
|
Height = 465
|
||||||
Color = clBlack
|
Color = clWhite
|
||||||
ParentBackground = False
|
ParentBackground = False
|
||||||
TabOrder = 0
|
ShowCaption = False
|
||||||
DesignSize = (
|
TabOrder = 1
|
||||||
185
|
StyleElements = [seFont, seBorder]
|
||||||
465)
|
object PresentationLbl: TLabel
|
||||||
object DisplayBtn: TSpeedButton
|
Left = 40
|
||||||
Left = 8
|
Top = 28
|
||||||
Top = 8
|
Width = 87
|
||||||
Width = 171
|
Height = 21
|
||||||
Height = 41
|
Caption = 'Presentation'
|
||||||
Anchors = [akLeft, akTop, akRight]
|
|
||||||
Caption = 'Display Settings'
|
|
||||||
Flat = True
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWhite
|
Font.Color = clWindowText
|
||||||
Font.Height = -13
|
Font.Height = -16
|
||||||
Font.Name = 'Segoe UI'
|
Font.Name = 'Segoe UI'
|
||||||
Font.Style = [fsBold]
|
Font.Style = []
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
StyleElements = [seFont, seBorder]
|
StyleElements = [seClient, seBorder]
|
||||||
OnClick = DisplayBtnClick
|
|
||||||
end
|
end
|
||||||
object AdvDisplayBtn: TSpeedButton
|
object MaintasLbl: TLabel
|
||||||
Left = 8
|
Left = 40
|
||||||
Top = 55
|
|
||||||
Width = 171
|
|
||||||
Height = 41
|
|
||||||
Anchors = [akLeft, akTop, akRight]
|
|
||||||
Caption = 'Adv. Display Settings'
|
|
||||||
Flat = True
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
|
||||||
Font.Color = clWhite
|
|
||||||
Font.Height = -13
|
|
||||||
Font.Name = 'Segoe UI'
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
ParentFont = False
|
|
||||||
OnClick = AdvDisplayBtnClick
|
|
||||||
end
|
|
||||||
object CompatibilityBtn: TSpeedButton
|
|
||||||
Left = 8
|
|
||||||
Top = 102
|
Top = 102
|
||||||
Width = 171
|
Width = 145
|
||||||
Height = 41
|
Height = 21
|
||||||
Anchors = [akLeft, akTop, akRight]
|
Caption = 'Maintain aspect ratio'
|
||||||
Caption = 'Compatibility Settings'
|
|
||||||
Flat = True
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWhite
|
Font.Color = clWindowText
|
||||||
Font.Height = -13
|
Font.Height = -16
|
||||||
Font.Name = 'Segoe UI'
|
Font.Name = 'Segoe UI'
|
||||||
Font.Style = [fsBold]
|
Font.Style = []
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
Visible = False
|
StyleElements = [seClient, seBorder]
|
||||||
OnClick = CompatibilityBtnClick
|
end
|
||||||
|
object VsyncLbl: TLabel
|
||||||
|
Left = 40
|
||||||
|
Top = 162
|
||||||
|
Width = 40
|
||||||
|
Height = 21
|
||||||
|
Margins.Top = 10
|
||||||
|
Caption = '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 = 222
|
||||||
|
Width = 168
|
||||||
|
Height = 21
|
||||||
|
Margins.Top = 10
|
||||||
|
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 = 282
|
||||||
|
Width = 186
|
||||||
|
Height = 21
|
||||||
|
Margins.Top = 10
|
||||||
|
Caption = 'Lock cursor within window'
|
||||||
|
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 = 40
|
||||||
|
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 Exclusive'
|
||||||
|
'Fullscreen'
|
||||||
|
'Borderless'
|
||||||
|
'Windowed')
|
||||||
|
end
|
||||||
|
object MaintasChk: TToggleSwitch
|
||||||
|
Left = 40
|
||||||
|
Top = 129
|
||||||
|
Width = 50
|
||||||
|
Height = 20
|
||||||
|
ShowStateCaption = False
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = MaintasChkClick
|
||||||
|
end
|
||||||
|
object VsyncChk: TToggleSwitch
|
||||||
|
Left = 40
|
||||||
|
Top = 189
|
||||||
|
Width = 50
|
||||||
|
Height = 20
|
||||||
|
ShowStateCaption = False
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = VsyncChkClick
|
||||||
|
end
|
||||||
|
object AdjmouseChk: TToggleSwitch
|
||||||
|
Left = 40
|
||||||
|
Top = 249
|
||||||
|
Width = 50
|
||||||
|
Height = 20
|
||||||
|
ShowStateCaption = False
|
||||||
|
TabOrder = 3
|
||||||
|
OnClick = AdjmouseChkClick
|
||||||
|
end
|
||||||
|
object DevmodeChk: TToggleSwitch
|
||||||
|
Left = 40
|
||||||
|
Top = 309
|
||||||
|
Width = 50
|
||||||
|
Height = 20
|
||||||
|
ShowStateCaption = False
|
||||||
|
TabOrder = 4
|
||||||
|
OnClick = DevmodeChkClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object CompatibilityPnl: TPanel
|
object CompatibilityPnl: TPanel
|
||||||
@ -2871,9 +2953,10 @@ object ConfigForm: TConfigForm
|
|||||||
Font.Style = []
|
Font.Style = []
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
OnChange = RendererCbxChange
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'Automatic'
|
'Automatic'
|
||||||
'Direct3D 9'
|
'Direct3D9'
|
||||||
'OpenGL'
|
'OpenGL'
|
||||||
'GDI')
|
'GDI')
|
||||||
end
|
end
|
||||||
@ -2884,6 +2967,7 @@ object ConfigForm: TConfigForm
|
|||||||
Height = 20
|
Height = 20
|
||||||
ShowStateCaption = False
|
ShowStateCaption = False
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
OnClick = BorderChkClick
|
||||||
end
|
end
|
||||||
object SavesettingsChk: TToggleSwitch
|
object SavesettingsChk: TToggleSwitch
|
||||||
Left = 40
|
Left = 40
|
||||||
@ -2892,6 +2976,7 @@ object ConfigForm: TConfigForm
|
|||||||
Height = 20
|
Height = 20
|
||||||
ShowStateCaption = False
|
ShowStateCaption = False
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
OnClick = SavesettingsChkClick
|
||||||
end
|
end
|
||||||
object ShaderCbx: TComboBox
|
object ShaderCbx: TComboBox
|
||||||
Left = 40
|
Left = 40
|
||||||
@ -2909,11 +2994,7 @@ object ConfigForm: TConfigForm
|
|||||||
Font.Style = []
|
Font.Style = []
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
Items.Strings = (
|
OnChange = ShaderCbxChange
|
||||||
'Automatic'
|
|
||||||
'Direct3D 9'
|
|
||||||
'OpenGL'
|
|
||||||
'GDI')
|
|
||||||
end
|
end
|
||||||
object MaxfpsChk: TToggleSwitch
|
object MaxfpsChk: TToggleSwitch
|
||||||
Left = 40
|
Left = 40
|
||||||
@ -2922,6 +3003,7 @@ object ConfigForm: TConfigForm
|
|||||||
Height = 20
|
Height = 20
|
||||||
ShowStateCaption = False
|
ShowStateCaption = False
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
|
OnClick = MaxfpsChkClick
|
||||||
end
|
end
|
||||||
object BoxingChk: TToggleSwitch
|
object BoxingChk: TToggleSwitch
|
||||||
Left = 40
|
Left = 40
|
||||||
@ -2930,144 +3012,69 @@ object ConfigForm: TConfigForm
|
|||||||
Height = 20
|
Height = 20
|
||||||
ShowStateCaption = False
|
ShowStateCaption = False
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
|
OnClick = BoxingChkClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object DisplayPnl: TPanel
|
object MenuPnl: TPanel
|
||||||
Left = 191
|
Left = 0
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 499
|
Width = 185
|
||||||
Height = 465
|
Height = 465
|
||||||
Color = clWhite
|
Color = clBlack
|
||||||
ParentBackground = False
|
ParentBackground = False
|
||||||
ShowCaption = False
|
TabOrder = 0
|
||||||
TabOrder = 1
|
DesignSize = (
|
||||||
StyleElements = [seFont, seBorder]
|
185
|
||||||
object PresentationLbl: TLabel
|
465)
|
||||||
Left = 40
|
object DisplayBtn: TSpeedButton
|
||||||
Top = 28
|
Left = 8
|
||||||
Width = 87
|
Top = 8
|
||||||
Height = 21
|
Width = 171
|
||||||
Caption = 'Presentation'
|
Height = 41
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'Display Settings'
|
||||||
|
Flat = True
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWhite
|
||||||
Font.Height = -16
|
Font.Height = -13
|
||||||
Font.Name = 'Segoe UI'
|
Font.Name = 'Segoe UI'
|
||||||
Font.Style = []
|
Font.Style = [fsBold]
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
StyleElements = [seClient, seBorder]
|
StyleElements = [seFont, seBorder]
|
||||||
|
OnClick = DisplayBtnClick
|
||||||
end
|
end
|
||||||
object AspectRatioLbl: TLabel
|
object AdvDisplayBtn: TSpeedButton
|
||||||
Left = 40
|
Left = 8
|
||||||
Top = 102
|
|
||||||
Width = 145
|
|
||||||
Height = 21
|
|
||||||
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 = 162
|
|
||||||
Width = 40
|
|
||||||
Height = 21
|
|
||||||
Margins.Top = 10
|
|
||||||
Caption = '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 = 222
|
|
||||||
Width = 168
|
|
||||||
Height = 21
|
|
||||||
Margins.Top = 10
|
|
||||||
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 = 282
|
|
||||||
Width = 186
|
|
||||||
Height = 21
|
|
||||||
Margins.Top = 10
|
|
||||||
Caption = 'Lock cursor within window'
|
|
||||||
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 = 40
|
|
||||||
Top = 55
|
Top = 55
|
||||||
Width = 185
|
Width = 171
|
||||||
Height = 29
|
Height = 41
|
||||||
BevelEdges = []
|
Anchors = [akLeft, akTop, akRight]
|
||||||
BevelInner = bvNone
|
Caption = 'Adv. Display Settings'
|
||||||
BevelOuter = bvSpace
|
Flat = True
|
||||||
Style = csDropDownList
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWhite
|
||||||
Font.Height = -16
|
Font.Height = -13
|
||||||
Font.Name = 'Segoe UI'
|
Font.Name = 'Segoe UI'
|
||||||
Font.Style = []
|
Font.Style = [fsBold]
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 0
|
OnClick = AdvDisplayBtnClick
|
||||||
Items.Strings = (
|
|
||||||
'Fullscreen Exclusive'
|
|
||||||
'Fullscreen'
|
|
||||||
'Borderless'
|
|
||||||
'Windowed')
|
|
||||||
end
|
end
|
||||||
object AspectRatioChk: TToggleSwitch
|
object CompatibilityBtn: TSpeedButton
|
||||||
Left = 40
|
Left = 8
|
||||||
Top = 129
|
Top = 102
|
||||||
Width = 50
|
Width = 171
|
||||||
Height = 20
|
Height = 41
|
||||||
ShowStateCaption = False
|
Anchors = [akLeft, akTop, akRight]
|
||||||
TabOrder = 1
|
Caption = 'Compatibility Settings'
|
||||||
end
|
Flat = True
|
||||||
object VsyncChk: TToggleSwitch
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Left = 40
|
Font.Color = clWhite
|
||||||
Top = 189
|
Font.Height = -13
|
||||||
Width = 50
|
Font.Name = 'Segoe UI'
|
||||||
Height = 20
|
Font.Style = [fsBold]
|
||||||
ShowStateCaption = False
|
ParentFont = False
|
||||||
TabOrder = 2
|
Visible = False
|
||||||
end
|
OnClick = CompatibilityBtnClick
|
||||||
object AdjmouseChk: TToggleSwitch
|
|
||||||
Left = 40
|
|
||||||
Top = 249
|
|
||||||
Width = 50
|
|
||||||
Height = 20
|
|
||||||
ShowStateCaption = False
|
|
||||||
TabOrder = 3
|
|
||||||
end
|
|
||||||
object DevmodeChk: TToggleSwitch
|
|
||||||
Left = 40
|
|
||||||
Top = 309
|
|
||||||
Width = 50
|
|
||||||
Height = 20
|
|
||||||
ShowStateCaption = False
|
|
||||||
TabOrder = 4
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -24,8 +24,8 @@ __published: // Von der IDE verwaltete Komponenten
|
|||||||
TPanel *CompatibilityPnl;
|
TPanel *CompatibilityPnl;
|
||||||
TComboBox *PresentationCbx;
|
TComboBox *PresentationCbx;
|
||||||
TLabel *PresentationLbl;
|
TLabel *PresentationLbl;
|
||||||
TLabel *AspectRatioLbl;
|
TLabel *MaintasLbl;
|
||||||
TToggleSwitch *AspectRatioChk;
|
TToggleSwitch *MaintasChk;
|
||||||
TLabel *VsyncLbl;
|
TLabel *VsyncLbl;
|
||||||
TToggleSwitch *VsyncChk;
|
TToggleSwitch *VsyncChk;
|
||||||
TLabel *AdjmouseLbl;
|
TLabel *AdjmouseLbl;
|
||||||
@ -47,7 +47,20 @@ __published: // Von der IDE verwaltete Komponenten
|
|||||||
void __fastcall DisplayBtnClick(TObject *Sender);
|
void __fastcall DisplayBtnClick(TObject *Sender);
|
||||||
void __fastcall AdvDisplayBtnClick(TObject *Sender);
|
void __fastcall AdvDisplayBtnClick(TObject *Sender);
|
||||||
void __fastcall CompatibilityBtnClick(TObject *Sender);
|
void __fastcall CompatibilityBtnClick(TObject *Sender);
|
||||||
|
void __fastcall FormCreate(TObject *Sender);
|
||||||
|
void __fastcall PresentationCbxChange(TObject *Sender);
|
||||||
|
void __fastcall MaintasChkClick(TObject *Sender);
|
||||||
|
void __fastcall VsyncChkClick(TObject *Sender);
|
||||||
|
void __fastcall AdjmouseChkClick(TObject *Sender);
|
||||||
|
void __fastcall DevmodeChkClick(TObject *Sender);
|
||||||
|
void __fastcall RendererCbxChange(TObject *Sender);
|
||||||
|
void __fastcall ShaderCbxChange(TObject *Sender);
|
||||||
|
void __fastcall MaxfpsChkClick(TObject *Sender);
|
||||||
|
void __fastcall BoxingChkClick(TObject *Sender);
|
||||||
|
void __fastcall BorderChkClick(TObject *Sender);
|
||||||
|
void __fastcall SavesettingsChkClick(TObject *Sender);
|
||||||
private: // Benutzer-Deklarationen
|
private: // Benutzer-Deklarationen
|
||||||
|
void SaveSettings();
|
||||||
public: // Benutzer-Deklarationen
|
public: // Benutzer-Deklarationen
|
||||||
__fastcall TConfigForm(TComponent* Owner);
|
__fastcall TConfigForm(TComponent* Owner);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user