Skip to content

Commit

Permalink
rearrange checkbox/label, add tooltip and undo changes to volume text
Browse files Browse the repository at this point in the history
  • Loading branch information
goeiecool9999 committed Oct 17, 2024
1 parent d4a621d commit 63634f6
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/gui/input/panels/VPADInputPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ VPADInputPanel::VPADInputPanel(wxWindow* parent)

text = new wxStaticText(this, wxID_ANY, _("Volume"));
text->Disable();
main_sizer->Add(text, wxGBPosition(row, column), wxDefaultSpan, wxALL | wxALIGN_CENTER_VERTICAL, 5);
main_sizer->Add(text, wxGBPosition(row, column), wxDefaultSpan, wxALL, 5);

auto*m_volume = new wxSlider(this, wxID_ANY, 0, 0, 100);
m_volume->Disable();
main_sizer->Add(m_volume, wxGBPosition(row, column + 1), wxDefaultSpan, wxTOP | wxBOTTOM | wxEXPAND, 5);

const auto volume_text = new wxStaticText(this, wxID_ANY, wxString::Format("%d%%", 0));
volume_text->Disable();
main_sizer->Add(volume_text, wxGBPosition(row, column + 2), wxDefaultSpan, wxALL | wxALIGN_CENTER_VERTICAL, 5);
main_sizer->Add(volume_text, wxGBPosition(row, column + 2), wxDefaultSpan, wxALL, 5);
m_volume->Bind(wxEVT_SLIDER, &VPADInputPanel::OnVolumeChange, this, wxID_ANY, wxID_ANY, new wxControlObject(volume_text));

main_sizer->Add(new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVERTICAL), wxGBPosition(0, column + 3), wxGBSpan(11, 1), wxALL | wxEXPAND, 5);
Expand All @@ -138,8 +138,17 @@ VPADInputPanel::VPADInputPanel(wxWindow* parent)

add_button_row(main_sizer, row, column, VPADController::kButtonId_Screen, _("show screen"));
row++;
m_togglePadViewCheckBox = new wxCheckBox(this, wxID_ANY, _("toggle screen"), wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
main_sizer->Add(m_togglePadViewCheckBox, wxGBPosition(row,column), wxDefaultSpan, wxALL | wxEXPAND, 5);

auto toggleScreenText = new wxStaticText(this, wxID_ANY, _("toggle screen"));
main_sizer->Add(toggleScreenText,
wxGBPosition(row, column),
wxDefaultSpan,
wxALL | wxALIGN_CENTER_VERTICAL, 5);
m_togglePadViewCheckBox = new wxCheckBox(this, wxID_ANY, {}, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
wxString toggleScreenTT = _("Makes the \"show screen\" button toggle between the TV and gamepad screens");
m_togglePadViewCheckBox->SetToolTip(toggleScreenTT);
toggleScreenText->SetToolTip(toggleScreenTT);
main_sizer->Add(m_togglePadViewCheckBox, wxGBPosition(row,column+1), wxDefaultSpan, wxALL | wxEXPAND, 5);

//////////////////////////////////////////////////////////////////

Expand Down

0 comments on commit 63634f6

Please sign in to comment.