This repository has been archived by the owner on Feb 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 07505b1
Showing
41 changed files
with
7,021 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
QT += core gui | ||
|
||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets | ||
|
||
CONFIG += c++17 | ||
|
||
DEFINES += CURL_STATICLIB | ||
|
||
SOURCES += \ | ||
aboutdialog.cpp \ | ||
clickablelabel.cpp \ | ||
gameinfo.cpp \ | ||
httpsmanager.cpp \ | ||
main.cpp \ | ||
widget.cpp | ||
|
||
HEADERS += \ | ||
aboutdialog.h \ | ||
clickablelabel.h \ | ||
gameinfo.h \ | ||
httpsmanager.h \ | ||
widget.h | ||
|
||
FORMS += \ | ||
aboutdialog.ui \ | ||
widget.ui \ | ||
widget.ui | ||
|
||
LIBS += -L$$PWD/libs/lib/ -llibcurl_a | ||
PRE_TARGETDEPS += $$PWD/libs/lib/libcurl_a.lib | ||
INCLUDEPATH += $$PWD/libs/include | ||
DEPENDPATH += $$PWD/libs/include | ||
|
||
VERSION = 1.0.0.0 | ||
RC_ICONS = logo.ico | ||
QMAKE_TARGET_PRODUCT = LeagueTeamBoost | ||
QMAKE_TARGET_COMPANY = Mario & ButterCookies | ||
QMAKE_TARGET_DESCRIPTION = League of Legends Team Boost | ||
QMAKE_TARGET_COPYRIGHT = Mario & ButterCookies | ||
|
||
QMAKE_CXXFLAGS_RELEASE = -O2 | ||
|
||
RESOURCES += \ | ||
resources.qrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# LeagueTeamBoost | ||
|
||
## 英雄联盟一键解锁战斗福利 | ||
利用League of legends LCU API解锁无限火力/无限乱斗模式的战斗福利。 | ||
|
||
--- | ||
## API | ||
`/lol-champ-select/v1/team-boost/purchase` | ||
|
||
--- | ||
|
||
## 官方文档 | ||
https://developer.riotgames.com/docs/lol | ||
|
||
--- | ||
|
||
本工具由Mario与ButterCookies共同维护,使用Qt作为主框架,主体语言C++。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#include "aboutdialog.h" | ||
#include "ui_aboutdialog.h" | ||
|
||
#include <dwmapi.h> | ||
#include <QDesktopServices> | ||
#include <QUrl> | ||
|
||
AboutDialog::AboutDialog(QWidget *parent) | ||
: QDialog(parent) | ||
, ui(new Ui::AboutDialog) | ||
, m_DwmWidth(0) | ||
{ | ||
ui->setupUi(this); | ||
|
||
/* 窗口风格 */ | ||
this->setFixedSize(this->size()); | ||
this->setWindowFlags((this->windowFlags() & ~Qt::WindowMinMaxButtonsHint) | Qt::FramelessWindowHint); | ||
|
||
/* 窗口阴影 */ | ||
BOOL bEnable = false; | ||
::DwmIsCompositionEnabled(&bEnable); | ||
if (bEnable) { | ||
m_DwmWidth = 7; | ||
DWMNCRENDERINGPOLICY ncrp = DWMNCRP_ENABLED; | ||
::DwmSetWindowAttribute((HWND)winId(), DWMWA_NCRENDERING_POLICY, &ncrp, sizeof(ncrp)); | ||
MARGINS margins = { -1 }; | ||
::DwmExtendFrameIntoClientArea((HWND)winId(), &margins); | ||
} | ||
|
||
/* 信号槽 */ | ||
connect(ui->btn_ok, &QPushButton::clicked, this, &AboutDialog::hide); | ||
connect(ui->btn_github, &QPushButton::clicked, this, [=] () { | ||
QDesktopServices::openUrl(QUrl("https://github.com/LeaguePrank/LeagueTeamBoost")); | ||
}); | ||
connect(ui->btn_bilibili, &QPushButton::clicked, this, [=] () { | ||
QDesktopServices::openUrl(QUrl("https://space.bilibili.com/248303677")); | ||
QDesktopServices::openUrl(QUrl("https://space.bilibili.com/14671179")); | ||
}); | ||
} | ||
|
||
AboutDialog::~AboutDialog() | ||
{ | ||
delete ui; | ||
} | ||
|
||
void AboutDialog::showEvent(QShowEvent *e) | ||
{ | ||
Q_UNUSED(e) | ||
int x = parentWidget()->x() + (parentWidget()->width() / 2); | ||
int y = parentWidget()->y() + (parentWidget()->height() / 2); | ||
x -= this->width() / 2 + m_DwmWidth; // m_DwmWidth = 7 可能是dwm的宽度?需要再研究 | ||
y -= this->height() / 2; | ||
move(x, y); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef ABOUTDIALOG_H | ||
#define ABOUTDIALOG_H | ||
|
||
#include <QDialog> | ||
#include <QShowEvent> | ||
|
||
namespace Ui { | ||
class AboutDialog; | ||
} | ||
|
||
class AboutDialog : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit AboutDialog(QWidget *parent = nullptr); | ||
~AboutDialog(); | ||
|
||
protected: | ||
void showEvent(QShowEvent *e); | ||
|
||
private: | ||
Ui::AboutDialog *ui; | ||
|
||
int m_DwmWidth; | ||
}; | ||
|
||
#endif // ABOUTDIALOG_H |
Oops, something went wrong.