1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

add translation template

This commit is contained in:
FunkyFr3sh 2021-07-06 02:23:48 +02:00
parent 3b64ba6009
commit ef1740ad27
2 changed files with 260 additions and 198 deletions

View File

@ -6,6 +6,7 @@
#include <IniFiles.hpp>
#include <StrUtils.hpp>
#include <IOUtils.hpp>
#include <SysUtils.hpp>
#include "ConfigFormUnit.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
@ -23,6 +24,52 @@ int Minfps;
__fastcall TConfigForm::TConfigForm(TComponent* Owner)
: TForm(Owner)
{
if (SysLocale.PriLangID == LANG_ENGLISH) {
ConfigForm->Caption = "cnc-ddraw config";
DisplayBtn->Caption = "Display Settings";
AdvancedBtn->Caption = "Advanced Settings";
CompatibilityBtn->Caption = "Compatibility Settings";
PresentationLbl->Caption = "Presentation";
MaintasLbl->Caption = "Maintain aspect ratio";
VsyncLbl->Caption = "Enable VSync";
AdjmouseLbl->Caption = "Adjust mouse sensitivity";
DevmodeLbl->Caption = "Lock cursor to window / screen";
RendererLbl->Caption = "Renderer";
BorderLbl->Caption = "Show window borders in windowed mode";
SavesettingsLbl->Caption = "Remember window position and size";
ShaderLbl->Caption = "OpenGL shader";
MaxfpsLbl->Caption = "Limit frame rate";
BoxingLbl->Caption = "Enable windowboxing / integer scaling";
MaxgameticksLbl->Caption = "Limit game speed";
NoactivateappLbl->Caption = "Fix broken Alt+Tab";
HookLbl->Caption = "Fix broken windowed mode or upscaling";
MinfpsLbl->Caption = "Force high FPS / Fix stuttering on Freesync/G-Sync";
FixpitchLbl->Caption = "Fix diagonally displayed drawing issues";
NonexclusiveLbl->Caption = "Fix invisible videos / UI elements";
RendererCbx->Items->Clear();
RendererCbx->AddItem("Automatic", NULL);
RendererCbx->AddItem("Direct3D9", NULL);
RendererCbx->AddItem("OpenGL", NULL);
RendererCbx->AddItem("GDI", NULL);
PresentationCbx->Items->Clear();
PresentationCbx->AddItem("Fullscreen", NULL);
PresentationCbx->AddItem("Fullscreen Upscaled", NULL);
PresentationCbx->AddItem("Borderless", NULL);
PresentationCbx->AddItem("Windowed", NULL);
MaxgameticksCbx->Items->Clear();
MaxgameticksCbx->AddItem("No limit", NULL);
MaxgameticksCbx->AddItem("Sync with monitor refresh rate", NULL);
MaxgameticksCbx->AddItem("Emulate 60hz refresh rate monitor", NULL);
MaxgameticksCbx->AddItem("1000 ticks per second", NULL);
MaxgameticksCbx->AddItem("500 ticks per second", NULL);
MaxgameticksCbx->AddItem("60 ticks per second", NULL);
MaxgameticksCbx->AddItem("30 ticks per second", NULL);
MaxgameticksCbx->AddItem("25 ticks per second", NULL);
MaxgameticksCbx->AddItem("15 ticks per second", NULL);
}
}
void __fastcall TConfigForm::DisplayBtnClick(TObject *Sender)
@ -73,7 +120,7 @@ void __fastcall TConfigForm::FormCreate(TObject *Sender)
AdjmouseChk->State = GetBool(ini, "adjmouse", true) ? tssOn : tssOff;
DevmodeChk->State = GetBool(ini, "devmode", false) ? tssOff : tssOn;
/* Advanced Display Settings */
/* Advanced Settings */
auto renderer = LowerCase(ini->ReadString("ddraw", "renderer", "auto"));
@ -154,7 +201,6 @@ void __fastcall TConfigForm::FormCreate(TObject *Sender)
break;
}
NoactivateappChk->State = GetBool(ini, "noactivateapp", false) ? tssOn : tssOff;
Hook = ini->ReadInteger("ddraw", "hook", 4);
@ -221,9 +267,25 @@ void TConfigForm::SaveSettings()
"devmode",
DevmodeChk->State == tssOn ? "false" : "true");
/* Advanced Display Settings */
/* Advanced Settings */
switch(RendererCbx->ItemIndex) {
case 0:
ini->WriteString("ddraw", "renderer", "auto");
break;
case 1:
ini->WriteString("ddraw", "renderer", "direct3d9");
break;
case 2:
ini->WriteString("ddraw", "renderer", "opengl");
break;
case 3:
ini->WriteString("ddraw", "renderer", "gdi");
break;
default:
break;
}
ini->WriteString("ddraw", "renderer", LowerCase(RendererCbx->Text));
ini->WriteString("ddraw", "shader", ShaderCbx->Text);
int maxfps = Maxfps == 0 ? -1 : Maxfps;

View File

@ -10,7 +10,7 @@ object ConfigForm: TConfigForm
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Name = 'Segoe UI'
Font.Style = []
Icon.Data = {
000001000600101000000100200068040000660000002020000001002000A810
@ -2682,199 +2682,6 @@ object ConfigForm: TConfigForm
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object AdvancedPnl: TPanel
Left = 191
Top = 8
Width = 499
Height = 465
BevelOuter = bvNone
Color = clWhite
ParentBackground = False
ShowCaption = False
TabOrder = 2
Visible = False
StyleElements = [seFont, seBorder]
object RendererLbl: TLabel
Left = 40
Top = 28
Width = 64
Height = 21
Caption = 'Renderer'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
ParentFont = False
StyleElements = [seClient, seBorder]
end
object SavesettingsLbl: TLabel
Left = 40
Top = 386
Width = 256
Height = 21
Margins.Top = 18
Caption = 'Remember window position and size'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
ParentFont = False
StyleElements = [seClient, seBorder]
end
object ShaderLbl: TLabel
Left = 40
Top = 105
Width = 110
Height = 21
Margins.Top = 18
Caption = 'OpenGL Shader'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
ParentFont = False
StyleElements = [seClient, seBorder]
end
object MaxfpsLbl: TLabel
Left = 40
Top = 182
Width = 111
Height = 21
Margins.Top = 18
Caption = 'Limit frame rate'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
ParentFont = False
StyleElements = [seClient, seBorder]
end
object BorderLbl: TLabel
Left = 40
Top = 318
Width = 293
Height = 21
Margins.Top = 18
Caption = 'Show window borders in windowed mode'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
ParentFont = False
StyleElements = [seClient, seBorder]
end
object BoxingLbl: TLabel
Left = 40
Top = 250
Width = 220
Height = 21
Margins.Top = 18
Caption = 'Windowboxing / Integer scaling'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
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 = 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 = 0
OnChange = RendererCbxChange
Items.Strings = (
'Automatic'
'Direct3D9'
'OpenGL'
'GDI')
end
object BorderChk: TToggleSwitch
Left = 40
Top = 345
Width = 50
Height = 20
ShowStateCaption = False
TabOrder = 1
OnClick = BorderChkClick
end
object SavesettingsChk: TToggleSwitch
Left = 40
Top = 413
Width = 50
Height = 20
ShowStateCaption = False
TabOrder = 2
OnClick = SavesettingsChkClick
end
object ShaderCbx: TComboBox
Left = 41
Top = 132
Width = 425
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 = 3
OnChange = ShaderCbxChange
end
object MaxfpsChk: TToggleSwitch
Left = 40
Top = 209
Width = 50
Height = 20
ShowStateCaption = False
TabOrder = 4
OnClick = MaxfpsChkClick
end
object BoxingChk: TToggleSwitch
Left = 40
Top = 277
Width = 50
Height = 20
ShowStateCaption = False
TabOrder = 5
OnClick = BoxingChkClick
end
end
object DisplayPnl: TPanel
Left = 191
Top = 8
@ -3210,6 +3017,199 @@ object ConfigForm: TConfigForm
OnClick = NonexclusiveChkClick
end
end
object AdvancedPnl: TPanel
Left = 191
Top = 8
Width = 499
Height = 465
BevelOuter = bvNone
Color = clWhite
ParentBackground = False
ShowCaption = False
TabOrder = 2
Visible = False
StyleElements = [seFont, seBorder]
object RendererLbl: TLabel
Left = 40
Top = 28
Width = 64
Height = 21
Caption = 'Renderer'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
ParentFont = False
StyleElements = [seClient, seBorder]
end
object SavesettingsLbl: TLabel
Left = 40
Top = 386
Width = 256
Height = 21
Margins.Top = 18
Caption = 'Remember window position and size'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
ParentFont = False
StyleElements = [seClient, seBorder]
end
object ShaderLbl: TLabel
Left = 40
Top = 105
Width = 108
Height = 21
Margins.Top = 18
Caption = 'OpenGL shader'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
ParentFont = False
StyleElements = [seClient, seBorder]
end
object MaxfpsLbl: TLabel
Left = 40
Top = 182
Width = 111
Height = 21
Margins.Top = 18
Caption = 'Limit frame rate'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
ParentFont = False
StyleElements = [seClient, seBorder]
end
object BorderLbl: TLabel
Left = 40
Top = 318
Width = 293
Height = 21
Margins.Top = 18
Caption = 'Show window borders in windowed mode'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
ParentFont = False
StyleElements = [seClient, seBorder]
end
object BoxingLbl: TLabel
Left = 40
Top = 250
Width = 267
Height = 21
Margins.Top = 18
Caption = 'Enable windowboxing / integer scaling'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
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 = 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 = 0
OnChange = RendererCbxChange
Items.Strings = (
'Automatic'
'Direct3D9'
'OpenGL'
'GDI')
end
object BorderChk: TToggleSwitch
Left = 40
Top = 345
Width = 50
Height = 20
ShowStateCaption = False
TabOrder = 1
OnClick = BorderChkClick
end
object SavesettingsChk: TToggleSwitch
Left = 40
Top = 413
Width = 50
Height = 20
ShowStateCaption = False
TabOrder = 2
OnClick = SavesettingsChkClick
end
object ShaderCbx: TComboBox
Left = 41
Top = 132
Width = 425
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 = 3
OnChange = ShaderCbxChange
end
object MaxfpsChk: TToggleSwitch
Left = 40
Top = 209
Width = 50
Height = 20
ShowStateCaption = False
TabOrder = 4
OnClick = MaxfpsChkClick
end
object BoxingChk: TToggleSwitch
Left = 40
Top = 277
Width = 50
Height = 20
ShowStateCaption = False
TabOrder = 5
OnClick = BoxingChkClick
end
end
object MenuPnl: TPanel
Left = 0
Top = 8