Skip to content

Commit

Permalink
more mac stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Alphalaneous committed Jun 25, 2024
1 parent 3b9fc50 commit 5cabbc1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.21)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_OSX_ARCHITECTURES "x86_64")
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

project(HappyTextures VERSION 1.0.0)
Expand Down
10 changes: 10 additions & 0 deletions src/nodes/CCLabelBMFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,19 @@ class $modify(MyCCLabelBMFont, CCLabelBMFont){
auto ret = CCLabelBMFont::create(str, fntFile, width, alignment, imageOffset);

auto myRet = static_cast<MyCCLabelBMFont*>(ret);

#ifndef GEODE_IS_MACOS

myRet->m_fields->m_schedule = schedule_selector(MyCCLabelBMFont::checkParent);
ret->schedule(myRet->m_fields->m_schedule);

#endif

return ret;
}

#ifndef GEODE_IS_MACOS

void checkParent(float dt){

if(auto parent = this->getParent()){
Expand All @@ -49,6 +57,8 @@ class $modify(MyCCLabelBMFont, CCLabelBMFont){
this->unschedule(m_fields->m_schedule);
}
}

#endif
};

#endif

0 comments on commit 5cabbc1

Please sign in to comment.