Fixed GUI layout (Input)
This commit is contained in:
parent
7e890bdf6d
commit
10b4f52d3e
1 changed files with 28 additions and 428 deletions
|
@ -68,51 +68,6 @@ static gcn::UaeDropDown* cboTapDelay;
|
|||
#endif
|
||||
static gcn::UaeCheckBox* chkMouseHack;
|
||||
|
||||
static gcn::UaeCheckBox* chkCustomCtrl;
|
||||
static gcn::Label* lblA;
|
||||
static gcn::TextField* txtA;
|
||||
static gcn::Button* cmdA;
|
||||
|
||||
static gcn::Label* lblB;
|
||||
static gcn::TextField* txtB;
|
||||
static gcn::Button* cmdB;
|
||||
|
||||
static gcn::Label* lblX;
|
||||
static gcn::TextField* txtX;
|
||||
static gcn::Button* cmdX;
|
||||
|
||||
static gcn::Label* lblY;
|
||||
static gcn::TextField* txtY;
|
||||
static gcn::Button* cmdY;
|
||||
|
||||
static gcn::Label* lblL;
|
||||
static gcn::TextField* txtL;
|
||||
static gcn::Button* cmdL;
|
||||
|
||||
static gcn::Label* lblR;
|
||||
static gcn::TextField* txtR;
|
||||
static gcn::Button* cmdR;
|
||||
|
||||
static gcn::Label* lblUp;
|
||||
static gcn::TextField* txtUp;
|
||||
static gcn::Button* cmdUp;
|
||||
|
||||
static gcn::Label* lblDown;
|
||||
static gcn::TextField* txtDown;
|
||||
static gcn::Button* cmdDown;
|
||||
|
||||
static gcn::Label* lblLeft;
|
||||
static gcn::TextField* txtLeft;
|
||||
static gcn::Button* cmdLeft;
|
||||
|
||||
static gcn::Label* lblRight;
|
||||
static gcn::TextField* txtRight;
|
||||
static gcn::Button* cmdRight;
|
||||
|
||||
static gcn::Label* lblPlay;
|
||||
static gcn::TextField* txtPlay;
|
||||
static gcn::Button* cmdPlay;
|
||||
|
||||
class StringListModel : public gcn::ListModel
|
||||
{
|
||||
private:
|
||||
|
@ -402,129 +357,6 @@ public:
|
|||
#endif
|
||||
changed_prefs.input_tablet = chkMouseHack->isSelected() ? TABLET_MOUSEHACK : TABLET_OFF;
|
||||
}
|
||||
else if (actionEvent.getSource() == chkCustomCtrl)
|
||||
changed_prefs.customControls = chkCustomCtrl->isSelected();
|
||||
|
||||
else if (actionEvent.getSource() == cmdA)
|
||||
//changed_prefs.custom_a = amigaKey[txtA->getSelected()];
|
||||
{
|
||||
const char* key = ShowMessageForInput("Press a key/button", "Press a key or button to map to A", "Cancel");
|
||||
if (key != nullptr)
|
||||
{
|
||||
txtA->setText(key);
|
||||
strcpy(changed_prefs.custom_a, key);
|
||||
}
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == cmdB)
|
||||
//changed_prefs.custom_b = amigaKey[txtB->getSelected()];
|
||||
{
|
||||
const char* key = ShowMessageForInput("Press a key/button", "Press a key or button to map to B", "Cancel");
|
||||
if (key != nullptr)
|
||||
{
|
||||
txtB->setText(key);
|
||||
strcpy(changed_prefs.custom_b, key);
|
||||
}
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == cmdX)
|
||||
//changed_prefs.custom_x = amigaKey[txtX->getSelected()];
|
||||
{
|
||||
const char* key = ShowMessageForInput("Press a key/button", "Press a key or button to map to X", "Cancel");
|
||||
if (key != nullptr)
|
||||
{
|
||||
txtX->setText(key);
|
||||
strcpy(changed_prefs.custom_x, key);
|
||||
}
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == cmdY)
|
||||
//changed_prefs.custom_y = amigaKey[txtY->getSelected()];
|
||||
{
|
||||
const char* key = ShowMessageForInput("Press a key/button", "Press a key or button to map to Y", "Cancel");
|
||||
if (key != nullptr)
|
||||
{
|
||||
txtY->setText(key);
|
||||
strcpy(changed_prefs.custom_y, key);
|
||||
}
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == cmdL)
|
||||
//changed_prefs.custom_l = amigaKey[txtL->getSelected()];
|
||||
{
|
||||
const char* key = ShowMessageForInput("Press a key/button", "Press a key or button to map to LShoulder", "Cancel");
|
||||
if (key != nullptr)
|
||||
{
|
||||
txtL->setText(key);
|
||||
strcpy(changed_prefs.custom_l, key);
|
||||
}
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == cmdR)
|
||||
//changed_prefs.custom_r = amigaKey[txtR->getSelected()];
|
||||
{
|
||||
const char* key = ShowMessageForInput("Press a key/button", "Press a key or button to map to RShoulder", "Cancel");
|
||||
if (key != nullptr)
|
||||
{
|
||||
txtR->setText(key);
|
||||
strcpy(changed_prefs.custom_r, key);
|
||||
}
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == cmdUp)
|
||||
//changed_prefs.custom_up = amigaKey[txtUp->getSelected()];
|
||||
{
|
||||
const char* key = ShowMessageForInput("Press a key/button", "Press a key or button to map to Up", "Cancel");
|
||||
if (key != nullptr)
|
||||
{
|
||||
txtUp->setText(key);
|
||||
strcpy(changed_prefs.custom_up, key);
|
||||
}
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == cmdDown)
|
||||
//changed_prefs.custom_down = amigaKey[txtDown->getSelected()];
|
||||
{
|
||||
const char* key = ShowMessageForInput("Press a key/button", "Press a key or button to map to Down", "Cancel");
|
||||
if (key != nullptr)
|
||||
{
|
||||
txtDown->setText(key);
|
||||
strcpy(changed_prefs.custom_down, key);
|
||||
}
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == cmdLeft)
|
||||
//changed_prefs.custom_left = amigaKey[txtLeft->getSelected()];
|
||||
{
|
||||
const char* key = ShowMessageForInput("Press a key/button", "Press a key or button to map to Left", "Cancel");
|
||||
if (key != nullptr)
|
||||
{
|
||||
txtLeft->setText(key);
|
||||
strcpy(changed_prefs.custom_left, key);
|
||||
}
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == cmdRight)
|
||||
//changed_prefs.custom_right = amigaKey[txtRight->getSelected()];
|
||||
{
|
||||
const char* key = ShowMessageForInput("Press a key/button", "Press a key or button to map to Right", "Cancel");
|
||||
if (key != nullptr)
|
||||
{
|
||||
txtRight->setText(key);
|
||||
strcpy(changed_prefs.custom_right, key);
|
||||
}
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == txtPlay)
|
||||
//changed_prefs.custom_play = amigaKey[txtPlay->getSelected()];
|
||||
{
|
||||
const char* key = ShowMessageForInput("Press a key/button", "Press a key or button to map to Play", "Cancel");
|
||||
if (key != nullptr)
|
||||
{
|
||||
txtPlay->setText(key);
|
||||
strcpy(changed_prefs.custom_play, key);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -563,62 +395,54 @@ void InitPanelInput(const struct _ConfigCategory& category)
|
|||
#endif
|
||||
|
||||
inputActionListener = new InputActionListener();
|
||||
const int textFieldWidth = category.panel->getWidth() - 2 * DISTANCE_BORDER - SMALL_BUTTON_WIDTH - DISTANCE_NEXT_X * 2;
|
||||
const int mode_length = 80;
|
||||
const int port_lbl_length = 120;
|
||||
|
||||
const int textFieldWidth = category.panel->getWidth() - (2 * DISTANCE_BORDER - SMALL_BUTTON_WIDTH - DISTANCE_NEXT_X);
|
||||
|
||||
lblPort0 = new gcn::Label("Port 0 [Mouse]:");
|
||||
lblPort0->setSize(port_lbl_length, LABEL_HEIGHT);
|
||||
lblPort0->setAlignment(gcn::Graphics::RIGHT);
|
||||
cboPort0 = new gcn::UaeDropDown(&ctrlPortList);
|
||||
cboPort0->setSize(textFieldWidth, DROPDOWN_HEIGHT);
|
||||
cboPort0->setSize(textFieldWidth/2, DROPDOWN_HEIGHT);
|
||||
cboPort0->setBaseColor(gui_baseCol);
|
||||
cboPort0->setBackgroundColor(colTextboxBackground);
|
||||
cboPort0->setId("cboPort0");
|
||||
cboPort0->addActionListener(inputActionListener);
|
||||
|
||||
cboPort0mode = new gcn::UaeDropDown(&ctrlPortModeList);
|
||||
cboPort0mode->setSize(mode_length, DROPDOWN_HEIGHT);
|
||||
cboPort0mode->setSize(cboPort0mode->getWidth(), DROPDOWN_HEIGHT);
|
||||
cboPort0mode->setBaseColor(gui_baseCol);
|
||||
cboPort0mode->setId("cboPort0mode");
|
||||
cboPort0mode->addActionListener(inputActionListener);
|
||||
|
||||
lblPort1 = new gcn::Label("Port 1 [Joystick]:");
|
||||
lblPort1->setSize(port_lbl_length, LABEL_HEIGHT);
|
||||
lblPort1->setAlignment(gcn::Graphics::RIGHT);
|
||||
lblPort0->setSize(lblPort1->getWidth(), lblPort0->getHeight());
|
||||
cboPort1 = new gcn::UaeDropDown(&ctrlPortList);
|
||||
cboPort1->setSize(textFieldWidth, DROPDOWN_HEIGHT);
|
||||
cboPort1->setSize(textFieldWidth/2, DROPDOWN_HEIGHT);
|
||||
cboPort1->setBaseColor(gui_baseCol);
|
||||
cboPort1->setBackgroundColor(colTextboxBackground);
|
||||
cboPort1->setId("cboPort1");
|
||||
cboPort1->addActionListener(inputActionListener);
|
||||
|
||||
cboPort1mode = new gcn::UaeDropDown(&ctrlPortModeList);
|
||||
cboPort1mode->setSize(mode_length, DROPDOWN_HEIGHT);
|
||||
cboPort1mode->setSize(cboPort1mode->getWidth(), DROPDOWN_HEIGHT);
|
||||
cboPort1mode->setBaseColor(gui_baseCol);
|
||||
cboPort1mode->setId("cboPort1mode");
|
||||
cboPort1mode->addActionListener(inputActionListener);
|
||||
|
||||
lblPort2 = new gcn::Label("Port 2 [Parallel 1]:");
|
||||
lblPort2->setSize(port_lbl_length, LABEL_HEIGHT);
|
||||
lblPort2->setAlignment(gcn::Graphics::LEFT);
|
||||
cboPort2 = new gcn::UaeDropDown(&ctrlPortList);
|
||||
cboPort2->setSize(textFieldWidth, DROPDOWN_HEIGHT);
|
||||
cboPort2->setSize(textFieldWidth/2, DROPDOWN_HEIGHT);
|
||||
cboPort2->setBaseColor(gui_baseCol);
|
||||
cboPort2->setId("cboPort2");
|
||||
cboPort2->addActionListener(inputActionListener);
|
||||
|
||||
lblPort3 = new gcn::Label("Port 3 [Parallel 2]:");
|
||||
lblPort3->setSize(port_lbl_length, LABEL_HEIGHT);
|
||||
lblPort3->setAlignment(gcn::Graphics::LEFT);
|
||||
cboPort3 = new gcn::UaeDropDown(&ctrlPortList);
|
||||
cboPort3->setSize(textFieldWidth, DROPDOWN_HEIGHT);
|
||||
cboPort3->setSize(textFieldWidth/2, DROPDOWN_HEIGHT);
|
||||
cboPort3->setBaseColor(gui_baseCol);
|
||||
cboPort3->setId("cboPort3");
|
||||
cboPort3->addActionListener(inputActionListener);
|
||||
|
||||
lblPort0mousemode = new gcn::Label("Mouse Stick 0:");
|
||||
lblPort0mousemode->setSize(100, LABEL_HEIGHT);
|
||||
lblPort0mousemode->setAlignment(gcn::Graphics::RIGHT);
|
||||
cboPort0mousemode = new gcn::UaeDropDown(&ctrlPortMouseModeList);
|
||||
cboPort0mousemode->setSize(68, DROPDOWN_HEIGHT);
|
||||
|
@ -627,7 +451,6 @@ void InitPanelInput(const struct _ConfigCategory& category)
|
|||
cboPort0mousemode->addActionListener(inputActionListener);
|
||||
|
||||
lblPort1mousemode = new gcn::Label("Mouse Stick 1:");
|
||||
lblPort1mousemode->setSize(100, LABEL_HEIGHT);
|
||||
lblPort1mousemode->setAlignment(gcn::Graphics::RIGHT);
|
||||
cboPort1mousemode = new gcn::UaeDropDown(&ctrlPortMouseModeList);
|
||||
cboPort1mousemode->setSize(68, DROPDOWN_HEIGHT);
|
||||
|
@ -636,17 +459,14 @@ void InitPanelInput(const struct _ConfigCategory& category)
|
|||
cboPort1mousemode->addActionListener(inputActionListener);
|
||||
|
||||
lblAutofire = new gcn::Label("Autofire Rate:");
|
||||
lblAutofire->setSize(100, LABEL_HEIGHT);
|
||||
lblAutofire->setAlignment(gcn::Graphics::RIGHT);
|
||||
cboAutofire = new gcn::UaeDropDown(&autofireList);
|
||||
cboAutofire->setSize(80, DROPDOWN_HEIGHT);
|
||||
cboAutofire->setBaseColor(gui_baseCol);
|
||||
cboAutofire->setBackgroundColor(colTextboxBackground);
|
||||
cboAutofire->setId("cboAutofire");
|
||||
cboAutofire->addActionListener(inputActionListener);
|
||||
|
||||
lblMouseSpeed = new gcn::Label("Mouse Speed:");
|
||||
lblMouseSpeed->setSize(100, LABEL_HEIGHT);
|
||||
lblMouseSpeed->setAlignment(gcn::Graphics::RIGHT);
|
||||
sldMouseSpeed = new gcn::Slider(0, 4);
|
||||
sldMouseSpeed->setSize(110, SLIDER_HEIGHT);
|
||||
|
@ -659,7 +479,6 @@ void InitPanelInput(const struct _ConfigCategory& category)
|
|||
|
||||
#ifdef PANDORA
|
||||
lblTapDelay = new gcn::Label("Tap Delay:");
|
||||
lblTapDelay->setSize(100, LABEL_HEIGHT);
|
||||
lblTapDelay->setAlignment(gcn::Graphics::RIGHT);
|
||||
cboTapDelay = new gcn::UaeDropDown(&tapDelayList);
|
||||
cboTapDelay->setSize(80, DROPDOWN_HEIGHT);
|
||||
|
@ -671,228 +490,47 @@ void InitPanelInput(const struct _ConfigCategory& category)
|
|||
chkMouseHack = new gcn::UaeCheckBox("Enable mousehack");
|
||||
chkMouseHack->setId("MouseHack");
|
||||
chkMouseHack->addActionListener(inputActionListener);
|
||||
chkCustomCtrl = new gcn::UaeCheckBox("Custom Control");
|
||||
chkCustomCtrl->setId("CustomCtrl");
|
||||
chkCustomCtrl->addActionListener(inputActionListener);
|
||||
|
||||
lblA = new gcn::Label("Green:");
|
||||
lblA->setSize(80, LABEL_HEIGHT);
|
||||
lblA->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtA = new gcn::TextField();
|
||||
txtA->setEnabled(false);
|
||||
txtA->setSize(85, txtA->getHeight());
|
||||
txtA->setBackgroundColor(colTextboxBackground);
|
||||
cmdA = new gcn::Button("...");
|
||||
cmdA->setId("cmdA");
|
||||
cmdA->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
cmdA->setBaseColor(gui_baseCol);
|
||||
cmdA->addActionListener(inputActionListener);
|
||||
|
||||
lblB = new gcn::Label("Blue:");
|
||||
lblB->setSize(80, LABEL_HEIGHT);
|
||||
lblB->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtB = new gcn::TextField();
|
||||
txtB->setEnabled(false);
|
||||
txtB->setSize(85, txtB->getHeight());
|
||||
txtB->setBackgroundColor(colTextboxBackground);
|
||||
cmdB = new gcn::Button("...");
|
||||
cmdB->setId("cmdB");
|
||||
cmdB->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
cmdB->setBaseColor(gui_baseCol);
|
||||
cmdB->addActionListener(inputActionListener);
|
||||
|
||||
lblX = new gcn::Label("Red:");
|
||||
lblX->setSize(80, LABEL_HEIGHT);
|
||||
lblX->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtX = new gcn::TextField();
|
||||
txtX->setEnabled(false);
|
||||
txtX->setSize(85, txtX->getHeight());
|
||||
txtX->setBackgroundColor(colTextboxBackground);
|
||||
cmdX = new gcn::Button("...");
|
||||
cmdX->setId("cmdX");
|
||||
cmdX->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
cmdX->setBaseColor(gui_baseCol);
|
||||
cmdX->addActionListener(inputActionListener);
|
||||
|
||||
lblY = new gcn::Label("Yellow:");
|
||||
lblY->setSize(80, LABEL_HEIGHT);
|
||||
lblY->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtY = new gcn::TextField();
|
||||
txtY->setEnabled(false);
|
||||
txtY->setSize(85, txtY->getHeight());
|
||||
txtY->setBackgroundColor(colTextboxBackground);
|
||||
cmdY = new gcn::Button("...");
|
||||
cmdY->setId("cmdY");
|
||||
cmdY->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
cmdY->setBaseColor(gui_baseCol);
|
||||
cmdY->addActionListener(inputActionListener);
|
||||
|
||||
lblL = new gcn::Label("LShoulder:");
|
||||
lblL->setSize(80, LABEL_HEIGHT);
|
||||
lblL->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtL = new gcn::TextField();
|
||||
txtL->setEnabled(false);
|
||||
txtL->setSize(85, txtL->getHeight());
|
||||
txtL->setBackgroundColor(colTextboxBackground);
|
||||
cmdL = new gcn::Button("...");
|
||||
cmdL->setId("cmdL");
|
||||
cmdL->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
cmdL->setBaseColor(gui_baseCol);
|
||||
cmdL->addActionListener(inputActionListener);
|
||||
|
||||
lblR = new gcn::Label("RShoulder:");
|
||||
lblR->setSize(80, LABEL_HEIGHT);
|
||||
lblR->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtR = new gcn::TextField();
|
||||
txtR->setEnabled(false);
|
||||
txtR->setSize(85, txtR->getHeight());
|
||||
txtR->setBackgroundColor(colTextboxBackground);
|
||||
cmdR = new gcn::Button("...");
|
||||
cmdR->setId("cmdR");
|
||||
cmdR->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
cmdR->setBaseColor(gui_baseCol);
|
||||
cmdR->addActionListener(inputActionListener);
|
||||
|
||||
lblUp = new gcn::Label("Up:");
|
||||
lblUp->setSize(80, LABEL_HEIGHT);
|
||||
lblUp->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtUp = new gcn::TextField();
|
||||
txtUp->setEnabled(false);
|
||||
txtUp->setSize(85, txtUp->getHeight());
|
||||
txtUp->setBackgroundColor(colTextboxBackground);
|
||||
cmdUp = new gcn::Button("...");
|
||||
cmdUp->setId("cmdUp");
|
||||
cmdUp->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
cmdUp->setBaseColor(gui_baseCol);
|
||||
cmdUp->addActionListener(inputActionListener);
|
||||
|
||||
lblDown = new gcn::Label("Down:");
|
||||
lblDown->setSize(80, LABEL_HEIGHT);
|
||||
lblDown->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtDown = new gcn::TextField();
|
||||
txtDown->setEnabled(false);
|
||||
txtDown->setSize(85, txtDown->getHeight());
|
||||
txtDown->setBackgroundColor(colTextboxBackground);
|
||||
cmdDown = new gcn::Button("...");
|
||||
cmdDown->setId("cmdDown");
|
||||
cmdDown->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
cmdDown->setBaseColor(gui_baseCol);
|
||||
cmdDown->addActionListener(inputActionListener);
|
||||
|
||||
lblLeft = new gcn::Label("Left:");
|
||||
lblLeft->setSize(80, LABEL_HEIGHT);
|
||||
lblLeft->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtLeft = new gcn::TextField();
|
||||
txtLeft->setEnabled(false);
|
||||
txtLeft->setSize(85, txtLeft->getHeight());
|
||||
txtLeft->setBackgroundColor(colTextboxBackground);
|
||||
cmdLeft = new gcn::Button("...");
|
||||
cmdLeft->setId("cmdLeft");
|
||||
cmdLeft->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
cmdLeft->setBaseColor(gui_baseCol);
|
||||
cmdLeft->addActionListener(inputActionListener);
|
||||
|
||||
lblRight = new gcn::Label("Right:");
|
||||
lblRight->setSize(80, LABEL_HEIGHT);
|
||||
lblRight->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtRight = new gcn::TextField();
|
||||
txtRight->setEnabled(false);
|
||||
txtRight->setSize(85, txtRight->getHeight());
|
||||
txtRight->setBackgroundColor(colTextboxBackground);
|
||||
cmdDown = new gcn::Button("...");
|
||||
cmdDown->setId("cmdDown");
|
||||
cmdDown->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
cmdDown->setBaseColor(gui_baseCol);
|
||||
cmdDown->addActionListener(inputActionListener);
|
||||
|
||||
lblPlay = new gcn::Label("Play:");
|
||||
lblPlay->setSize(80, LABEL_HEIGHT);
|
||||
lblPlay->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtPlay = new gcn::TextField();
|
||||
txtPlay->setEnabled(false);
|
||||
txtPlay->setSize(85, txtPlay->getHeight());
|
||||
txtPlay->setBackgroundColor(colTextboxBackground);
|
||||
cmdDown = new gcn::Button("...");
|
||||
cmdDown->setId("cmdDown");
|
||||
cmdDown->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
cmdDown->setBaseColor(gui_baseCol);
|
||||
cmdDown->addActionListener(inputActionListener);
|
||||
|
||||
|
||||
int posY = DISTANCE_BORDER;
|
||||
category.panel->add(lblPort0, DISTANCE_BORDER, posY);
|
||||
category.panel->add(cboPort0, DISTANCE_BORDER + lblPort0->getWidth() + 8, posY);
|
||||
category.panel->add(cboPort0mode, +lblPort0->getWidth() + cboPort0->getWidth() + 30, posY);
|
||||
|
||||
category.panel->add(cboPort0mode, cboPort0->getX() + cboPort0->getWidth() + DISTANCE_NEXT_X, posY);
|
||||
posY += cboPort0->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
category.panel->add(lblPort1, DISTANCE_BORDER, posY);
|
||||
category.panel->add(cboPort1, DISTANCE_BORDER + lblPort1->getWidth() + 8, posY);
|
||||
category.panel->add(cboPort1mode, +lblPort1->getWidth() + cboPort1->getWidth() + 30, posY);
|
||||
|
||||
category.panel->add(cboPort1mode, cboPort1->getX() + cboPort1->getWidth() + DISTANCE_NEXT_X, posY);
|
||||
posY += cboPort1->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
category.panel->add(lblPort2, DISTANCE_BORDER, posY);
|
||||
category.panel->add(cboPort2, DISTANCE_BORDER + lblPort2->getWidth() + 8, posY);
|
||||
|
||||
posY += cboPort2->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
category.panel->add(lblPort3, DISTANCE_BORDER, posY);
|
||||
category.panel->add(cboPort3, DISTANCE_BORDER + lblPort3->getWidth() + 8, posY);
|
||||
posY += cboPort3->getHeight() + DISTANCE_NEXT_Y*2;
|
||||
|
||||
posY += cboPort3->getHeight() + DISTANCE_NEXT_Y;
|
||||
category.panel->add(lblMouseSpeed, DISTANCE_BORDER, posY);
|
||||
category.panel->add(sldMouseSpeed, DISTANCE_BORDER + lblMouseSpeed->getWidth() + 8, posY);
|
||||
category.panel->add(lblMouseSpeedInfo, sldMouseSpeed->getX() + sldMouseSpeed->getWidth() + 12, posY);
|
||||
|
||||
category.panel->add(lblPort0mousemode, 320, posY);
|
||||
category.panel->add(cboPort0mousemode, 320 + lblPort0mousemode->getWidth() + 8, posY);
|
||||
category.panel->add(lblPort0mousemode, DISTANCE_BORDER, posY);
|
||||
category.panel->add(cboPort0mousemode, lblPort0mousemode->getX() + lblPort0mousemode->getWidth() + 8, posY);
|
||||
|
||||
posY += sldMouseSpeed->getHeight() + DISTANCE_NEXT_Y * 2;
|
||||
category.panel->add(chkMouseHack, DISTANCE_BORDER + lblA->getWidth() + 8, posY);
|
||||
category.panel->add(lblPort1mousemode, 320, posY);
|
||||
category.panel->add(cboPort1mousemode, 320 + lblPort1mousemode->getWidth() + 8, posY);
|
||||
category.panel->add(lblMouseSpeed, cboPort0mousemode->getX() + cboPort0mousemode->getWidth() + (DISTANCE_NEXT_X * 2), posY);
|
||||
category.panel->add(sldMouseSpeed, lblMouseSpeed->getX() + lblMouseSpeed->getWidth() + 8, posY);
|
||||
category.panel->add(lblMouseSpeedInfo, sldMouseSpeed->getX() + sldMouseSpeed->getWidth() + 8, posY);
|
||||
posY += lblMouseSpeed->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
category.panel->add(lblPort1mousemode, DISTANCE_BORDER, posY);
|
||||
category.panel->add(cboPort1mousemode, lblPort1mousemode->getX() + lblPort1mousemode->getWidth() + 8, posY);
|
||||
posY += lblPort1mousemode->getHeight() + DISTANCE_NEXT_Y * 2;
|
||||
|
||||
posY += cboAutofire->getHeight() + DISTANCE_NEXT_Y;
|
||||
category.panel->add(lblAutofire, DISTANCE_BORDER, posY);
|
||||
category.panel->add(cboAutofire, DISTANCE_BORDER + lblAutofire->getWidth() + 8, posY);
|
||||
posY += cboAutofire->getHeight() + DISTANCE_NEXT_Y;
|
||||
category.panel->add(chkMouseHack, cboAutofire->getX() + cboAutofire->getWidth() + DISTANCE_NEXT_X, posY);
|
||||
posY += chkMouseHack->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
#ifdef PANDORA
|
||||
category.panel->add(lblTapDelay, 300, posY);
|
||||
category.panel->add(cboTapDelay, 300 + lblTapDelay->getWidth() + 8, posY);
|
||||
posY += cboTapDelay->getHeight() + DISTANCE_NEXT_Y;
|
||||
#else
|
||||
posY += chkMouseHack->getHeight() + DISTANCE_NEXT_Y;
|
||||
#endif
|
||||
category.panel->add(chkCustomCtrl, DISTANCE_BORDER + lblA->getWidth() + 8, posY);
|
||||
posY += chkCustomCtrl->getHeight() + DISTANCE_NEXT_Y;
|
||||
category.panel->add(lblA, DISTANCE_BORDER, posY);
|
||||
category.panel->add(txtA, DISTANCE_BORDER + lblA->getWidth() + 8, posY);
|
||||
|
||||
int posColumn2 = txtA->getX() + txtA->getWidth() + 12;
|
||||
|
||||
category.panel->add(lblB, posColumn2, posY);
|
||||
category.panel->add(txtB, posColumn2 + lblB->getWidth() + 8, posY);
|
||||
posY += txtA->getHeight() + DISTANCE_NEXT_Y;
|
||||
category.panel->add(lblX, DISTANCE_BORDER, posY);
|
||||
category.panel->add(txtX, DISTANCE_BORDER + lblX->getWidth() + 8, posY);
|
||||
category.panel->add(lblY, posColumn2, posY);
|
||||
category.panel->add(txtY, posColumn2 + lblY->getWidth() + 8, posY);
|
||||
posY += txtX->getHeight() + DISTANCE_NEXT_Y;
|
||||
category.panel->add(lblL, DISTANCE_BORDER, posY);
|
||||
category.panel->add(txtL, DISTANCE_BORDER + lblL->getWidth() + 8, posY);
|
||||
category.panel->add(lblR, posColumn2, posY);
|
||||
category.panel->add(txtR, posColumn2 + lblR->getWidth() + 8, posY);
|
||||
posY += txtL->getHeight() + DISTANCE_NEXT_Y;
|
||||
category.panel->add(lblUp, DISTANCE_BORDER, posY);
|
||||
category.panel->add(txtUp, DISTANCE_BORDER + lblUp->getWidth() + 8, posY);
|
||||
category.panel->add(lblDown, posColumn2, posY);
|
||||
category.panel->add(txtDown, posColumn2 + lblDown->getWidth() + 8, posY);
|
||||
posY += txtUp->getHeight() + DISTANCE_NEXT_Y;
|
||||
category.panel->add(lblLeft, DISTANCE_BORDER, posY);
|
||||
category.panel->add(txtLeft, DISTANCE_BORDER + lblLeft->getWidth() + 8, posY);
|
||||
category.panel->add(lblRight, posColumn2, posY);
|
||||
category.panel->add(txtRight, posColumn2 + lblRight->getWidth() + 8, posY);
|
||||
posY += txtLeft->getHeight() + DISTANCE_NEXT_Y;
|
||||
category.panel->add(lblPlay, DISTANCE_BORDER, posY);
|
||||
category.panel->add(txtPlay, DISTANCE_BORDER + lblPlay->getWidth() + 8, posY);
|
||||
|
||||
RefreshPanelInput();
|
||||
}
|
||||
|
@ -928,30 +566,6 @@ void ExitPanelInput()
|
|||
delete cboTapDelay;
|
||||
#endif
|
||||
delete chkMouseHack;
|
||||
|
||||
delete chkCustomCtrl;
|
||||
delete lblA;
|
||||
delete txtA;
|
||||
delete lblB;
|
||||
delete txtB;
|
||||
delete lblX;
|
||||
delete txtX;
|
||||
delete lblY;
|
||||
delete txtY;
|
||||
delete lblL;
|
||||
delete txtL;
|
||||
delete lblR;
|
||||
delete txtR;
|
||||
delete lblUp;
|
||||
delete txtUp;
|
||||
delete lblDown;
|
||||
delete txtDown;
|
||||
delete lblLeft;
|
||||
delete txtLeft;
|
||||
delete lblRight;
|
||||
delete txtRight;
|
||||
delete txtPlay;
|
||||
|
||||
delete inputActionListener;
|
||||
}
|
||||
|
||||
|
@ -1125,20 +739,6 @@ void RefreshPanelInput()
|
|||
cboTapDelay->setSelected(2);
|
||||
#endif
|
||||
chkMouseHack->setSelected(changed_prefs.input_tablet == TABLET_MOUSEHACK);
|
||||
|
||||
chkCustomCtrl->setSelected(changed_prefs.customControls);
|
||||
|
||||
txtA->setText(changed_prefs.custom_a);
|
||||
txtB->setText(changed_prefs.custom_b);
|
||||
txtX->setText(changed_prefs.custom_x);
|
||||
txtY->setText(changed_prefs.custom_y);
|
||||
txtL->setText(changed_prefs.custom_l);
|
||||
txtR->setText(changed_prefs.custom_r);
|
||||
txtUp->setText(changed_prefs.custom_up);
|
||||
txtDown->setText(changed_prefs.custom_down);
|
||||
txtLeft->setText(changed_prefs.custom_left);
|
||||
txtRight->setText(changed_prefs.custom_right);
|
||||
txtPlay->setText(changed_prefs.custom_play);
|
||||
}
|
||||
|
||||
bool HelpPanelInput(std::vector<std::string> &helptext)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue