From 98cc710b4aaf3f0f7607243db60213d57740cb09 Mon Sep 17 00:00:00 2001 From: WarmUpTill <19472752+WarmUpTill@users.noreply.github.com> Date: Wed, 3 Dec 2025 14:00:01 +0100 Subject: [PATCH] Add tooltip to "verify timestamps" option --- data/locale/en-US.ini | 1 + plugins/twitch/token.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/data/locale/en-US.ini b/data/locale/en-US.ini index d3c2761b..71624deb 100644 --- a/data/locale/en-US.ini +++ b/data/locale/en-US.ini @@ -1608,6 +1608,7 @@ AdvSceneSwitcher.twitchToken.user.whispers.manage="Manage user's whispers." AdvSceneSwitcher.twitchToken.chat.read="View live stream chat messages." AdvSceneSwitcher.twitchToken.chat.edit="Send live stream chat messages." AdvSceneSwitcher.twitchToken.validateTimestamps="Validate timestamps of received Twitch event messages." +AdvSceneSwitcher.twitchToken.validateTimestamps.tooltip="Verifies that incoming Twitch messages have valid timestamps to prevent replayed or spoofed messages.\nDisabling this won’t affect normal functionality, and you can try turning it off if you experience issues with the Twitch connection." AdvSceneSwitcher.twitchToken.warnIfInvalid="Display warning if the token expired or is invalid." AdvSceneSwitcher.twitchToken.warnIfInvalid.doNotShowAgain="Don't show again for this connection" AdvSceneSwitcher.twitchToken.warnIfInvalid.message="The Twitch connection \"%1\" is invalid.\nOpen connection settings or ignore?" diff --git a/plugins/twitch/token.cpp b/plugins/twitch/token.cpp index 912c1713..d0ba5fc6 100644 --- a/plugins/twitch/token.cpp +++ b/plugins/twitch/token.cpp @@ -1,6 +1,7 @@ #include "token.hpp" #include "twitch-helpers.hpp" +#include #include #include #include @@ -547,11 +548,17 @@ TwitchTokenSettingsDialog::TwitchTokenSettingsDialog( scrollArea->setWidgetResizable(true); scrollArea->setFrameShape(QFrame::NoFrame); + auto timestampsLayout = new QHBoxLayout(); + timestampsLayout->addWidget(_validateTimestamps); + auto timestampHelp = new HelpIcon(obs_module_text( + "AdvSceneSwitcher.twitchToken.validateTimestamps.tooltip")); + timestampsLayout->addWidget(timestampHelp); + auto contentWidget = new QWidget(scrollArea); auto layout = new QVBoxLayout(contentWidget); layout->addLayout(_generalSettingsGrid); layout->addWidget(optionsBox); - layout->addWidget(_validateTimestamps); + layout->addLayout(timestampsLayout); layout->addWidget(_warnIfInvalid); layout->setContentsMargins(0, 0, 0, 0); scrollArea->setWidget(contentWidget);