mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 05:43:42 -07:00
Update mod_menu.cpp
This commit is contained in:
parent
2103894367
commit
212799cd16
1 changed files with 6 additions and 1 deletions
|
@ -117,7 +117,7 @@ void UpdateModFiles(bool init = false) {
|
|||
void AfterModChange() {
|
||||
SaveEnabledModsCVarValue();
|
||||
gfx_texture_cache_clear();
|
||||
SOH::SkeletonPatcher::UpdateSkeletons();
|
||||
SOH::SkeletonPatcher::ClearSkeletons();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
}
|
||||
|
||||
|
@ -160,11 +160,16 @@ void DrawDisabledMods() {
|
|||
}
|
||||
}
|
||||
|
||||
const std::string updateButtonTooltip = "Re-check the mods folder for new files";
|
||||
|
||||
void ModMenuWindow::DrawElement() {
|
||||
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
|
||||
|
||||
if (UIWidgets::Button("Update", UIWidgets::ButtonOptions().Size(ImVec2(250.0f, 0.0f)).Color(THEME_COLOR))) {
|
||||
UIWidgets::Tooltip(updateButtonTooltip.c_str());
|
||||
UpdateModFiles();
|
||||
} else {
|
||||
UIWidgets::Tooltip(updateButtonTooltip.c_str());
|
||||
}
|
||||
|
||||
if (ImGui::BeginTable("tableMods", 2, ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue