launcher: work on plugin enumeration

This commit is contained in:
somewhatlurker
2019-08-30 00:16:34 +10:00
parent bb6f857d46
commit 2e2ecb9543
6 changed files with 275 additions and 150 deletions
+50 -3
View File
@@ -114,16 +114,34 @@ namespace Launcher {
for (ConfigOptionBase* component : componentsArray)
{
component->hasChanged = ConfigHasChanged;
//componentsY += component->AddToPanel(panel_Components, 12, componentsY, toolTip1);
componentsY += component->AddToPanel(panel_Components, 12, componentsY, toolTip1);
}
this->panel_Components->ResumeLayout(false);
this->panel_Components->PerformLayout();
this->panel_Plugins->SuspendLayout();
int pluginsY = 3;
for (PluginInfo &plugin : AllPlugins)
{
Label^ lbl = gcnew Label;
lbl->AutoSize = true;
lbl->Text = gcnew String(plugin.name.c_str());
lbl->Left = 12;
lbl->Top = pluginsY;
panel_Plugins->Controls->Add(lbl);
toolTip1->SetToolTip(lbl, gcnew String(plugin.description.c_str()));
pluginsY += lbl->Font->Height + 6;
}
this->panel_Plugins->ResumeLayout(false);
this->panel_Plugins->PerformLayout();
using namespace PluginConfig;
//tabPage_Components->Controls->Add(MakePanel(256, 256, testcfgconfigopts, toolTip1));
tabPage_Components->Controls->Add(MakePanel(256, 100, std::vector<ConfigOptionBase*>(&componentsArray[0], &componentsArray[12]), toolTip1));
//tabPage_Components->Controls->Add(MakePanel(256, 100, std::vector<ConfigOptionBase*>(&componentsArray[0], &componentsArray[13]), toolTip1));
// trick Optimus into switching to the NVIDIA GPU
@@ -183,6 +201,8 @@ namespace Launcher {
private: System::Windows::Forms::Panel^ panel_Components;
private: System::Windows::Forms::TabPage^ tabPage_Patches;
private: System::Windows::Forms::Panel^ panel_Patches;
private: System::Windows::Forms::TabPage^ tabPage_Plugins;
private: System::Windows::Forms::Panel^ panel_Plugins;
private: System::Windows::Forms::Button^ button_Discord;
private: System::Windows::Forms::Button^ button_github;
private: System::Windows::Forms::TabPage^ tabPage_Playerdata;
@@ -238,6 +258,8 @@ namespace Launcher {
this->panel_Playerdata = (gcnew System::Windows::Forms::Panel());
this->tabPage_Components = (gcnew System::Windows::Forms::TabPage());
this->panel_Components = (gcnew System::Windows::Forms::Panel());
this->tabPage_Plugins = (gcnew System::Windows::Forms::TabPage());
this->panel_Plugins = (gcnew System::Windows::Forms::Panel());
this->button_Discord = (gcnew System::Windows::Forms::Button());
this->button_github = (gcnew System::Windows::Forms::Button());
this->toolTip1 = (gcnew System::Windows::Forms::ToolTip(this->components));
@@ -249,6 +271,7 @@ namespace Launcher {
this->tabPage_Patches->SuspendLayout();
this->tabPage_Playerdata->SuspendLayout();
this->tabPage_Components->SuspendLayout();
this->tabPage_Plugins->SuspendLayout();
this->SuspendLayout();
//
// button_Launch
@@ -306,6 +329,7 @@ namespace Launcher {
this->tabControl->Controls->Add(this->tabPage_Patches);
this->tabControl->Controls->Add(this->tabPage_Playerdata);
this->tabControl->Controls->Add(this->tabPage_Components);
this->tabControl->Controls->Add(this->tabPage_Plugins);
this->tabControl->Location = System::Drawing::Point(0, 0);
this->tabControl->Margin = System::Windows::Forms::Padding(4);
this->tabControl->Name = L"tabControl";
@@ -409,7 +433,7 @@ namespace Launcher {
//
this->tabPage_Components->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(64)),
static_cast<System::Int32>(static_cast<System::Byte>(64)), static_cast<System::Int32>(static_cast<System::Byte>(64)));
//this->tabPage_Components->Controls->Add(this->panel_Components);
this->tabPage_Components->Controls->Add(this->panel_Components);
this->tabPage_Components->Location = System::Drawing::Point(4, 32);
this->tabPage_Components->Margin = System::Windows::Forms::Padding(4);
this->tabPage_Components->Name = L"tabPage_Components";
@@ -427,6 +451,28 @@ namespace Launcher {
this->panel_Components->Size = System::Drawing::Size(429, 425);
this->panel_Components->TabIndex = 0;
//
// tabPage_Plugins
//
this->tabPage_Plugins->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(64)),
static_cast<System::Int32>(static_cast<System::Byte>(64)), static_cast<System::Int32>(static_cast<System::Byte>(64)));
this->tabPage_Plugins->Controls->Add(this->panel_Plugins);
this->tabPage_Plugins->Location = System::Drawing::Point(4, 32);
this->tabPage_Plugins->Margin = System::Windows::Forms::Padding(4);
this->tabPage_Plugins->Name = L"tabPage_Plugins";
this->tabPage_Plugins->Padding = System::Windows::Forms::Padding(4);
this->tabPage_Plugins->Size = System::Drawing::Size(433, 429);
this->tabPage_Plugins->TabIndex = 3;
this->tabPage_Plugins->Text = L"Plugins";
//
// panel_Plugins
//
this->panel_Plugins->AutoScroll = true;
this->panel_Plugins->Location = System::Drawing::Point(0, 0);
this->panel_Plugins->Margin = System::Windows::Forms::Padding(4);
this->panel_Plugins->Name = L"panel_Plugins";
this->panel_Plugins->Size = System::Drawing::Size(429, 425);
this->panel_Plugins->TabIndex = 0;
//
// button_Discord
//
this->button_Discord->BackColor = System::Drawing::Color::Transparent;
@@ -511,6 +557,7 @@ namespace Launcher {
this->tabPage_Patches->ResumeLayout(false);
this->tabPage_Playerdata->ResumeLayout(false);
this->tabPage_Components->ResumeLayout(false);
this->tabPage_Plugins->ResumeLayout(false);
this->ResumeLayout(false);
}