Added vip and unvip buttons (#1996)
Co-authored-by: fourtf <tf.four@gmail.com>
This commit is contained in:
@@ -25,8 +25,10 @@ Resources2::Resources2()
|
||||
this->buttons.trashCan = QPixmap(":/buttons/trashCan.png");
|
||||
this->buttons.unban = QPixmap(":/buttons/unban.png");
|
||||
this->buttons.unmod = QPixmap(":/buttons/unmod.png");
|
||||
this->buttons.unvip = QPixmap(":/buttons/unvip.png");
|
||||
this->buttons.update = QPixmap(":/buttons/update.png");
|
||||
this->buttons.updateError = QPixmap(":/buttons/updateError.png");
|
||||
this->buttons.vip = QPixmap(":/buttons/vip.png");
|
||||
this->error = QPixmap(":/error.png");
|
||||
this->icon = QPixmap(":/icon.png");
|
||||
this->pajaDank = QPixmap(":/pajaDank.png");
|
||||
|
||||
@@ -32,8 +32,10 @@ public:
|
||||
QPixmap trashCan;
|
||||
QPixmap unban;
|
||||
QPixmap unmod;
|
||||
QPixmap unvip;
|
||||
QPixmap update;
|
||||
QPixmap updateError;
|
||||
QPixmap vip;
|
||||
} buttons;
|
||||
QPixmap error;
|
||||
QPixmap icon;
|
||||
|
||||
@@ -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