From 582d247cb87857669a91798d9b386ffca6e8b536 Mon Sep 17 00:00:00 2001 From: surepy <24486494+surepy@users.noreply.github.com> Date: Sat, 27 Apr 2024 01:18:13 -0700 Subject: [PATCH] setting entries for chat warning once + this causes a linker error in arch, libmh_stuff is getting linked against fmt::v10 (?!) and needs investigation --- tf2_bot_detector/CMakeLists.txt | 2 +- tf2_bot_detector/UI/SettingsWindow.cpp | 9 +++++++++ tf2_bot_detector_common/CMakeLists.txt | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tf2_bot_detector/CMakeLists.txt b/tf2_bot_detector/CMakeLists.txt index ba78821b..c9206523 100644 --- a/tf2_bot_detector/CMakeLists.txt +++ b/tf2_bot_detector/CMakeLists.txt @@ -45,7 +45,7 @@ else() # in some platforms TBB_IMPORTED_TARGETS = nothing cuz ??? target_link_libraries(tf2_bot_detector PUBLIC TBB::tbb TBB::tbbmalloc) - target_link_options(tf2_bot_detector PRIVATE -ltbb -lfmt) + target_link_options(tf2_bot_detector PRIVATE -ltbb) # warnings don't exist if you pretend they don't exist target_compile_options(tf2_bot_detector PRIVATE -w) diff --git a/tf2_bot_detector/UI/SettingsWindow.cpp b/tf2_bot_detector/UI/SettingsWindow.cpp index 346cf5dd..75e28f6e 100644 --- a/tf2_bot_detector/UI/SettingsWindow.cpp +++ b/tf2_bot_detector/UI/SettingsWindow.cpp @@ -141,7 +141,15 @@ void SettingsWindow::OnDrawModerationSettings() "Looks like: \"Heads up! There are N known cheaters joining the other team! Names unknown until they fully join.\""); } + { + if (ImGui::Checkbox("Send Chat Warnings Once Per Player", &m_Settings.m_ChatWarningSendOnce)) + m_Settings.SaveFile(); + ImGui::SetHoverTooltip("Sends chat message warnings once per cheater."); + } + // Chat Warning Frequency + + ImGui::BeginDisabled((&m_Settings.m_ChatWarningSendOnce)); { if (ImGui::SliderInt("Chat Warning Frequency", &m_Settings.m_ChatWarningInterval, 2, 60, "%d seconds")) m_Settings.SaveFile(); @@ -157,6 +165,7 @@ void SettingsWindow::OnDrawModerationSettings() ); } } + ImGui::EndDisabled(); { if (ImGui::Checkbox("Custom chat message warnings", &m_Settings.m_UseCustomChatWarnings)) diff --git a/tf2_bot_detector_common/CMakeLists.txt b/tf2_bot_detector_common/CMakeLists.txt index 42e0c1d8..484196a6 100644 --- a/tf2_bot_detector_common/CMakeLists.txt +++ b/tf2_bot_detector_common/CMakeLists.txt @@ -28,6 +28,6 @@ find_package(fmt CONFIG REQUIRED) target_link_libraries(tf2_bot_detector_common PUBLIC - mh::stuff fmt::fmt + mh::stuff )