mirror of
https://github.com/TobyAdd/GDH.git
synced 2025-09-06 21:11:41 +00:00
Compare commits
2 Commits
56ac34e0d2
...
36c840c3be
Author | SHA1 | Date | |
---|---|---|---|
![]() |
36c840c3be | ||
![]() |
8483ff54d9 |
2
mod.json
2
mod.json
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"id": "tobyadd.gdh",
|
||||
"name": "GDH",
|
||||
"version": "v5.0.0-beta.5",
|
||||
"version": "v5.0.0-alpha.5",
|
||||
"developer": "TobyAdd",
|
||||
"description": "GDH is an open-source Geometry Dash mod menu that aims to improve the game's performance and add new features",
|
||||
"early-load": true,
|
||||
|
@@ -1368,8 +1368,7 @@ void Gui::Render() {
|
||||
}
|
||||
|
||||
if (ImGui::BeginDragDropTarget()) {
|
||||
ImGuiDragDropFlags target_flags = 0;
|
||||
if (const ImGuiPayload *payload = ImGui::AcceptDragDropPayload("LBLMOVE", target_flags)) {
|
||||
if (const ImGuiPayload *payload = ImGui::AcceptDragDropPayload("LBLMOVE")) {
|
||||
size_t move_from = *(size_t*)payload->Data;
|
||||
labels.swap(move_from, index);
|
||||
}
|
||||
|
@@ -742,7 +742,7 @@ void Hacks::Init() {
|
||||
if (colors.colors.empty())
|
||||
ImGui::TextDisabled("No colors is here");
|
||||
|
||||
for (int i = 0; i < colors.colors.size(); ++i) {
|
||||
for (size_t i = 0; i < colors.colors.size(); ++i) {
|
||||
ImGui::PushID(i);
|
||||
|
||||
ImGui::Selectable(" =", false, ImGuiSelectableFlags_DontClosePopups, {20.f * gui.m_scale, 20.f * gui.m_scale});
|
||||
@@ -754,16 +754,16 @@ void Hacks::Init() {
|
||||
|
||||
if (ImGui::BeginDragDropSource()) {
|
||||
ImGui::TextUnformatted(fmt::format("Color {}", i).c_str());
|
||||
ImGui::SetDragDropPayload("LBLMOVE", &i, sizeof(size_t));
|
||||
ImGui::SetDragDropPayload("LBLMOVE2", &i, sizeof(size_t));
|
||||
ImGui::EndDragDropSource();
|
||||
}
|
||||
|
||||
if (ImGui::BeginDragDropTarget()) {
|
||||
if (const ImGuiPayload *payload = ImGui::AcceptDragDropPayload("LBLMOVE")) {
|
||||
if (const ImGuiPayload *payload = ImGui::AcceptDragDropPayload("LBLMOVE2")) {
|
||||
if (payload->DataSize == sizeof(size_t)) {
|
||||
size_t move_from = *(size_t*)payload->Data;
|
||||
if (i != move_from) {
|
||||
std::iter_swap(colors.colors.begin() + move_from, colors.colors.begin() + i);
|
||||
std::iter_swap(std::next(colors.colors.begin(), move_from), std::next(colors.colors.begin(), i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -409,14 +409,14 @@ void ReplayEngine::handle_button(bool down, int button, bool isPlayer1) {
|
||||
|
||||
unsigned frame = get_frame();
|
||||
if (isPlayer1) {
|
||||
if (!m_inputFrames_p1.empty() && down && !m_inputFrames_p1.back().down && m_inputFrames_p1.back().frame == frame)
|
||||
m_inputFrames_p1.pop_back();
|
||||
// if (!m_inputFrames_p1.empty() && down && !m_inputFrames_p1.back().down && m_inputFrames_p1.back().frame == frame)
|
||||
// m_inputFrames_p1.pop_back();
|
||||
|
||||
m_inputFrames_p1.push_back({get_frame(), down, button, isPlayer1});
|
||||
}
|
||||
else {
|
||||
if (!m_inputFrames_p2.empty() && down && !m_inputFrames_p2.back().down && m_inputFrames_p2.back().frame == frame)
|
||||
m_inputFrames_p2.pop_back();
|
||||
// if (!m_inputFrames_p2.empty() && down && !m_inputFrames_p2.back().down && m_inputFrames_p2.back().frame == frame)
|
||||
// m_inputFrames_p2.pop_back();
|
||||
|
||||
m_inputFrames_p2.push_back({get_frame(), down, button, isPlayer1});
|
||||
}
|
||||
|
Reference in New Issue
Block a user