Options redesign; Rumble intensity; Dark fix; Remove OGL patches

This commit is contained in:
nastys
2021-08-11 18:25:15 +02:00
parent 389d8f2b5c
commit 3b0338a5ba
11 changed files with 773 additions and 534 deletions
@@ -338,6 +338,44 @@ public:
};
class OptionMetaSectionLabel : public ConfigOptionBase
{
public:
OptionMetaSectionLabel(LPCWSTR friendlyName)
{
_friendlyName = friendlyName;
}
virtual int AddToPanel(Panel^ panel, unsigned int left, unsigned int top, ToolTip^ tooltip)
{
Label^ lab = gcnew Label();
lab->Text = i18n::GetStringFallback(gcnew String(_friendlyName));
lab->Left = left + 2;
lab->Top = top;
lab->Font = gcnew System::Drawing::Font(lab->Font->Name, 12.0f, System::Drawing::FontStyle::Bold);
lab->AutoSize = true;
Form^ RootForm = panel->FindForm();
float ScaleWidth = 1.0f;
float ScaleHeight = 1.0f;
if (RootForm)
{
Drawing::SizeF CurrentScaleSize = RootForm->CurrentAutoScaleDimensions;
ScaleWidth = CurrentScaleSize.Width / BaseScaleSize;
ScaleHeight = CurrentScaleSize.Height / BaseScaleSize;
}
lab->Scale(ScaleWidth, ScaleHeight);
panel->Controls->Add(lab);
mainControlHandle = lab->Handle;
int ControlHeight = lab->Font->Height / ScaleHeight;
return ControlHeight + ControlSpacing;
}
};
class BooleanOption : public ConfigOptionBase
{
public: