Skip to content

Commit

Permalink
Update to 1.37.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenAlex committed Jun 9, 2024
1 parent c0b358e commit 10ebead
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 83 deletions.
2 changes: 1 addition & 1 deletion include/UI/FlowCoordinators/NyaSettingsFlowCoordinator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using namespace Nya::UI;

DECLARE_CLASS_CODEGEN(Nya::UI::FlowCoordinators, NyaSettingsFlowCoordinator, HMUI::FlowCoordinator,

DECLARE_INSTANCE_FIELD(ViewControllers::SettingsViewController*, SettingsViewController);
DECLARE_INSTANCE_FIELD(UnityW<ViewControllers::SettingsViewController>, SettingsViewController);

DECLARE_INSTANCE_METHOD(void, Awake);

Expand Down
2 changes: 1 addition & 1 deletion include/main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Nya {
public:
static bool configValid;
static void loadConfig();
static Nya::NyaFloatingUI* NyaFloatingUI;
static SafePtrUnity<Nya::NyaFloatingUI> NyaFloatingUI;
};

// Define these functions here so that we can easily read configuration and log information from other files
Expand Down
2 changes: 1 addition & 1 deletion mod.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "FrozenAlex",
"version": "${version}",
"packageId": "com.beatgames.beatsaber",
"packageVersion": "1.35.0_8016709773",
"packageVersion": "1.37.0_9064817954",
"description": "Beat Saber mod for displaying nya-tastic images from various anime themed web APIs!",
"dependencies": [],
"coverImage": "cover.jpg",
Expand Down
8 changes: 4 additions & 4 deletions qpm.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": [
{
"id": "beatsaber-hook",
"versionRange": "5.1.6",
"versionRange": "^5.1.7",
"additionalData": {}
},
{
Expand All @@ -28,12 +28,12 @@
},
{
"id": "custom-types",
"versionRange": "^0.17.6",
"versionRange": "^0.17.8",
"additionalData": {}
},
{
"id": "bs-cordl",
"versionRange": "^3500.0.0",
"versionRange": "^3700.0.0",
"additionalData": {}
},
{
Expand All @@ -57,7 +57,7 @@
},
{
"id": "bsml",
"versionRange": "^0.4.24",
"versionRange": "^0.4.34",
"additionalData": {}
},
{
Expand Down
104 changes: 52 additions & 52 deletions qpm.shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"dependencies": [
{
"id": "beatsaber-hook",
"versionRange": "=5.1.6",
"versionRange": "^5.1.7",
"additionalData": {}
},
{
Expand All @@ -32,12 +32,12 @@
},
{
"id": "custom-types",
"versionRange": "^0.17.6",
"versionRange": "^0.17.8",
"additionalData": {}
},
{
"id": "bs-cordl",
"versionRange": "^3500.0.0",
"versionRange": "^3700.0.0",
"additionalData": {}
},
{
Expand All @@ -61,7 +61,7 @@
},
{
"id": "bsml",
"versionRange": "^0.4.24",
"versionRange": "^0.4.34",
"additionalData": {}
},
{
Expand All @@ -77,17 +77,17 @@
{
"dependency": {
"id": "bsml",
"versionRange": "=0.4.31",
"versionRange": "=0.4.34",
"additionalData": {
"soLink": "https://github.com/RedBrumbler/Quest-BSML/releases/download/v0.4.31/libbsml.so",
"debugSoLink": "https://github.com/RedBrumbler/Quest-BSML/releases/download/v0.4.31/debug_libbsml.so",
"soLink": "https://github.com/RedBrumbler/Quest-BSML/releases/download/v0.4.34/libbsml.so",
"debugSoLink": "https://github.com/RedBrumbler/Quest-BSML/releases/download/v0.4.34/debug_libbsml.so",
"overrideSoName": "libbsml.so",
"modLink": "https://github.com/RedBrumbler/Quest-BSML/releases/download/v0.4.31/BSML.qmod",
"branchName": "version/v0_4_31",
"modLink": "https://github.com/RedBrumbler/Quest-BSML/releases/download/v0.4.34/BSML.qmod",
"branchName": "version/v0_4_34",
"cmake": true
}
},
"version": "0.4.31"
"version": "0.4.34"
},
{
"dependency": {
Expand All @@ -111,15 +111,14 @@
},
{
"dependency": {
"id": "rapidjson-macros",
"versionRange": "=1.2.1",
"id": "libil2cpp",
"versionRange": "=0.3.2",
"additionalData": {
"headersOnly": true,
"branchName": "version/v1_2_1",
"cmake": true
"cmake": false
}
},
"version": "1.2.1"
"version": "0.3.2"
},
{
"dependency": {
Expand All @@ -138,13 +137,13 @@
{
"dependency": {
"id": "custom-types",
"versionRange": "=0.17.7",
"versionRange": "=0.17.8",
"additionalData": {
"soLink": "https://github.com/QuestPackageManager/Il2CppQuestTypePatching/releases/download/v0.17.7/libcustom-types.so",
"debugSoLink": "https://github.com/QuestPackageManager/Il2CppQuestTypePatching/releases/download/v0.17.7/debug_libcustom-types.so",
"soLink": "https://github.com/QuestPackageManager/Il2CppQuestTypePatching/releases/download/v0.17.8/libcustom-types.so",
"debugSoLink": "https://github.com/QuestPackageManager/Il2CppQuestTypePatching/releases/download/v0.17.8/debug_libcustom-types.so",
"overrideSoName": "libcustom-types.so",
"modLink": "https://github.com/QuestPackageManager/Il2CppQuestTypePatching/releases/download/v0.17.7/CustomTypes.qmod",
"branchName": "version/v0_17_7",
"modLink": "https://github.com/QuestPackageManager/Il2CppQuestTypePatching/releases/download/v0.17.8/CustomTypes.qmod",
"branchName": "version/v0_17_8",
"compileOptions": {
"cppFlags": [
"-Wno-invalid-offsetof"
Expand All @@ -153,18 +152,19 @@
"cmake": true
}
},
"version": "0.17.7"
"version": "0.17.8"
},
{
"dependency": {
"id": "libil2cpp",
"versionRange": "=0.3.2",
"id": "rapidjson-macros",
"versionRange": "=1.2.1",
"additionalData": {
"headersOnly": true,
"cmake": false
"branchName": "version/v1_2_1",
"cmake": true
}
},
"version": "0.3.2"
"version": "1.2.1"
},
{
"dependency": {
Expand All @@ -186,10 +186,10 @@
{
"dependency": {
"id": "bs-cordl",
"versionRange": "=3500.0.0",
"versionRange": "=3700.0.0",
"additionalData": {
"headersOnly": true,
"branchName": "version/v3500_0_0",
"branchName": "version/v3700_0_0",
"compileOptions": {
"includePaths": [
"include"
Expand All @@ -204,7 +204,7 @@
}
}
},
"version": "3500.0.0"
"version": "3700.0.0"
},
{
"dependency": {
Expand All @@ -222,15 +222,34 @@
{
"dependency": {
"id": "beatsaber-hook",
"versionRange": "=5.1.6",
"versionRange": "=5.1.7",
"additionalData": {
"soLink": "https://github.com/QuestPackageManager/beatsaber-hook/releases/download/v5.1.6/libbeatsaber-hook_5_1_6.so",
"debugSoLink": "https://github.com/QuestPackageManager/beatsaber-hook/releases/download/v5.1.6/debug_libbeatsaber-hook_5_1_6.so",
"branchName": "version/v5_1_6",
"soLink": "https://github.com/QuestPackageManager/beatsaber-hook/releases/download/v5.1.7/libbeatsaber-hook_5_1_7.so",
"debugSoLink": "https://github.com/QuestPackageManager/beatsaber-hook/releases/download/v5.1.7/debug_libbeatsaber-hook_5_1_7.so",
"branchName": "version/v5_1_7",
"cmake": true
}
},
"version": "5.1.6"
"version": "5.1.7"
},
{
"dependency": {
"id": "fmt",
"versionRange": "=10.0.0",
"additionalData": {
"headersOnly": true,
"branchName": "version/v10_0_0",
"compileOptions": {
"systemIncludes": [
"fmt/include/"
],
"cppFlags": [
"-DFMT_HEADER_ONLY"
]
}
}
},
"version": "10.0.0"
},
{
"dependency": {
Expand Down Expand Up @@ -259,25 +278,6 @@
}
},
"version": "10.0.0"
},
{
"dependency": {
"id": "fmt",
"versionRange": "=10.0.0",
"additionalData": {
"headersOnly": true,
"branchName": "version/v10_0_0",
"compileOptions": {
"systemIncludes": [
"fmt/include/"
],
"cppFlags": [
"-DFMT_HEADER_ONLY"
]
}
}
},
"version": "10.0.0"
}
]
}
4 changes: 2 additions & 2 deletions src/UI/FlowCoordinators/NyaSettingsFlowCoordinator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ DEFINE_TYPE(Nya::UI::FlowCoordinators, NyaSettingsFlowCoordinator);


void Nya::UI::FlowCoordinators::NyaSettingsFlowCoordinator::Awake(){
if (!SettingsViewController || !SettingsViewController->m_CachedPtr) {
if (!SettingsViewController) {
SettingsViewController = BSML::Helpers::CreateViewController<ViewControllers::SettingsViewController*>();
}
}
Expand All @@ -18,7 +18,7 @@ void Nya::UI::FlowCoordinators::NyaSettingsFlowCoordinator::DidActivate(bool fir
ProvideInitialViewControllers(SettingsViewController, nullptr, nullptr, nullptr, nullptr);
}
void Nya::UI::FlowCoordinators::NyaSettingsFlowCoordinator::BackButtonWasPressed(HMUI::ViewController* topViewController) {
if (this->_parentFlowCoordinator && this->_parentFlowCoordinator->m_CachedPtr) {
if (this->_parentFlowCoordinator) {
this->_parentFlowCoordinator->DismissFlowCoordinator(this, HMUI::ViewController::AnimationDirection::Horizontal, nullptr, false);
}
}
10 changes: 5 additions & 5 deletions src/UI/Modals/SettingsMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,18 @@ void SettingsMenu::Awake() {

Button* faceHeadset =
BSML::Lite::CreateUIButton(hor->get_transform(), "Face headset", "PracticeButton", [this]() {
if (Main::NyaFloatingUI != nullptr) {
if (Main::NyaFloatingUI) {
Main::NyaFloatingUI->LookAtCamera();
}
});
BSML::Lite::CreateUIButton(hor->get_transform(), "Set upright", "PracticeButton", [this]() {
if (Main::NyaFloatingUI != nullptr) {
if (Main::NyaFloatingUI) {
Main::NyaFloatingUI->SetUpRight();
}
});
}
BSML::Lite::CreateUIButton(floatingViewLayout->get_transform(), "Default position", "PracticeButton", [this]() {
if (Main::NyaFloatingUI != nullptr) {
if (Main::NyaFloatingUI) {
Main::NyaFloatingUI->SetDefaultPos();
}
});
Expand All @@ -198,7 +198,7 @@ void SettingsMenu::Awake() {
BSML::Lite::CreateToggle(floatingViewLayout->get_transform(), "Show handle", getNyaConfig().ShowHandle.GetValue(),
[](bool value) {
getNyaConfig().ShowHandle.SetValue(value);
if (Main::NyaFloatingUI != nullptr && Main::NyaFloatingUI->floatingScreen != nullptr) {
if (Main::NyaFloatingUI && Main::NyaFloatingUI->floatingScreen != nullptr) {
Main::NyaFloatingUI->UpdateHandleVisibility();
}
});
Expand All @@ -207,7 +207,7 @@ void SettingsMenu::Awake() {
getNyaConfig().FloatingScreenScale.GetValue(), 0.1f, 2.0f,
[](float value) {
getNyaConfig().FloatingScreenScale.SetValue(value);
if (Main::NyaFloatingUI != nullptr) {
if (Main::NyaFloatingUI) {
Main::NyaFloatingUI->UpdateScale();
}
}
Expand Down
Loading

0 comments on commit 10ebead

Please sign in to comment.