diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b780698..015cae7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,9 +15,9 @@ jobs: - name: Windows os: windows-latest - # - name: Android32 - # os: ubuntu-latest - # target: Android32 + - name: Android32 + os: ubuntu-latest + target: Android32 - name: Android64 os: ubuntu-latest diff --git a/changelog.md b/changelog.md index 6ddb5a9..0d2439d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,8 @@ # BetterEdit 6 -## v6.10.0 - * Add Trigger Indicators +## v6.10.0-alpha.1 + * Add Trigger Indicators (toggleable in View Tab) + * Make Alpha's mods only Suggested instead of Recommended (so they aren't auto-installed) ## v6.9.2 * Remove limits from Z Order diff --git a/mod.json b/mod.json index d230cc2..9b7e0cf 100644 --- a/mod.json +++ b/mod.json @@ -1,6 +1,6 @@ { "geode": "4.0.1", - "version": "6.10.0", + "version": "6.10.0-alpha.1", "gd": { "win": "2.2074", "mac": "2.2074", @@ -44,22 +44,22 @@ { "id": "hjfod.backups", "version": "1.0.0", - "importance": "recommended" + "importance": "suggested" }, { "id": "alphalaneous.awesome_modifier_icons", "version": "1.0.3", - "importance": "recommended" + "importance": "suggested" }, { "id": "alphalaneous.improvedlink", "version": "1.0.5", - "importance": "recommended" + "importance": "suggested" }, { "id": "alphalaneous.improved_group_view", "version": "1.0.5", - "importance": "recommended" + "importance": "suggested" } ], "resources": { diff --git a/resources/view/v_indicators.png b/resources/view/v_indicators.png new file mode 100644 index 0000000..ad1d944 Binary files /dev/null and b/resources/view/v_indicators.png differ diff --git a/resources/view/v_indicators_all.png b/resources/view/v_indicators_all.png new file mode 100644 index 0000000..0c663e0 Binary files /dev/null and b/resources/view/v_indicators_all.png differ diff --git a/src/features/ViewTab/ViewTab.cpp b/src/features/ViewTab/ViewTab.cpp index 76826d2..aee7536 100644 --- a/src/features/ViewTab/ViewTab.cpp +++ b/src/features/ViewTab/ViewTab.cpp @@ -13,6 +13,7 @@ #include #include #include +#include using namespace geode::prelude; using namespace keybinds; @@ -121,12 +122,15 @@ struct $modify(ViewTabUI, EditorUI) { })); return toggler; } - CCMenuItemToggler* createViewToggleMSV(const char* frame, const char* modSavedValue, std::function postSet = nullptr) { + CCMenuItemToggler* createViewToggleMSV( + const char* frame, const char* modSavedValue, + bool defaultValue = false, std::function postSet = nullptr + ) { auto off = createViewToggleSpr(frame, false); auto on = createViewToggleSpr(frame, true); auto toggler = CCMenuItemToggler::create(off, on, this, menu_selector(ViewTabUI::onViewToggle)); - toggler->setUserObject("getter", CCFunction::create([modSavedValue]() { - return Mod::get()->template getSavedValue(modSavedValue); + toggler->setUserObject("getter", CCFunction::create([modSavedValue, defaultValue]() { + return Mod::get()->template getSavedValue(modSavedValue, defaultValue); })); toggler->setUserObject("setter", CCFunction::create([modSavedValue, postSet](bool enabled) { Mod::get()->setSavedValue(modSavedValue, enabled); @@ -219,7 +223,7 @@ struct $modify(ViewTabUI, EditorUI) { m_editorLayer->updatePreviewParticles(); })); btns->addObject(this->createViewToggleGV("v_shaders.png"_spr, "0158")); - btns->addObject(this->createViewToggleMSV("v_ldm.png"_spr, "hide-ldm", [this](bool) { + btns->addObject(this->createViewToggleMSV("v_ldm.png"_spr, "hide-ldm", false, [this](bool) { for (auto obj : CCArrayExt(m_editorLayer->m_objects)) { obj->updateVisibility(); } @@ -243,6 +247,14 @@ struct $modify(ViewTabUI, EditorUI) { btns->addObject(this->createViewToggleMSV("v_pos_line.png"_spr, "pos-line")); btns->addObject(this->createViewToggleGV("v_dur_line.png"_spr, "0058")); btns->addObject(this->createViewToggleGV("v_eff_line.png"_spr, "0043")); + + if (be::isProEnabled()) { + btns->addObject(this->createViewToggleMSV("v_indicators.png"_spr, "show-trigger-indicators", true)); + // todo: disable this if show-trigger-indicators is disabled + btns->addObject(this->createViewToggleMSV("v_indicators_all.png"_spr, "show-all-trigger-indicators")); + } + // todo: show trigger indicators as disabled for non-pro users + btns->addObject(this->createViewToggleGV("v_ground.png"_spr, "0037", [this](bool enable) { m_editorLayer->m_groundLayer->setVisible(enable); })); diff --git a/src/features/about/SupportPopup.cpp b/src/features/about/SupportPopup.cpp index d5de1c5..9a3a028 100644 --- a/src/features/about/SupportPopup.cpp +++ b/src/features/about/SupportPopup.cpp @@ -4,6 +4,10 @@ #include #include +#ifdef BETTEREDIT_PRO +#include +#endif + bool SupportPopup::setup(bool showDontShowAgain) { m_bgSprite->setVisible(false); diff --git a/src/utils/Pro.cpp b/src/utils/Pro.cpp index 3bdd217..14fac77 100644 --- a/src/utils/Pro.cpp +++ b/src/utils/Pro.cpp @@ -1,10 +1,17 @@ #include "Pro.hpp" #ifdef BETTEREDIT_PRO +#include +bool be::isProEnabled() { + return HAS_PRO(); +} bool be::isProUIEnabled() { return pro::isNewUIEnabled(); } #else +bool be::isProEnabled() { + return false; +} bool be::isProUIEnabled() { return false; } diff --git a/src/utils/Pro.hpp b/src/utils/Pro.hpp index 9f7f19b..b693d07 100644 --- a/src/utils/Pro.hpp +++ b/src/utils/Pro.hpp @@ -1,9 +1,6 @@ #pragma once namespace be { + bool isProEnabled(); bool isProUIEnabled(); } - -#ifdef BETTEREDIT_PRO -#include -#endif