Skip to content

Commit

Permalink
Merge pull request #37 from RaidcoreGG/dev
Browse files Browse the repository at this point in the history
fix arc plugins + unofficial extras in arc integration
  • Loading branch information
DeltaGW2 authored Apr 16, 2024
2 parents ec8935d + 077937d commit efb4303
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/GUI/GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ namespace GUI
{
/* internal forward declarations */
void OnMumbleIdentityChanged(void* aEventArgs);
void OnLanguageChanged(void* aEventArgs);
void Setup();

std::mutex Mutex;
Expand Down Expand Up @@ -453,6 +454,30 @@ namespace GUI
}
}

void OnLanguageChanged(void* aEventArgs)
{
int langId = *(int*)aEventArgs;

switch (langId)
{
case 0:
Language.SetLanguage("English");
break;
case 2:
Language.SetLanguage("Français");
break;
case 3:
Language.SetLanguage("Deutsch");
break;
case 4:
Language.SetLanguage(u8"Español");
break;
/*case 5:
Language.SetLanguage(u8"Chinese");
break;*/
}
}

void Setup()
{
ImGuiIO& io = ImGui::GetIO();
Expand Down Expand Up @@ -696,6 +721,7 @@ namespace GUI
io.Fonts->Build();

Events::Subscribe(EV_MUMBLE_IDENTITY_UPDATED, OnMumbleIdentityChanged);
Events::Subscribe("EV_UNOFFICIAL_EXTRAS_LANGUAGE_CHANGED", OnLanguageChanged);
OnMumbleIdentityChanged(nullptr);

/* set up and add windows */
Expand Down
7 changes: 7 additions & 0 deletions src/Loader/ArcDPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ namespace ArcDPS
}

IsBridgeDeployed = true;

std::thread checkPlugins([]()
{
Sleep(5000);
ArcDPS::GetPlugins();
});
checkPlugins.detach();
}

void GetPlugins()
Expand Down
Binary file modified src/Resources/bin64/arcdps_integration64.dll
Binary file not shown.

0 comments on commit efb4303

Please sign in to comment.