summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/NetPlay/ClickBlurLabel.h
blob: 8f2d42ac585c6b9713e2dc5051e149051defba6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2025 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <QLabel>
#include <QStackedWidget>
#include <QWidget>

class ClickBlurLabel final : public QStackedWidget
{
  Q_OBJECT
public:
  explicit ClickBlurLabel(QWidget* parent = nullptr);

  void setText(const QString& text);

  QString text() const { return m_normal_label->text(); }

protected:
  void mousePressEvent(QMouseEvent* event) override;

private:
  // Generates text that "looks correct" but is actually gibberish.
  static QString GenerateBlurredText(const QString& text);

  QLabel* m_normal_label;
  QLabel* m_blurred_label;
};