Add 4/3 schrink in panel misk
This commit is contained in:
parent
6cbdde5724
commit
0cf597e9aa
2 changed files with 38 additions and 21 deletions
|
@ -22,7 +22,9 @@
|
|||
|
||||
static gcn::UaeCheckBox* chkStatusLine;
|
||||
static gcn::UaeCheckBox* chkShowGUI;
|
||||
#ifndef RASPBERRY
|
||||
#ifdef RASPBERRY
|
||||
static gcn::UaeCheckBox* chkAspect;
|
||||
#else
|
||||
static gcn::Label* lblPandoraSpeed;
|
||||
static gcn::Label* lblPandoraSpeedInfo;
|
||||
static gcn::Slider* sldPandoraSpeed;
|
||||
|
@ -39,7 +41,10 @@ class MiscActionListener : public gcn::ActionListener
|
|||
else if (actionEvent.getSource() == chkShowGUI)
|
||||
changed_prefs.start_gui = chkShowGUI->isSelected();
|
||||
|
||||
#ifndef RASPBERRY
|
||||
#ifdef RASPBERRY
|
||||
else if (actionEvent.getSource() == chkAspect)
|
||||
changed_prefs.gfx_correct_aspect = chkAspect->isSelected();
|
||||
#else
|
||||
else if (actionEvent.getSource() == sldPandoraSpeed)
|
||||
{
|
||||
int newspeed = (int) sldPandoraSpeed->getValue();
|
||||
|
@ -60,32 +65,38 @@ void InitPanelMisc(const struct _ConfigCategory& category)
|
|||
{
|
||||
miscActionListener = new MiscActionListener();
|
||||
|
||||
chkStatusLine = new gcn::UaeCheckBox("Status Line");
|
||||
chkStatusLine = new gcn::UaeCheckBox("Status Line");
|
||||
chkStatusLine->addActionListener(miscActionListener);
|
||||
|
||||
chkShowGUI = new gcn::UaeCheckBox("Show GUI on startup");
|
||||
chkShowGUI->setId("ShowGUI");
|
||||
chkShowGUI = new gcn::UaeCheckBox("Show GUI on startup");
|
||||
chkShowGUI->setId("ShowGUI");
|
||||
chkShowGUI->addActionListener(miscActionListener);
|
||||
|
||||
#ifndef RASPBERRY
|
||||
lblPandoraSpeed = new gcn::Label("Pandora Speed:");
|
||||
#ifdef RASPBERRY
|
||||
chkAspect = new gcn::UaeCheckBox("4/3 ratio shrink");
|
||||
chkAspect->addActionListener(miscActionListener);
|
||||
#else
|
||||
lblPandoraSpeed = new gcn::Label("Pandora Speed:");
|
||||
lblPandoraSpeed->setSize(110, LABEL_HEIGHT);
|
||||
lblPandoraSpeed->setAlignment(gcn::Graphics::RIGHT);
|
||||
sldPandoraSpeed = new gcn::Slider(500, 1260);
|
||||
sldPandoraSpeed->setSize(200, SLIDER_HEIGHT);
|
||||
sldPandoraSpeed->setBaseColor(gui_baseCol);
|
||||
sldPandoraSpeed->setMarkerLength(20);
|
||||
sldPandoraSpeed->setStepLength(20);
|
||||
sldPandoraSpeed->setId("PandSpeed");
|
||||
sldPandoraSpeed->setMarkerLength(20);
|
||||
sldPandoraSpeed->setStepLength(20);
|
||||
sldPandoraSpeed->setId("PandSpeed");
|
||||
sldPandoraSpeed->addActionListener(miscActionListener);
|
||||
lblPandoraSpeedInfo = new gcn::Label("1000 MHz");
|
||||
#endif
|
||||
int posY = DISTANCE_BORDER;
|
||||
int posY = DISTANCE_BORDER;
|
||||
category.panel->add(chkStatusLine, DISTANCE_BORDER, posY);
|
||||
posY += chkStatusLine->getHeight() + DISTANCE_NEXT_Y;
|
||||
category.panel->add(chkShowGUI, DISTANCE_BORDER, posY);
|
||||
posY += chkShowGUI->getHeight() + DISTANCE_NEXT_Y;
|
||||
#ifndef RASPBERRY
|
||||
#ifdef RASPBERRY
|
||||
category.panel->add(chkAspect, DISTANCE_BORDER, posY);
|
||||
posY += chkAspect->getHeight() + DISTANCE_NEXT_Y;
|
||||
#else
|
||||
category.panel->add(lblPandoraSpeed, DISTANCE_BORDER, posY);
|
||||
category.panel->add(sldPandoraSpeed, DISTANCE_BORDER + lblPandoraSpeed->getWidth() + 8, posY);
|
||||
category.panel->add(lblPandoraSpeedInfo, sldPandoraSpeed->getX() + sldPandoraSpeed->getWidth() + 12, posY);
|
||||
|
@ -99,7 +110,9 @@ void ExitPanelMisc(void)
|
|||
{
|
||||
delete chkStatusLine;
|
||||
delete chkShowGUI;
|
||||
#ifndef RASPBERRY
|
||||
#ifdef RASPBERRY
|
||||
delete chkAspect;
|
||||
#else
|
||||
delete lblPandoraSpeed;
|
||||
delete sldPandoraSpeed;
|
||||
delete lblPandoraSpeedInfo;
|
||||
|
@ -114,7 +127,9 @@ void RefreshPanelMisc(void)
|
|||
|
||||
chkStatusLine->setSelected(changed_prefs.leds_on_screen);
|
||||
chkShowGUI->setSelected(changed_prefs.start_gui);
|
||||
#ifndef RASPBERRY
|
||||
#ifdef RASPBERRY
|
||||
chkAspect->setSelected(changed_prefs.gfx_correct_aspect);
|
||||
#else
|
||||
sldPandoraSpeed->setValue(changed_prefs.pandora_cpu_speed);
|
||||
snprintf(tmp, 20, "%d MHz", changed_prefs.pandora_cpu_speed);
|
||||
lblPandoraSpeedInfo->setCaption(tmp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue