Skip to content

Commit d77ae41

Browse files
committed
feat(placeholder): Fix placeholder not showing up
1 parent 62aa66a commit d77ae41

File tree

7 files changed

+12
-6
lines changed

7 files changed

+12
-6
lines changed

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,18 @@ set(SRC_FILES ${SRC_FILES}
1616
)
1717

1818
if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
19-
set(SRC_FILES ${SRC_FILES} ${SRC_DIR}/macos.mm)
20-
set_source_files_properties(${SRC_DIR}/macos.mm PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
19+
set(SRC_FILES ${SRC_FILES} ${SRC_DIR}/platform/macos.mm)
20+
set_source_files_properties(${SRC_DIR}/platform/macos.mm PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
2121
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
22-
set(SRC_FILES ${SRC_FILES} ${SRC_DIR}/windows.cpp)
22+
set(SRC_FILES ${SRC_FILES} ${SRC_DIR}/platform/windows.cpp)
2323
else()
2424
message(FATAL_ERROR "Unsupported mod platform!")
2525
endif()
2626

2727
add_library(${PROJECT_NAME} MODULE "${SRC_FILES}")
28+
target_include_directories(${PROJECT_NAME}
29+
PRIVATE ${SRC_DIR} # allow easy inclusion of utils and BetterTextInputNode
30+
)
2831

2932
if (NOT DEFINED ENV{GEODE_SDK})
3033
message(FATAL_ERROR "Unable to find Geode SDK! Please define GEODE_SDK environment variable to point to Geode")

src/hooks/CCIMEDispatcher.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <Geode/modify/CCIMEDispatcher.hpp>
22

3-
#include "../BetterTextInputNode.hpp"
3+
#include "BetterTextInputNode.hpp"
44

55
// backspace and del is handled in dispatchDeleteBackward/dispatchDeleteForward then in CCEGLView::onGLFWKeyCallback/[EAGLView keyDownExec:]
66
// same goes for all the other characters (dispatchInsertText then CCEGLView::onGLFWKeyCallback/[EAGLView keyDownExec:])

src/hooks/CCScene.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <Geode/modify/CCScene.hpp>
22

3-
#include "../BetterTextInputNode.hpp"
3+
#include "BetterTextInputNode.hpp"
44

55
// fix layers appearing above selected CCTextInputNodes making ESC key deselect the
66
// input node instead of closing the alert
@@ -22,6 +22,7 @@ struct AlertLayerFix : geode::Modify<AlertLayerFix, cocos2d::CCScene>
2222
return ret;
2323
}
2424

25+
2526
void onUpdateTick(float)
2627
{
2728
const std::size_t currentChildrenCount = this->getChildrenCount();

src/hooks/CCTextFieldTTF.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <Geode/modify/CCTextFieldTTF.hpp>
22

3-
#include "../BetterTextInputNode.hpp"
3+
#include "BetterTextInputNode.hpp"
44

55
// CCTextInputNode::getString is inlined, all it does is call CCTextFieldTTF::getString
66
struct BetterCCTextFieldTTF : geode::Modify<BetterCCTextFieldTTF, cocos2d::CCTextFieldTTF>
File renamed without changes.

src/utils.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#pragma once
2+
13
#include <string>
24
#include <string_view>
35

0 commit comments

Comments
 (0)