File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -719,6 +719,7 @@ bool PCSX::GUI::configure() {
719
719
m_overlayLoadSizes.resize (overlays.size ());
720
720
int counter = 0 ;
721
721
int overlayToRemove = -1 ;
722
+ int swapMe = -1 ;
722
723
for (auto & overlay : overlays) {
723
724
std::string id = " overlay" + std::to_string (counter);
724
725
ImGui::BeginChild (id.c_str (), ImVec2 (0 , ImGui::GetTextLineHeightWithSpacing () * 7 .0f ), true );
@@ -760,13 +761,28 @@ bool PCSX::GUI::configure() {
760
761
ImGui::SameLine ();
761
762
if (ImGui::Button (_ (" Remove" ))) {
762
763
overlayToRemove = counter;
763
- changed = true ;
764
+ }
765
+ ImGui::SameLine ();
766
+ if (ImGui::Button (_ (" Move up" ))) {
767
+ swapMe = counter - 1 ;
768
+ }
769
+ ImGui::SameLine ();
770
+ if (ImGui::Button (_ (" Move down" ))) {
771
+ swapMe = counter;
764
772
}
765
773
ImGui::EndChild ();
766
774
counter++;
767
775
}
768
776
if (overlayToRemove >= 0 ) {
769
777
overlays.erase (overlays.begin () + overlayToRemove);
778
+ changed = true ;
779
+ }
780
+ if ((swapMe >= 0 ) && (swapMe != (overlays.size () - 1 ))) {
781
+ std::iter_swap (overlays.begin () + swapMe, overlays.begin () + swapMe + 1 );
782
+ std::iter_swap (m_overlayFileOffsets.begin () + swapMe, m_overlayFileOffsets.begin () + swapMe + 1 );
783
+ std::iter_swap (m_overlayLoadOffsets.begin () + swapMe, m_overlayLoadOffsets.begin () + swapMe + 1 );
784
+ std::iter_swap (m_overlayLoadSizes.begin () + swapMe, m_overlayLoadSizes.begin () + swapMe + 1 );
785
+ changed = true ;
770
786
}
771
787
}
772
788
}
You can’t perform that action at this time.
0 commit comments