Skip to content

Commit

Permalink
ok, final rc maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
user95401 committed Dec 10, 2024
1 parent 43a111d commit aeb8894
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/_ImGui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static CCPoint toCocos(const ImVec2& pos) {

#include <imgui-cocos.hpp>
#include <Geode/modify/CCDirector.hpp>
class $modify(ImGuiInit, CCDirector) {
class $modify(ImGuiCocosSetup, CCDirector) {
$override void runWithScene(CCScene * pScene) {
CCDirector::runWithScene(pScene);
ImGuiCocos::get().setup([] {}).draw([] {});
Expand Down
2 changes: 2 additions & 0 deletions src/_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class $modify(FLAlertLayerShowupStartPointExt, CCNode) {
}
};
};
#ifdef GEODE_IS_WINDOWS
if (auto casted = typeinfo_cast<MenuGameLayer*>(this)) {
if (casted->getContentSize().equals(CCDirector::get()->getWinSize())) {
casted->setAnchorPoint(toCocos(ImGui::GetMousePos()) / casted->getContentSize());
Expand All @@ -34,6 +35,7 @@ class $modify(FLAlertLayerShowupStartPointExt, CCNode) {
}
};
}
#endif
};

#ifdef GEODE_IS_WINDOWS
Expand Down
2 changes: 1 addition & 1 deletion src/special_sprites.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class $modify(SpecialSprites, CCSprite) {
"cocos2d::CCSprite::create",
"cocos2d::CCSprite::createWithSpriteFrameName",
};
for (auto name : names) if (!self.setHookPriorityPost(name, Priority::First)) {
for (auto name : names) if (!self.setHookPriorityPost(name, Priority::Last)) {
log::error("Failed to set hook priority for {}.", name);
}
}
Expand Down

0 comments on commit aeb8894

Please sign in to comment.