Skip to content

Commit

Permalink
setting entries for chat warning once
Browse files Browse the repository at this point in the history
+ this causes a linker error in arch, libmh_stuff is getting linked against fmt::v10 (?!) and needs investigation
  • Loading branch information
surepy committed Apr 27, 2024
1 parent 997bf2c commit 582d247
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tf2_bot_detector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions tf2_bot_detector/UI/SettingsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -157,6 +165,7 @@ void SettingsWindow::OnDrawModerationSettings()
);
}
}
ImGui::EndDisabled();

{
if (ImGui::Checkbox("Custom chat message warnings", &m_Settings.m_UseCustomChatWarnings))
Expand Down
2 changes: 1 addition & 1 deletion tf2_bot_detector_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ find_package(fmt CONFIG REQUIRED)

target_link_libraries(tf2_bot_detector_common
PUBLIC
mh::stuff
fmt::fmt
mh::stuff
)

0 comments on commit 582d247

Please sign in to comment.