mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
Draw buttons in rows of eight in the Controller config.
This commit is contained in:
parent
5e8ab05cc0
commit
6d8ab0c256
2 changed files with 35 additions and 18 deletions
|
@ -836,7 +836,11 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin
|
|||
break;
|
||||
case GROUP_TYPE_BUTTONS:
|
||||
{
|
||||
wxBitmap bitmap(int(12*group->controls.size()+1), 12);
|
||||
// Draw buttons in rows of 8
|
||||
unsigned int button_cols = group->controls.size() > 8 ? 8 : group->controls.size();
|
||||
unsigned int button_rows = ceil((float)group->controls.size() / 8.0f);
|
||||
wxBitmap bitmap(int(12 * button_cols + 1), (12 * button_rows) - (button_rows - 1));
|
||||
|
||||
dc.SelectObject(bitmap);
|
||||
dc.Clear();
|
||||
static_bitmap = new wxStaticBitmap(parent, wxID_ANY, bitmap, wxDefaultPosition, wxDefaultSize, wxBITMAP_TYPE_BMP);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue