Skip to content

Commit

Permalink
Fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Alphalaneous committed Jun 28, 2024
1 parent 5cabbc1 commit 1274a13
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mod.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"geode": "3.1.0",
"geode": "3.1.1",
"gd": {
"win": "2.206",
"android": "2.206",
"mac": "2.206"
},
"version": "v1.3.17",
"version": "v1.3.18",
"id": "alphalaneous.happy_textures",
"name": "Happy Textures :3",
"developer": "Alphalaneous",
Expand Down
4 changes: 2 additions & 2 deletions src/nodes/CCScale9Sprite.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using namespace geode::prelude;
class $modify(MyCCScale9Sprite, CCScale9Sprite){

struct Fields {
const char* textureName;
std::string textureName;
CCRect rect;
CCRect capInsets;
std::vector<CCRect> originalRects;
Expand All @@ -21,7 +21,7 @@ class $modify(MyCCScale9Sprite, CCScale9Sprite){

bool initWithFile(const char* file, CCRect rect, CCRect capInsets){
if(!CCScale9Sprite::initWithFile(file, rect, capInsets)) return false;
m_fields->textureName = file;
m_fields->textureName = std::string(file);
m_fields->rect = rect;
m_fields->capInsets = capInsets;

Expand Down
2 changes: 1 addition & 1 deletion src/nodes/GJCommentListLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class $modify(MyGJCommentListLayer, GJCommentListLayer) {

MyCCScale9Sprite* myBG = static_cast<MyCCScale9Sprite*>(bg);

CCScale9Sprite* newBG = CCScale9Sprite::create(myBG->m_fields->textureName, myBG->m_fields->rect, myBG->m_fields->capInsets);
CCScale9Sprite* newBG = CCScale9Sprite::create(myBG->m_fields->textureName.c_str(), myBG->m_fields->rect, myBG->m_fields->capInsets);
newBG->setContentSize(myBG->getContentSize());
newBG->setPosition(bg->getPosition());

Expand Down

0 comments on commit 1274a13

Please sign in to comment.