From 8e3c7a54dd072d56157e73a154cff552ee27af9d Mon Sep 17 00:00:00 2001 From: HJfod <60038575+HJfod@users.noreply.github.com> Date: Sun, 1 Dec 2024 00:53:32 +0200 Subject: [PATCH] trigger indicators + metadata changes --- .github/workflows/build.yml | 6 +++--- changelog.md | 5 +++-- mod.json | 10 +++++----- resources/view/v_indicators.png | Bin 0 -> 5434 bytes resources/view/v_indicators_all.png | Bin 0 -> 4794 bytes src/features/ViewTab/ViewTab.cpp | 20 ++++++++++++++++---- src/features/about/SupportPopup.cpp | 4 ++++ src/utils/Pro.cpp | 7 +++++++ src/utils/Pro.hpp | 5 +---- 9 files changed, 39 insertions(+), 18 deletions(-) create mode 100644 resources/view/v_indicators.png create mode 100644 resources/view/v_indicators_all.png 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 0000000000000000000000000000000000000000..ad1d944f2c79847e550c14b05200df9bb29c6671 GIT binary patch literal 5434 zcmY*dWmH>TvkvY7iWEt4DU>$2dx7E(#UU?N+zS+!LUDHs#Y@o=w8c^yq_}%1?!0)= zn||NDKklscoOx#U?Af!{*|X1CJ4Rdc4GAF~Apig%QBhXVMQbxOZ1Hi?&+gnvDYU}y z(tRTjs2u_Aq77_&ISn}gpdpFq4uXTW3EY*9y#N3p{4X#NZk0A@C$+btk++_kowqN< z(-xo&ad7p1rKzaTB=m~!D&i^)9noZKq++L{!VSPj8#n+u3>*LknyI2e|G)fiEzdEq z{^Q3)b3P1A01&NB&~S*x{*V71n*S9mH2%*2KmGrf1YiLG$#?*4^f)iS051mgzd8TL z<3RtLCl$^A3MM)W=6@n}#YEBUe`oRW^8OvQF6H>Ct9kz$0H8QjQIOO3vp6&-NT*WF z4AQ64munc1#u1Ebis+k|3vF#|ntaX_7wh~A&!N;Du|C$^UD*#30b+h0@#bP}1S!(E zm{OAIfZjRKc~D{~($i2!yOhrrLkZcoR{A&JY$bK+>lmC?wR;?)QqYnk!fNq7KK{3* zqAH%Tl}|mpAI=>0!A5xjc8m*B1et~WP!Hh2exXBb27HAX0!RwuCMd*7ije5`m9xlK z{fXgp=+*<4&4c!_g8@VBL|<_&#-1mtsNe;JJ>ov(6F{b3zl+o+DhA5qhDXEk5oDJv zAcaq1$2}6=kC^_<+&mNA>{j|DHQWZ%ZW|(d0VoSD9hHCSQA!sn(%c#op9itH1i_9D z7htYvLnevup}fnbc_y!hrZL2aJp!yZdpKV|-%TRoQ%^B6Jlr)901s&&sLZW9OhmIK4KR3}1B28<8_ zi!mr?Bi^}I;AeIHip?g2%83nHv684EcRlx0$~lJbOyl@Vz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@*mD zkY(y<z?5H#a9R2IYL)uIG}Krr6)hZ~=s`+CFBl=<3@#sr5^jLi4`H%YDjf3E?V zwY`BB{dwjE74D9IE-oZGZ4e0}O&iN5&Kg!vg9lp0IL zyg90p4a<|#A_arl>or+^*?37b&IT*Jc#+t9#F4A%sO>YFhnG3venHCxotT*L+p75> ztG(oajU@8h@7Xrfgkt0pSFvFSeqw{~UaTGzgsY?;jET+6j%F_8%jJkVC8WKyAIcUH z4LjaWU!LzzyT3Jh{*;FPi~99d_*?jcDVa=)@B&Ttudb)L=tQfh_i$WqtzOWXd{{w% zB$r#eLJxk+5Xuc^3c3&HO1NJf@3}S?1Gr5EZMkzHhUfnh;X^?x*P$qg0Ux? zWBbd!a&K?;Y}IwuR#sNZKlZ@^-A{JsMrKa=`1uXvR`a|oqU~wfB!|v2WkY=D4tz%V z@ANsR^AKK>9uy?$3cJKBCs&!(pw+n|#t9YjWCL$l6dVW!j!#a49!wIVj(3OWxKf%J z@?%TqwA6ESQLsEj-B3$N) z1JU!E$vT@lCP750O~guO`|sQ*<86Ukm>T=B@$phg&zaKvh-1r+8Y`NBFitU~N8%~I zS2bVqC2dkQ-j`lYtdp4u<2S&6o+h-`9gDuBzP%^MFCcKxVTWRb^ozzDAP^AiHWeF( zsi~>*!A1L@OGhDh^m{pOylU`iWpm#zzRR{8(C@c@oD(O=pS4e4=#k`Rq=TrJNpfYA rYw~1{u}actu8Ggg9K_#x+jmWr-6(Gvf #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