File tree Expand file tree Collapse file tree 9 files changed +21
-14
lines changed
Expand file tree Collapse file tree 9 files changed +21
-14
lines changed Original file line number Diff line number Diff line change 11/.vs
22/.vscode
33/build
4+ /build-ninja
5+
6+ # clangd stuff
7+ /.cache
8+ /.clangd
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1515
1616- ` RLDifficultyNode ` wrong position when playing roulette
1717- ` RLLoadingCircle ` wrong position for a split second when offline
18+ - Some miscellaneous bugs
1819
1920## [ 2.0.4] - 2024-03-13
2021
Original file line number Diff line number Diff line change @@ -7,8 +7,6 @@ set(CMAKE_CXX_VISIBILITY_PRESET hidden)
77project (GD-Roulette LANGUAGES CXX VERSION 1.0.0)
88
99set (SRC_DIR "${PROJECT_SOURCE_DIR} /src" )
10- set (CMAKE_SYSTEM_VERSION 10.0 CACHE STRING "" FORCE)
11- set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
1210
1311file (GLOB_RECURSE SRC_MAIN
1412 "${SRC_DIR} /**.hpp"
Original file line number Diff line number Diff line change 11{
2- "geode" : " 2.0.0-beta.23 " ,
2+ "geode" : " 2.0.0-beta.24 " ,
33 "gd" : {
44 "win" : " 2.204" ,
55 "android" : " 2.205" ,
Original file line number Diff line number Diff line change 44
55#include < Geode/cocos/include/ccTypes.h>
66#include < Geode/cocos/cocoa/CCObject.h>
7+ #include < Geode/binding/FLAlertLayer.hpp>
78#include < Geode/binding/CCMenuItemSpriteExtra.hpp>
89
910using namespace geode ::prelude;
Original file line number Diff line number Diff line change @@ -108,18 +108,14 @@ void RLDifficultyNode::setDifficulty(const DifficultyInfo& di)
108108 m_feature_sprite = CCSprite::createWithSpriteFrameName (
109109 rl::constants::feature_state_to_sprite.at (di.feature_state ).data ()
110110 );
111+ m_feature_sprite->setID (" feature-sprite" );
112+ this ->addChild (m_feature_sprite, -1 );
111113 break ;
112114
113115 default :
114116 m_feature_sprite = nullptr ;
115117 break ;
116118 }
117-
118- if (m_feature_sprite)
119- {
120- m_feature_sprite->setID (" feature-sprite" );
121- this ->addChild (m_feature_sprite, -1 );
122- }
123119 }
124120
125121 m_difficulty_info = di;
Original file line number Diff line number Diff line change 44#include " ../../custom_nodes/RLDifficultyNode.hpp"
55#include " ../../utils.hpp"
66
7+ #include < functional>
78#include < matjson/stl_serialize.hpp>
89#include < Geode/Bindings.hpp>
910#include < Geode/Geode.hpp>
@@ -128,13 +129,11 @@ void RLRouletteInfoLayer::onToggleButton(CCObject* sender)
128129 // yeah...
129130 auto changeListWrapper = [&](const std::function<void ()>& f) {
130131 g_rouletteManager.getFromSaveContainer (" selected-list-array" ).as_array ().at (button->getTag ()) = false ;
131- g_rouletteManager.getFromSaveContainer (" selected-list-array" ).as_array ().at (prevIdx) = false ;
132132 g_rouletteManager.getFromSaveContainer (" selected-list-array" ).as_array ().at (0 ) = true ;
133133
134134 f ();
135135
136136 g_rouletteManager.getFromSaveContainer (" selected-list-array" ).as_array ().at (0 ) = false ;
137- g_rouletteManager.getFromSaveContainer (" selected-list-array" ).as_array ().at (prevIdx) = false ;
138137 g_rouletteManager.getFromSaveContainer (" selected-list-array" ).as_array ().at (button->getTag ()) = true ;
139138 };
140139
Original file line number Diff line number Diff line change @@ -128,7 +128,10 @@ bool RLRouletteLayer::init()
128128 plusButton->setPosition ({ 135 .f , -20 .f });
129129 plusButton->setSizeMult (1 .2f );
130130 plusButton->setID (" demon-plus-button" );
131- plusButton->setVisible (m_selected_difficulty >= GJDifficulty::Demon);
131+ plusButton->setVisible (
132+ rl::utils::getIndexOf (g_rouletteManager.getFromSaveContainer (" selected-list-array" ).as_array (), true ) != 0 ||
133+ m_selected_difficulty >= GJDifficulty::Demon
134+ );
132135 main_menu->addChild (plusButton);
133136
134137 auto startButtonText = CCLabelBMFont::create (" Start" , " bigFont.fnt" );
@@ -733,7 +736,12 @@ CCMenuItemSpriteExtra* RLRouletteLayer::createDifficultyButton(
733736 this ,
734737 menu_selector (RLRouletteLayer::onDifficultyButton)
735738 );
736- if (m_selected_difficulty != difficulty)
739+ if (
740+ (
741+ rl::utils::getIndexOf (g_rouletteManager.getFromSaveContainer (" selected-list-array" ).as_array (), true ) != 0 &&
742+ m_selected_difficulty != difficulty
743+ ) || m_selected_difficulty != difficulty
744+ )
737745 button->setColor ({ 125 , 125 , 125 });
738746 button->setPosition (point);
739747 button->setTag (static_cast <int >(difficulty));
Original file line number Diff line number Diff line change 11#pragma once
22#include < atomic>
3- #include < array>
43#include < matjson/stl_serialize.hpp>
54
65#include < Geode/loader/Mod.hpp>
You can’t perform that action at this time.
0 commit comments