ui: better pause menu dpad nav. minor ui fixes
Tweak imgui nav algorithm to improve pause menu nav with dpad. Imgui widgets name conflicts on network settings tab
This commit is contained in:
parent
9fd48e7de3
commit
ca613db70d
|
@ -11484,7 +11484,10 @@ static bool ImGui::NavScoreItem(ImGuiNavItemData* result)
|
|||
// Compute distance between boxes
|
||||
// FIXME-NAV: Introducing biases for vertical navigation, needs to be removed.
|
||||
float dbx = NavScoreItemDistInterval(cand.Min.x, cand.Max.x, curr.Min.x, curr.Max.x);
|
||||
float dby = NavScoreItemDistInterval(ImLerp(cand.Min.y, cand.Max.y, 0.2f), ImLerp(cand.Min.y, cand.Max.y, 0.8f), ImLerp(curr.Min.y, curr.Max.y, 0.2f), ImLerp(curr.Min.y, curr.Max.y, 0.8f)); // Scale down on Y to keep using box-distance for vertically touching items
|
||||
float dby = cand.Min.y == curr.Max.y || cand.Max.y == curr.Min.y
|
||||
// Scale down on Y to keep using box-distance for vertically touching items
|
||||
? NavScoreItemDistInterval(ImLerp(cand.Min.y, cand.Max.y, 0.2f), ImLerp(cand.Min.y, cand.Max.y, 0.8f), ImLerp(curr.Min.y, curr.Max.y, 0.2f), ImLerp(curr.Min.y, curr.Max.y, 0.8f))
|
||||
: NavScoreItemDistInterval(cand.Min.y, cand.Max.y, curr.Min.y, curr.Max.y);
|
||||
if (dby != 0.0f && dbx != 0.0f)
|
||||
dbx = (dbx / 1000.0f) + ((dbx > 0.0f) ? +1.0f : -1.0f);
|
||||
float dist_box = ImFabs(dbx) + ImFabs(dby);
|
||||
|
|
|
@ -769,11 +769,6 @@ static void gui_display_commands()
|
|||
savestate();
|
||||
}
|
||||
|
||||
{
|
||||
// Help with navigation with gamepad/keyboard
|
||||
ImguiStyleVar _{ImGuiStyleVar_ItemSpacing, ImVec2(0.f, 2.f)};
|
||||
ImGui::Spacing();
|
||||
}
|
||||
// Slot #
|
||||
if (ImGui::ArrowButton("##prev-slot", ImGuiDir_Left))
|
||||
{
|
||||
|
@ -2604,7 +2599,7 @@ static void gui_settings_network()
|
|||
else if (config::BattleCableEnable)
|
||||
netType = 3;
|
||||
ImGui::Columns(4, "networkType", false);
|
||||
ImGui::RadioButton("Disabled", &netType, 0);
|
||||
ImGui::RadioButton("Disabled##network", &netType, 0);
|
||||
ImGui::NextColumn();
|
||||
ImGui::RadioButton("GGPO", &netType, 1);
|
||||
ImGui::SameLine(0, style.ItemInnerSpacing.x);
|
||||
|
@ -2651,7 +2646,7 @@ static void gui_settings_network()
|
|||
"Sets Frame Delay, advisable for sessions with ping >100 ms");
|
||||
|
||||
ImGui::Text("Left Thumbstick:");
|
||||
OptionRadioButton<int>("Disabled", config::GGPOAnalogAxes, 0, "Left thumbstick not used");
|
||||
OptionRadioButton<int>("Disabled##analogaxis", config::GGPOAnalogAxes, 0, "Left thumbstick not used");
|
||||
ImGui::SameLine();
|
||||
OptionRadioButton<int>("Horizontal", config::GGPOAnalogAxes, 1, "Use the left thumbstick horizontal axis only");
|
||||
ImGui::SameLine();
|
||||
|
@ -2721,7 +2716,7 @@ static void gui_settings_network()
|
|||
ImGui::Spacing();
|
||||
header("Multiboard Screens");
|
||||
{
|
||||
//OptionRadioButton<int>("Disabled", config::MultiboardSlaves, 0, "Multiboard disabled (when optional)");
|
||||
//OptionRadioButton<int>("Disabled##multiboard", config::MultiboardSlaves, 0, "Multiboard disabled (when optional)");
|
||||
OptionRadioButton<int>("1 (Twin)", config::MultiboardSlaves, 1, "One screen configuration (F355 Twin)");
|
||||
ImGui::SameLine();
|
||||
OptionRadioButton<int>("3 (Deluxe)", config::MultiboardSlaves, 2, "Three screens configuration");
|
||||
|
|
Loading…
Reference in New Issue