File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -483,6 +483,29 @@ bool PCSX::Pads::Pad::configure() {
483
483
ImGui::PopStyleColor (2 );
484
484
}
485
485
}
486
+ for (auto i = 0 ; i < 4 ; i++) {
487
+ ImGui::TableNextRow ();
488
+ ImGui::TableSetColumnIndex (1 );
489
+ ImGui::Text (c_dpadDirections[i]());
490
+ ImGui::TableSetColumnIndex (0 );
491
+ bool hasToPop = false ;
492
+ const auto absI = i + 10 ;
493
+ if (m_buttonToWait == absI) {
494
+ const ImVec4 highlight = ImGui::GetStyle ().Colors [ImGuiCol_TextDisabled];
495
+ ImGui::PushStyleColor (ImGuiCol_Button, highlight);
496
+ ImGui::PushStyleColor (ImGuiCol_ButtonHovered, highlight);
497
+ hasToPop = true ;
498
+ }
499
+
500
+ // The name of the mapped key
501
+ const auto keyName = fmt::format (" {}##{}" , glfwKeyToString (getButtonFromGUIIndex (absI)), absI);
502
+ if (ImGui::Button (keyName.c_str (), ImVec2{-1 , 0 })) {
503
+ m_buttonToWait = absI;
504
+ }
505
+ if (hasToPop) {
506
+ ImGui::PopStyleColor (2 );
507
+ }
508
+ }
486
509
ImGui::EndTable ();
487
510
}
488
511
You can’t perform that action at this time.
0 commit comments