Skip to content

Commit 15c0459

Browse files
committed
2 parents 22f6558 + fc1fde4 commit 15c0459

7 files changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
uses: geode-sdk/build-geode-mod@main
4242
with:
4343
combine: true
44+
sdk: nightly
4445
target: ${{ matrix.config.target }}
4546

4647
package:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.21)
2-
set(CMAKE_CXX_STANDARD 20)
2+
set(CMAKE_CXX_STANDARD 23)
33
set(CMAKE_CXX_STANDARD_REQUIRED ON)
44
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
55
set(CMAKE_OSX_ARCHITECTURES "arm64")

include/API.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ namespace devtools {
168168
inline void sameLine() GEODE_EVENT_EXPORT_NORES(&sameLine, ());
169169
inline void separator() GEODE_EVENT_EXPORT_NORES(&separator, ());
170170
inline void nextItemWidth(float width) GEODE_EVENT_EXPORT_NORES(&nextItemWidth, (width));
171+
inline void indent() GEODE_EVENT_EXPORT_NORES(&indent, ());
172+
inline void unindent() GEODE_EVENT_EXPORT_NORES(&unindent, ());
171173

172174
inline bool combo(
173175
char const* label,

src/API.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ void devtools::separator() {
5656
void devtools::nextItemWidth(float width) {
5757
ImGui::SetNextItemWidth(width);
5858
}
59+
void devtools::indent() {
60+
ImGui::Indent(16.f);
61+
}
62+
void devtools::unindent() {
63+
ImGui::Unindent(16.f);
64+
}
5965
bool devtools::combo(char const* label, int& current, std::span<char const*> items, int maxHeight) {
6066
return ImGui::Combo(
6167
label,

src/backend.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ ImGuiKey cocosToImGuiKey(cocos2d::enumKeyCodes key) {
486486
}
487487
}
488488

489+
#ifndef GEODE_IS_IOS
489490
class $modify(CCKeyboardDispatcher) {
490491
bool dispatchKeyboardMSG(enumKeyCodes key, bool down, bool repeat, double a4) {
491492
if(!DevTools::get()->isSetup()) return CCKeyboardDispatcher::dispatchKeyboardMSG(key, down, repeat, a4);
@@ -530,7 +531,7 @@ class $modify(CCKeyboardDispatcher) {
530531
}
531532
}
532533

533-
#if defined(GEODE_IS_MACOS) || defined(GEODE_IS_IOS)
534+
#if defined(GEODE_IS_MACOS)
534535
static void onModify(auto& self) {
535536
Result<> res = self.setHookPriorityBeforePre("CCKeyboardDispatcher::updateModifierKeys", "geode.custom-keybinds");
536537
if (!res) {
@@ -548,3 +549,4 @@ class $modify(CCKeyboardDispatcher) {
548549
}
549550
#endif
550551
};
552+
#endif

src/main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@ class $modify(CCNode) {
2121
};
2222

2323
// todo: use shortcuts api once Geode has those
24+
#ifndef GEODE_IS_IOS
2425
class $modify(CCKeyboardDispatcher) {
25-
bool dispatchKeyboardMSG(enumKeyCodes key, bool down, bool arr, double a4) {
26+
bool dispatchKeyboardMSG(enumKeyCodes key, bool down, bool arr, double timestamp) {
2627
if (down && (key == KEY_F11 GEODE_MACOS(|| key == KEY_F10))) {
2728
DevTools::get()->toggle();
2829
return true;
2930
}
30-
return CCKeyboardDispatcher::dispatchKeyboardMSG(key, down, arr, a4);
31+
return CCKeyboardDispatcher::dispatchKeyboardMSG(key, down, arr, timestamp);
3132
}
3233
};
34+
#endif
3335

3436
#include <Geode/loader/GameEvent.hpp>
3537
$execute {

src/pages/Tree.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,5 +232,4 @@ bool DevTools::searchBranch(CCNode* node) {
232232
}
233233
}
234234
return false;
235-
236235
}

0 commit comments

Comments
 (0)