Added vip and unvip buttons (#1996)
Co-authored-by: fourtf <tf.four@gmail.com>
This commit is contained in:
@@ -186,6 +186,12 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically)
|
||||
auto unmod = user.emplace<Button>(this);
|
||||
unmod->setPixmap(getResources().buttons.unmod);
|
||||
unmod->setScaleIndependantSize(30, 30);
|
||||
auto vip = user.emplace<Button>(this);
|
||||
vip->setPixmap(getResources().buttons.vip);
|
||||
vip->setScaleIndependantSize(30, 30);
|
||||
auto unvip = user.emplace<Button>(this);
|
||||
unvip->setPixmap(getResources().buttons.unvip);
|
||||
unvip->setScaleIndependantSize(30, 30);
|
||||
|
||||
user->addStretch(1);
|
||||
|
||||
@@ -203,6 +209,12 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically)
|
||||
QObject::connect(unmod.getElement(), &Button::leftClicked, [this] {
|
||||
this->channel_->sendMessage("/unmod " + this->userName_);
|
||||
});
|
||||
QObject::connect(vip.getElement(), &Button::leftClicked, [this] {
|
||||
this->channel_->sendMessage("/vip " + this->userName_);
|
||||
});
|
||||
QObject::connect(unvip.getElement(), &Button::leftClicked, [this] {
|
||||
this->channel_->sendMessage("/unvip " + this->userName_);
|
||||
});
|
||||
|
||||
// userstate
|
||||
this->userStateChanged_.connect([this, mod, unmod]() mutable {
|
||||
|
||||
Reference in New Issue
Block a user