Skip to content

Commit

Permalink
more pro stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Jul 30, 2024
1 parent 38212ed commit 6d26c70
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ jobs:
- uses: actions/checkout@v4

- name: Install OpenSSL
run: sudo apt-get install libssl-dev
run: |
sudo apt-get install libssl-dev
sudo apt install pkg-config
- name: Checkout Pro
uses: actions/checkout@v4
Expand Down
25 changes: 15 additions & 10 deletions src/features/about/AboutBEPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,25 +139,26 @@ bool AboutBEPopup::setup() {
menu->setContentSize({ 325, 100 });
menu->ignoreAnchorPointForPosition(false);

for (auto pair : std::initializer_list<std::pair<const char*, SEL_MenuHandler>> {
{ "Report a Bug", menu_selector(AboutBEPopup::onReportBug) },
{ "Suggest a Feature", menu_selector(AboutBEPopup::onSuggestFeature) },
{ "Changelog", menu_selector(AboutBEPopup::onChangelog) },
{ "Special Thanks", menu_selector(AboutBEPopup::onSpecialThanks) },
{ "Support BE", menu_selector(AboutBEPopup::onSupport) },
{ "Supporters", menu_selector(AboutBEPopup::onSupporters) },
for (auto pair : std::initializer_list<std::tuple<const char*, const char*, SEL_MenuHandler>> {
{ "report-bug-btn", "Report a Bug", menu_selector(AboutBEPopup::onReportBug) },
{ "suggest-btn", "Suggest a Feature", menu_selector(AboutBEPopup::onSuggestFeature) },
{ "changelog-btn", "Changelog", menu_selector(AboutBEPopup::onChangelog) },
{ "special-thanks-btn", "Special Thanks", menu_selector(AboutBEPopup::onSpecialThanks) },
{ "support-btn", "Support BE", menu_selector(AboutBEPopup::onSupport) },
{ "supporters-btn", "Supporters", menu_selector(AboutBEPopup::onSupporters) },
}) {
auto spr = ButtonSprite::create(pair.first, "goldFont.fnt", "GJ_button_05.png", .8f);
auto spr = ButtonSprite::create(std::get<1>(pair), "goldFont.fnt", "GJ_button_05.png", .8f);
spr->setScale(.55f);
auto btn = CCMenuItemSpriteExtra::create(spr, this, pair.second);
auto btn = CCMenuItemSpriteExtra::create(spr, this, std::get<2>(pair));
btn->setID(std::get<0>(pair));
menu->addChild(btn);
}

menu->setLayout(RowLayout::create()->setGrowCrossAxis(true));
m_mainLayer->addChildAtPosition(menu, Anchor::Center, ccp(0, -60));

#ifdef BETTEREDIT_PRO
pro::addAboutPopupStuff(m_mainLayer);
pro::addAboutPopupStuff(this);
#endif

// BE links
Expand Down Expand Up @@ -194,6 +195,10 @@ bool AboutBEPopup::setup() {
return true;
}

void AboutBEPopup::onClose(CCObject* sender) {
PopupWithCorners::onClose(sender);
}

void AboutBEPopup::onSupport(CCObject*) {
SupportPopup::create(false)->show();
// openSupportPopup(Mod::get());
Expand Down
1 change: 1 addition & 0 deletions src/features/about/AboutBEPopup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class AboutBEPopup : public PopupWithCorners<> {
public:
static AboutBEPopup* create();

void onClose(CCObject* sender) override;
void onSettings(CCObject*);
void onReportBug(CCObject*);
void onSuggestFeature(CCObject*);
Expand Down

0 comments on commit 6d26c70

Please sign in to comment.