Skip to content

Commit ef56b81

Browse files
committed
Revert "separate keybinds for different modes"
This reverts commit f9d2700.
1 parent 322247a commit ef56b81

File tree

3 files changed

+52
-326
lines changed

3 files changed

+52
-326
lines changed

include/Keybinds.hpp

-4
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,6 @@ namespace keybinds {
173173
bool operator==(Category const&) const;
174174

175175
static constexpr auto PLAY { "Play" };
176-
static constexpr auto PLAY_1P_CLASSIC { "Play/Classic 1P" };
177-
static constexpr auto PLAY_1P_PLATFORMER { "Play/Platformer 1P" };
178-
static constexpr auto PLAY_2P_CLASSIC { "Play/Classic 2P" };
179-
static constexpr auto PLAY_2P_PLATFORMER { "Play/Platformer 2P" };
180176
static constexpr auto PLAY_PAUSE { "Play/Pause" };
181177
static constexpr auto EDITOR { "Editor" };
182178
static constexpr auto GLOBAL { "Global" };

src/EditorUI.cpp

+8-38
Original file line numberDiff line numberDiff line change
@@ -74,64 +74,34 @@ struct $modify(EditorUI) {
7474
return false;
7575

7676
Loader::get()->queueInMainThread([this, lel] {
77-
this->defineKeybind("robtop.geometry-dash/jump", [lel](bool down) {
78-
if (lel->m_playbackMode == PlaybackMode::Playing && !lel->m_levelSettings->m_twoPlayerMode && !lel->m_isPlatformer) {
79-
lel->queueButton(platformButton(), down, false);
80-
}
81-
});
8277
this->defineKeybind("robtop.geometry-dash/jump-p1", [lel](bool down) {
83-
if (lel->m_playbackMode == PlaybackMode::Playing && lel->m_levelSettings->m_twoPlayerMode && !lel->m_isPlatformer) {
78+
if (lel->m_playbackMode == PlaybackMode::Playing) {
8479
lel->queueButton(platformButton(), down, false);
8580
}
8681
});
8782
this->defineKeybind("robtop.geometry-dash/jump-p2", [lel](bool down) {
88-
if (lel->m_playbackMode == PlaybackMode::Playing && lel->m_levelSettings->m_twoPlayerMode && !lel->m_isPlatformer) {
89-
lel->queueButton(platformButton(), down, true);
90-
}
91-
});
92-
this->defineKeybind("robtop.geometry-dash/jump-plat", [lel](bool down) {
93-
if (lel->m_playbackMode == PlaybackMode::Playing && !lel->m_levelSettings->m_twoPlayerMode && lel->m_isPlatformer) {
94-
lel->queueButton(platformButton(), down, false);
95-
}
96-
});
97-
this->defineKeybind("robtop.geometry-dash/jump-p1-plat", [lel](bool down) {
98-
if (lel->m_playbackMode == PlaybackMode::Playing && lel->m_levelSettings->m_twoPlayerMode && lel->m_isPlatformer) {
99-
lel->queueButton(platformButton(), down, false);
100-
}
101-
});
102-
this->defineKeybind("robtop.geometry-dash/jump-p2-plat", [lel](bool down) {
103-
if (lel->m_playbackMode == PlaybackMode::Playing && lel->m_levelSettings->m_twoPlayerMode && lel->m_isPlatformer) {
83+
if (lel->m_playbackMode == PlaybackMode::Playing) {
10484
lel->queueButton(platformButton(), down, true);
10585
}
10686
});
107-
this->defineKeybind("robtop.geometry-dash/move-left", [lel](bool down) {
108-
if (lel->m_playbackMode == PlaybackMode::Playing && !lel->m_levelSettings->m_twoPlayerMode) {
109-
lel->queueButton(static_cast<int>(PlayerButton::Left), down, false);
110-
}
111-
});
112-
this->defineKeybind("robtop.geometry-dash/move-right", [lel](bool down) {
113-
if (lel->m_playbackMode == PlaybackMode::Playing && !lel->m_levelSettings->m_twoPlayerMode) {
114-
lel->queueButton(static_cast<int>(PlayerButton::Right), down, false);
115-
}
116-
});
11787
this->defineKeybind("robtop.geometry-dash/move-left-p1", [lel](bool down) {
118-
if (lel->m_playbackMode == PlaybackMode::Playing && lel->m_levelSettings->m_twoPlayerMode) {
88+
if (lel->m_playbackMode == PlaybackMode::Playing) {
11989
lel->queueButton(static_cast<int>(PlayerButton::Left), down, false);
12090
}
12191
});
12292
this->defineKeybind("robtop.geometry-dash/move-right-p1", [lel](bool down) {
123-
if (lel->m_playbackMode == PlaybackMode::Playing && lel->m_levelSettings->m_twoPlayerMode) {
93+
if (lel->m_playbackMode == PlaybackMode::Playing) {
12494
lel->queueButton(static_cast<int>(PlayerButton::Right), down, false);
12595
}
12696
});
12797
this->defineKeybind("robtop.geometry-dash/move-left-p2", [lel](bool down) {
128-
if (lel->m_playbackMode == PlaybackMode::Playing && lel->m_levelSettings->m_twoPlayerMode) {
129-
lel->queueButton(static_cast<int>(PlayerButton::Left), down, lel->m_player2);
98+
if (lel->m_playbackMode == PlaybackMode::Playing) {
99+
lel->queueButton(static_cast<int>(PlayerButton::Left), down, true);
130100
}
131101
});
132102
this->defineKeybind("robtop.geometry-dash/move-right-p2", [lel](bool down) {
133-
if (lel->m_playbackMode == PlaybackMode::Playing && lel->m_levelSettings->m_twoPlayerMode) {
134-
lel->queueButton(static_cast<int>(PlayerButton::Right), down, lel->m_player2);
103+
if (lel->m_playbackMode == PlaybackMode::Playing) {
104+
lel->queueButton(static_cast<int>(PlayerButton::Right), down, true);
135105
}
136106
});
137107
this->defineKeybind("robtop.geometry-dash/pause-level", [this](bool down) {

0 commit comments

Comments
 (0)