Compare commits

...

2 Commits

Author SHA1 Message Date
TobyAdd
36c840c3be rgb icons settings fix 2025-04-26 16:41:48 +03:00
TobyAdd
8483ff54d9 disabled code that removing release on the same frame 2025-04-26 14:18:03 +03:00
4 changed files with 10 additions and 11 deletions

View File

@@ -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,

View File

@@ -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);
}

View File

@@ -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));
}
}
}

View File

@@ -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});
}