GUI improvements
This commit is contained in:
parent
aebaa7cd26
commit
9416319b12
35 changed files with 419 additions and 475 deletions
|
@ -35,6 +35,7 @@
|
|||
|
||||
#include "readcpu.h"
|
||||
#include "machdep/m68k.h"
|
||||
#include "memory.h"
|
||||
|
||||
extern const int areg_byteinc[];
|
||||
extern const int imm8_table[];
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <guisan.hpp>
|
||||
#include "SDL.h"
|
||||
#include <SDL_ttf.h>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include "SelectorEntry.hpp"
|
||||
|
@ -12,15 +11,11 @@
|
|||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "uae.h"
|
||||
#include "autoconf.h"
|
||||
#include "filesys.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
#include "pandora_gfx.h"
|
||||
|
||||
#define DIALOG_WIDTH 620
|
||||
#define DIALOG_WIDTH 520
|
||||
#define DIALOG_HEIGHT 202
|
||||
|
||||
static const char* harddisk_filter[] = {".hdf", "\0"};
|
||||
|
@ -47,7 +42,7 @@ static gcn::TextField* txtSize;
|
|||
class CreateFilesysHardfileActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == cmdPath)
|
||||
{
|
||||
|
@ -139,7 +134,7 @@ static void InitCreateFilesysHardfile()
|
|||
lblPath->setSize(100, LABEL_HEIGHT);
|
||||
lblPath->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtPath = new gcn::TextField();
|
||||
txtPath->setSize(438, TEXTFIELD_HEIGHT);
|
||||
txtPath->setSize(338, TEXTFIELD_HEIGHT);
|
||||
txtPath->setEnabled(false);
|
||||
cmdPath = new gcn::Button("...");
|
||||
cmdPath->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
|
@ -148,18 +143,28 @@ static void InitCreateFilesysHardfile()
|
|||
cmdPath->addActionListener(createFilesysHardfileActionListener);
|
||||
|
||||
int posY = DISTANCE_BORDER;
|
||||
int posX = DISTANCE_BORDER;
|
||||
|
||||
wndCreateFilesysHardfile->add(lblDevice, DISTANCE_BORDER, posY);
|
||||
wndCreateFilesysHardfile->add(txtDevice, DISTANCE_BORDER + lblDevice->getWidth() + 8, posY);
|
||||
wndCreateFilesysHardfile->add(chkAutoboot, 235, posY + 1);
|
||||
wndCreateFilesysHardfile->add(lblBootPri, 335, posY);
|
||||
wndCreateFilesysHardfile->add(txtBootPri, 335 + lblBootPri->getWidth() + 8, posY);
|
||||
posX += lblDevice->getWidth() + 8;
|
||||
|
||||
wndCreateFilesysHardfile->add(txtDevice, posX, posY);
|
||||
posX += txtDevice->getWidth() + DISTANCE_BORDER * 2;
|
||||
|
||||
wndCreateFilesysHardfile->add(chkAutoboot, posX, posY + 1);
|
||||
posX += chkAutoboot->getWidth() + DISTANCE_BORDER;
|
||||
|
||||
wndCreateFilesysHardfile->add(lblBootPri, posX, posY);
|
||||
wndCreateFilesysHardfile->add(txtBootPri, posX + lblBootPri->getWidth() + 8, posY);
|
||||
posY += txtDevice->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
wndCreateFilesysHardfile->add(lblPath, DISTANCE_BORDER, posY);
|
||||
wndCreateFilesysHardfile->add(txtPath, DISTANCE_BORDER + lblPath->getWidth() + 8, posY);
|
||||
wndCreateFilesysHardfile->add(cmdPath, wndCreateFilesysHardfile->getWidth() - DISTANCE_BORDER - SMALL_BUTTON_WIDTH, posY);
|
||||
posY += txtPath->getHeight() + DISTANCE_NEXT_Y;
|
||||
wndCreateFilesysHardfile->add(lblSize, DISTANCE_BORDER, posY);
|
||||
wndCreateFilesysHardfile->add(txtSize, DISTANCE_BORDER + lblSize->getWidth() + 8, posY);
|
||||
|
||||
wndCreateFilesysHardfile->add(lblSize, lblDevice->getX(), posY);
|
||||
wndCreateFilesysHardfile->add(txtSize, txtDevice->getX(), posY);
|
||||
|
||||
wndCreateFilesysHardfile->add(cmdOK);
|
||||
wndCreateFilesysHardfile->add(cmdCancel);
|
||||
|
@ -258,7 +263,7 @@ static void CreateFilesysHardfileLoop()
|
|||
|
||||
bool CreateFilesysHardfile(void)
|
||||
{
|
||||
std::string strroot;
|
||||
string strroot;
|
||||
char tmp[32];
|
||||
char zero = 0;
|
||||
|
||||
|
@ -290,7 +295,7 @@ bool CreateFilesysHardfile(void)
|
|||
int bp = tweakbootpri(atoi(txtBootPri->getText().c_str()), 1, 0);
|
||||
extractPath(const_cast<char *>(txtPath->getText().c_str()), currentDir);
|
||||
|
||||
FILE * newFile = fopen(txtPath->getText().c_str(), "wb");
|
||||
FILE* newFile = fopen(txtPath->getText().c_str(), "wb");
|
||||
if (!newFile)
|
||||
{
|
||||
ShowMessage("Create Hardfile", "Unable to create new file.", "", "Ok", "");
|
||||
|
|
|
@ -11,16 +11,13 @@
|
|||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "memory.h"
|
||||
#include "uae.h"
|
||||
#include "autoconf.h"
|
||||
#include "filesys.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
#include "pandora_gfx.h"
|
||||
|
||||
#define DIALOG_WIDTH 520
|
||||
#define DIALOG_HEIGHT 202
|
||||
#define DIALOG_HEIGHT 270
|
||||
|
||||
static const char* harddisk_filter[] = {".hdf", "\0"};
|
||||
|
||||
|
@ -71,7 +68,7 @@ static void check_rdb(const TCHAR* filename)
|
|||
class FilesysHardfileActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == cmdPath)
|
||||
{
|
||||
|
@ -140,7 +137,7 @@ static void InitEditFilesysHardfile()
|
|||
lblDevice->setSize(100, LABEL_HEIGHT);
|
||||
lblDevice->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtDevice = new gcn::TextField();
|
||||
txtDevice->setSize(80, TEXTFIELD_HEIGHT);
|
||||
txtDevice->setSize(60, TEXTFIELD_HEIGHT);
|
||||
txtDevice->setId("hdfDev");
|
||||
|
||||
chkReadWrite = new gcn::UaeCheckBox("Read/Write", true);
|
||||
|
@ -188,7 +185,7 @@ static void InitEditFilesysHardfile()
|
|||
lblPath->setSize(100, LABEL_HEIGHT);
|
||||
lblPath->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtPath = new gcn::TextField();
|
||||
txtPath->setSize(438, TEXTFIELD_HEIGHT);
|
||||
txtPath->setSize(338, TEXTFIELD_HEIGHT);
|
||||
txtPath->setEnabled(false);
|
||||
cmdPath = new gcn::Button("...");
|
||||
cmdPath->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
|
@ -197,26 +194,40 @@ static void InitEditFilesysHardfile()
|
|||
cmdPath->addActionListener(filesysHardfileActionListener);
|
||||
|
||||
int posY = DISTANCE_BORDER;
|
||||
int posX = DISTANCE_BORDER;
|
||||
|
||||
wndEditFilesysHardfile->add(lblDevice, DISTANCE_BORDER, posY);
|
||||
wndEditFilesysHardfile->add(txtDevice, DISTANCE_BORDER + lblDevice->getWidth() + 8, posY);
|
||||
wndEditFilesysHardfile->add(chkReadWrite, 235, posY + 1);
|
||||
wndEditFilesysHardfile->add(chkAutoboot, 360, posY + 1);
|
||||
wndEditFilesysHardfile->add(lblBootPri, 460, posY);
|
||||
wndEditFilesysHardfile->add(txtBootPri, 460 + lblBootPri->getWidth() + 8, posY);
|
||||
posX += lblDevice->getWidth() + 8;
|
||||
|
||||
wndEditFilesysHardfile->add(txtDevice, posX, posY);
|
||||
posX += txtDevice->getWidth() + DISTANCE_BORDER * 2;
|
||||
|
||||
wndEditFilesysHardfile->add(chkReadWrite, posX, posY + 1);
|
||||
posY += txtDevice->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
wndEditFilesysHardfile->add(chkAutoboot, chkReadWrite->getX(), posY + 1);
|
||||
posX += chkAutoboot->getWidth() + DISTANCE_BORDER;
|
||||
|
||||
wndEditFilesysHardfile->add(lblBootPri, posX, posY);
|
||||
wndEditFilesysHardfile->add(txtBootPri, posX + lblBootPri->getWidth() + 8, posY);
|
||||
posY += txtBootPri->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
wndEditFilesysHardfile->add(lblPath, DISTANCE_BORDER, posY);
|
||||
wndEditFilesysHardfile->add(txtPath, DISTANCE_BORDER + lblPath->getWidth() + 8, posY);
|
||||
wndEditFilesysHardfile->add(cmdPath, wndEditFilesysHardfile->getWidth() - DISTANCE_BORDER - SMALL_BUTTON_WIDTH, posY);
|
||||
posY += txtPath->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
wndEditFilesysHardfile->add(lblSurfaces, DISTANCE_BORDER, posY);
|
||||
wndEditFilesysHardfile->add(txtSurfaces, DISTANCE_BORDER + lblSurfaces->getWidth() + 8, posY);
|
||||
wndEditFilesysHardfile->add(lblReserved, 240, posY);
|
||||
wndEditFilesysHardfile->add(txtReserved, 240 + lblReserved->getWidth() + 8, posY);
|
||||
wndEditFilesysHardfile->add(lblReserved, txtSurfaces->getX() + txtSurfaces->getWidth() + DISTANCE_BORDER, posY);
|
||||
wndEditFilesysHardfile->add(txtReserved, lblReserved->getX() + lblReserved->getWidth() + 8, posY);
|
||||
posY += txtSurfaces->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
wndEditFilesysHardfile->add(lblSectors, DISTANCE_BORDER, posY);
|
||||
wndEditFilesysHardfile->add(txtSectors, DISTANCE_BORDER + lblSectors->getWidth() + 8, posY);
|
||||
wndEditFilesysHardfile->add(lblBlocksize, 240, posY);
|
||||
wndEditFilesysHardfile->add(txtBlocksize, 240 + lblBlocksize->getWidth() + 8, posY);
|
||||
|
||||
wndEditFilesysHardfile->add(lblBlocksize, txtSectors->getX() + txtSectors->getWidth() + DISTANCE_BORDER, posY);
|
||||
wndEditFilesysHardfile->add(txtBlocksize, lblBlocksize->getX() + lblBlocksize->getWidth() + 8, posY);
|
||||
posY += txtSectors->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
wndEditFilesysHardfile->add(cmdOK);
|
||||
|
|
|
@ -11,195 +11,204 @@
|
|||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "memory.h"
|
||||
#include "uae.h"
|
||||
#include "autoconf.h"
|
||||
#include "filesys.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
#include "pandora_gfx.h"
|
||||
|
||||
#define DIALOG_WIDTH 520
|
||||
#define DIALOG_HEIGHT 202
|
||||
|
||||
extern std::string volName;
|
||||
extern string volName;
|
||||
|
||||
static bool dialogResult = false;
|
||||
static bool dialogFinished = false;
|
||||
|
||||
static gcn::Window *wndEditFilesysVirtual;
|
||||
static gcn::Window* wndEditFilesysVirtual;
|
||||
static gcn::Button* cmdOK;
|
||||
static gcn::Button* cmdCancel;
|
||||
static gcn::Label *lblDevice;
|
||||
static gcn::TextField *txtDevice;
|
||||
static gcn::Label *lblVolume;
|
||||
static gcn::TextField *txtVolume;
|
||||
static gcn::Label *lblPath;
|
||||
static gcn::TextField *txtPath;
|
||||
static gcn::Label* lblDevice;
|
||||
static gcn::TextField* txtDevice;
|
||||
static gcn::Label* lblVolume;
|
||||
static gcn::TextField* txtVolume;
|
||||
static gcn::Label* lblPath;
|
||||
static gcn::TextField* txtPath;
|
||||
static gcn::Button* cmdPath;
|
||||
static gcn::UaeCheckBox* chkReadWrite;
|
||||
static gcn::UaeCheckBox* chkAutoboot;
|
||||
static gcn::Label *lblBootPri;
|
||||
static gcn::TextField *txtBootPri;
|
||||
static gcn::Label* lblBootPri;
|
||||
static gcn::TextField* txtBootPri;
|
||||
|
||||
|
||||
class FilesysVirtualActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
{
|
||||
if(actionEvent.getSource() == cmdPath)
|
||||
{
|
||||
char tmp[MAX_PATH];
|
||||
strncpy(tmp, txtPath->getText().c_str(), MAX_PATH);
|
||||
wndEditFilesysVirtual->releaseModalFocus();
|
||||
if (SelectFolder("Select folder", tmp))
|
||||
{
|
||||
txtPath->setText(tmp);
|
||||
txtVolume->setText(volName);
|
||||
}
|
||||
wndEditFilesysVirtual->requestModalFocus();
|
||||
cmdPath->requestFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (actionEvent.getSource() == cmdOK)
|
||||
{
|
||||
if(txtDevice->getText().length() <= 0)
|
||||
{
|
||||
wndEditFilesysVirtual->setCaption("Please enter a device name.");
|
||||
return;
|
||||
}
|
||||
if(txtVolume->getText().length() <= 0)
|
||||
{
|
||||
wndEditFilesysVirtual->setCaption("Please enter a volume name.");
|
||||
return;
|
||||
}
|
||||
dialogResult = true;
|
||||
}
|
||||
dialogFinished = true;
|
||||
}
|
||||
}
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == cmdPath)
|
||||
{
|
||||
char tmp[MAX_PATH];
|
||||
strncpy(tmp, txtPath->getText().c_str(), MAX_PATH);
|
||||
wndEditFilesysVirtual->releaseModalFocus();
|
||||
if (SelectFolder("Select folder", tmp))
|
||||
{
|
||||
txtPath->setText(tmp);
|
||||
txtVolume->setText(volName);
|
||||
}
|
||||
wndEditFilesysVirtual->requestModalFocus();
|
||||
cmdPath->requestFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (actionEvent.getSource() == cmdOK)
|
||||
{
|
||||
if (txtDevice->getText().length() <= 0)
|
||||
{
|
||||
wndEditFilesysVirtual->setCaption("Please enter a device name.");
|
||||
return;
|
||||
}
|
||||
if (txtVolume->getText().length() <= 0)
|
||||
{
|
||||
wndEditFilesysVirtual->setCaption("Please enter a volume name.");
|
||||
return;
|
||||
}
|
||||
dialogResult = true;
|
||||
}
|
||||
dialogFinished = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static FilesysVirtualActionListener* filesysVirtualActionListener;
|
||||
|
||||
|
||||
static void InitEditFilesysVirtual(void)
|
||||
static void InitEditFilesysVirtual()
|
||||
{
|
||||
wndEditFilesysVirtual = new gcn::Window("Edit");
|
||||
wndEditFilesysVirtual->setSize(DIALOG_WIDTH, DIALOG_HEIGHT);
|
||||
wndEditFilesysVirtual->setPosition((GUI_WIDTH - DIALOG_WIDTH) / 2, (GUI_HEIGHT - DIALOG_HEIGHT) / 2);
|
||||
wndEditFilesysVirtual->setBaseColor(gui_baseCol + 0x202020);
|
||||
wndEditFilesysVirtual->setCaption("Volume settings");
|
||||
wndEditFilesysVirtual->setTitleBarHeight(TITLEBAR_HEIGHT);
|
||||
|
||||
filesysVirtualActionListener = new FilesysVirtualActionListener();
|
||||
|
||||
wndEditFilesysVirtual->setPosition((GUI_WIDTH - DIALOG_WIDTH) / 2, (GUI_HEIGHT - DIALOG_HEIGHT) / 2);
|
||||
wndEditFilesysVirtual->setBaseColor(gui_baseCol + 0x202020);
|
||||
wndEditFilesysVirtual->setCaption("Volume settings");
|
||||
wndEditFilesysVirtual->setTitleBarHeight(TITLEBAR_HEIGHT);
|
||||
|
||||
filesysVirtualActionListener = new FilesysVirtualActionListener();
|
||||
|
||||
cmdOK = new gcn::Button("Ok");
|
||||
cmdOK->setSize(BUTTON_WIDTH, BUTTON_HEIGHT);
|
||||
cmdOK->setPosition(DIALOG_WIDTH - DISTANCE_BORDER - 2 * BUTTON_WIDTH - DISTANCE_NEXT_X, DIALOG_HEIGHT - 2 * DISTANCE_BORDER - BUTTON_HEIGHT - 10);
|
||||
cmdOK->setBaseColor(gui_baseCol + 0x202020);
|
||||
cmdOK->setId("virtOK");
|
||||
cmdOK->addActionListener(filesysVirtualActionListener);
|
||||
|
||||
cmdOK->setBaseColor(gui_baseCol + 0x202020);
|
||||
cmdOK->setId("virtOK");
|
||||
cmdOK->addActionListener(filesysVirtualActionListener);
|
||||
|
||||
cmdCancel = new gcn::Button("Cancel");
|
||||
cmdCancel->setSize(BUTTON_WIDTH, BUTTON_HEIGHT);
|
||||
cmdCancel->setPosition(DIALOG_WIDTH - DISTANCE_BORDER - BUTTON_WIDTH, DIALOG_HEIGHT - 2 * DISTANCE_BORDER - BUTTON_HEIGHT - 10);
|
||||
cmdCancel->setBaseColor(gui_baseCol + 0x202020);
|
||||
cmdCancel->setId("virtCancel");
|
||||
cmdCancel->addActionListener(filesysVirtualActionListener);
|
||||
cmdCancel->setBaseColor(gui_baseCol + 0x202020);
|
||||
cmdCancel->setId("virtCancel");
|
||||
cmdCancel->addActionListener(filesysVirtualActionListener);
|
||||
|
||||
lblDevice = new gcn::Label("Device Name:");
|
||||
lblDevice->setSize(100, LABEL_HEIGHT);
|
||||
lblDevice->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtDevice = new gcn::TextField();
|
||||
txtDevice->setSize(80, TEXTFIELD_HEIGHT);
|
||||
txtDevice->setId("virtDev");
|
||||
lblDevice = new gcn::Label("Device Name:");
|
||||
lblDevice->setSize(100, LABEL_HEIGHT);
|
||||
lblDevice->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtDevice = new gcn::TextField();
|
||||
txtDevice->setSize(60, TEXTFIELD_HEIGHT);
|
||||
txtDevice->setId("virtDev");
|
||||
|
||||
lblVolume = new gcn::Label("Volume Label:");
|
||||
lblVolume->setSize(100, LABEL_HEIGHT);
|
||||
lblVolume->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtVolume = new gcn::TextField();
|
||||
txtVolume->setSize(80, TEXTFIELD_HEIGHT);
|
||||
txtVolume->setId("virtVol");
|
||||
lblVolume = new gcn::Label("Volume Label:");
|
||||
lblVolume->setSize(100, LABEL_HEIGHT);
|
||||
lblVolume->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtVolume = new gcn::TextField();
|
||||
txtVolume->setSize(60, TEXTFIELD_HEIGHT);
|
||||
txtVolume->setId("virtVol");
|
||||
|
||||
lblPath = new gcn::Label("Path:");
|
||||
lblPath->setSize(100, LABEL_HEIGHT);
|
||||
lblPath->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtPath = new gcn::TextField();
|
||||
txtPath->setSize(338, TEXTFIELD_HEIGHT);
|
||||
txtPath->setEnabled(false);
|
||||
cmdPath = new gcn::Button("...");
|
||||
cmdPath->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
cmdPath->setBaseColor(gui_baseCol + 0x202020);
|
||||
cmdPath->setId("virtPath");
|
||||
cmdPath->addActionListener(filesysVirtualActionListener);
|
||||
lblPath = new gcn::Label("Path:");
|
||||
lblPath->setSize(100, LABEL_HEIGHT);
|
||||
lblPath->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtPath = new gcn::TextField();
|
||||
txtPath->setSize(338, TEXTFIELD_HEIGHT);
|
||||
txtPath->setEnabled(false);
|
||||
cmdPath = new gcn::Button("...");
|
||||
cmdPath->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
cmdPath->setBaseColor(gui_baseCol + 0x202020);
|
||||
cmdPath->setId("virtPath");
|
||||
cmdPath->addActionListener(filesysVirtualActionListener);
|
||||
|
||||
chkReadWrite = new gcn::UaeCheckBox("Read/Write", true);
|
||||
chkReadWrite->setId("virtRW");
|
||||
chkReadWrite->setId("virtRW");
|
||||
|
||||
chkAutoboot = new gcn::UaeCheckBox("Bootable", true);
|
||||
chkAutoboot->setId("virtAutoboot");
|
||||
chkAutoboot->setId("virtAutoboot");
|
||||
|
||||
lblBootPri = new gcn::Label("Boot priority:");
|
||||
lblBootPri->setSize(84, LABEL_HEIGHT);
|
||||
lblBootPri->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtBootPri = new gcn::TextField();
|
||||
txtBootPri->setSize(40, TEXTFIELD_HEIGHT);
|
||||
txtBootPri->setId("virtBootpri");
|
||||
|
||||
int posY = DISTANCE_BORDER;
|
||||
wndEditFilesysVirtual->add(lblDevice, DISTANCE_BORDER, posY);
|
||||
wndEditFilesysVirtual->add(txtDevice, DISTANCE_BORDER + lblDevice->getWidth() + 8, posY);
|
||||
wndEditFilesysVirtual->add(chkReadWrite, 250, posY + 1);
|
||||
posY += txtDevice->getHeight() + DISTANCE_NEXT_Y;
|
||||
wndEditFilesysVirtual->add(lblVolume, DISTANCE_BORDER, posY);
|
||||
wndEditFilesysVirtual->add(txtVolume, DISTANCE_BORDER + lblDevice->getWidth() + 8, posY);
|
||||
wndEditFilesysVirtual->add(chkAutoboot, 250, posY + 1);
|
||||
wndEditFilesysVirtual->add(lblBootPri, 374, posY);
|
||||
wndEditFilesysVirtual->add(txtBootPri, 374 + lblBootPri->getWidth() + 8, posY);
|
||||
posY += txtDevice->getHeight() + DISTANCE_NEXT_Y;
|
||||
wndEditFilesysVirtual->add(lblPath, DISTANCE_BORDER, posY);
|
||||
wndEditFilesysVirtual->add(txtPath, DISTANCE_BORDER + lblDevice->getWidth() + 8, posY);
|
||||
wndEditFilesysVirtual->add(cmdPath, wndEditFilesysVirtual->getWidth() - DISTANCE_BORDER - SMALL_BUTTON_WIDTH, posY);
|
||||
posY += txtDevice->getHeight() + DISTANCE_NEXT_Y;
|
||||
lblBootPri = new gcn::Label("Boot priority:");
|
||||
lblBootPri->setSize(100, LABEL_HEIGHT);
|
||||
lblBootPri->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtBootPri = new gcn::TextField();
|
||||
txtBootPri->setSize(40, TEXTFIELD_HEIGHT);
|
||||
txtBootPri->setId("virtBootpri");
|
||||
|
||||
wndEditFilesysVirtual->add(cmdOK);
|
||||
wndEditFilesysVirtual->add(cmdCancel);
|
||||
int posY = DISTANCE_BORDER;
|
||||
int posX = DISTANCE_BORDER;
|
||||
|
||||
gui_top->add(wndEditFilesysVirtual);
|
||||
|
||||
txtDevice->requestFocus();
|
||||
wndEditFilesysVirtual->requestModalFocus();
|
||||
wndEditFilesysVirtual->add(lblDevice, DISTANCE_BORDER, posY);
|
||||
posX += lblDevice->getWidth() + 8;
|
||||
|
||||
wndEditFilesysVirtual->add(txtDevice, posX, posY);
|
||||
posX += txtDevice->getWidth() + DISTANCE_BORDER*2;
|
||||
|
||||
wndEditFilesysVirtual->add(chkReadWrite, posX, posY + 1);
|
||||
posY += txtDevice->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
wndEditFilesysVirtual->add(lblVolume, DISTANCE_BORDER, posY);
|
||||
wndEditFilesysVirtual->add(txtVolume, txtDevice->getX(), posY);
|
||||
|
||||
wndEditFilesysVirtual->add(chkAutoboot, chkReadWrite->getX(), posY + 1);
|
||||
posX += chkAutoboot->getWidth() + DISTANCE_BORDER * 2;
|
||||
|
||||
wndEditFilesysVirtual->add(lblBootPri, posX, posY);
|
||||
wndEditFilesysVirtual->add(txtBootPri, posX + lblBootPri->getWidth() + 8, posY);
|
||||
posY += txtDevice->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
wndEditFilesysVirtual->add(lblPath, DISTANCE_BORDER, posY);
|
||||
wndEditFilesysVirtual->add(txtPath, DISTANCE_BORDER + lblDevice->getWidth() + 8, posY);
|
||||
wndEditFilesysVirtual->add(cmdPath, wndEditFilesysVirtual->getWidth() - DISTANCE_BORDER - SMALL_BUTTON_WIDTH, posY);
|
||||
posY += txtDevice->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
wndEditFilesysVirtual->add(cmdOK);
|
||||
wndEditFilesysVirtual->add(cmdCancel);
|
||||
|
||||
gui_top->add(wndEditFilesysVirtual);
|
||||
|
||||
txtDevice->requestFocus();
|
||||
wndEditFilesysVirtual->requestModalFocus();
|
||||
}
|
||||
|
||||
|
||||
static void ExitEditFilesysVirtual(void)
|
||||
static void ExitEditFilesysVirtual()
|
||||
{
|
||||
wndEditFilesysVirtual->releaseModalFocus();
|
||||
gui_top->remove(wndEditFilesysVirtual);
|
||||
wndEditFilesysVirtual->releaseModalFocus();
|
||||
gui_top->remove(wndEditFilesysVirtual);
|
||||
|
||||
delete lblDevice;
|
||||
delete txtDevice;
|
||||
delete lblVolume;
|
||||
delete txtVolume;
|
||||
delete lblPath;
|
||||
delete txtPath;
|
||||
delete cmdPath;
|
||||
delete chkReadWrite;
|
||||
delete chkAutoboot;
|
||||
delete lblBootPri;
|
||||
delete txtBootPri;
|
||||
|
||||
delete cmdOK;
|
||||
delete cmdCancel;
|
||||
delete filesysVirtualActionListener;
|
||||
|
||||
delete wndEditFilesysVirtual;
|
||||
delete lblDevice;
|
||||
delete txtDevice;
|
||||
delete lblVolume;
|
||||
delete txtVolume;
|
||||
delete lblPath;
|
||||
delete txtPath;
|
||||
delete cmdPath;
|
||||
delete chkReadWrite;
|
||||
delete chkAutoboot;
|
||||
delete lblBootPri;
|
||||
delete txtBootPri;
|
||||
|
||||
delete cmdOK;
|
||||
delete cmdCancel;
|
||||
delete filesysVirtualActionListener;
|
||||
|
||||
delete wndEditFilesysVirtual;
|
||||
}
|
||||
|
||||
|
||||
static void EditFilesysVirtualLoop(void)
|
||||
static void EditFilesysVirtualLoop()
|
||||
{
|
||||
while (!dialogFinished)
|
||||
{
|
||||
|
@ -238,7 +247,7 @@ static void EditFilesysVirtualLoop(void)
|
|||
case VK_A:
|
||||
event.key.keysym.sym = SDLK_RETURN;
|
||||
gui_input->pushInput(event); // Fire key down
|
||||
event.type = SDL_KEYUP; // and the key up
|
||||
event.type = SDL_KEYUP; // and the key up
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -262,70 +271,71 @@ static void EditFilesysVirtualLoop(void)
|
|||
|
||||
bool EditFilesysVirtual(int unit_no)
|
||||
{
|
||||
struct mountedinfo mi;
|
||||
struct uaedev_config_data *uci;
|
||||
std::string strdevname, strvolname, strroot;
|
||||
char tmp[32];
|
||||
|
||||
dialogResult = false;
|
||||
dialogFinished = false;
|
||||
struct mountedinfo mi;
|
||||
struct uaedev_config_data* uci;
|
||||
std::string strdevname, strvolname, strroot;
|
||||
char tmp[32];
|
||||
|
||||
InitEditFilesysVirtual();
|
||||
dialogResult = false;
|
||||
dialogFinished = false;
|
||||
|
||||
if(unit_no >= 0)
|
||||
{
|
||||
struct uaedev_config_info *ci;
|
||||
InitEditFilesysVirtual();
|
||||
|
||||
uci = &changed_prefs.mountconfig[unit_no];
|
||||
ci = &uci->ci;
|
||||
get_filesys_unitconfig(&changed_prefs, unit_no, &mi);
|
||||
if (unit_no >= 0)
|
||||
{
|
||||
struct uaedev_config_info* ci;
|
||||
|
||||
strdevname.assign(ci->devname);
|
||||
txtDevice->setText(strdevname);
|
||||
strvolname.assign(ci->volname);
|
||||
txtVolume->setText(strvolname);
|
||||
strroot.assign(ci->rootdir);
|
||||
txtPath->setText(strroot);
|
||||
chkReadWrite->setSelected(!ci->readonly);
|
||||
chkAutoboot->setSelected(ci->bootpri != BOOTPRI_NOAUTOBOOT);
|
||||
snprintf(tmp, 32, "%d", ci->bootpri >= -127 ? ci->bootpri : -127);
|
||||
txtBootPri->setText(tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
CreateDefaultDevicename(tmp);
|
||||
txtDevice->setText(tmp);
|
||||
txtVolume->setText(tmp);
|
||||
strroot.assign(currentDir);
|
||||
txtPath->setText(strroot);
|
||||
chkReadWrite->setSelected(true);
|
||||
txtBootPri->setText("0");
|
||||
}
|
||||
uci = &changed_prefs.mountconfig[unit_no];
|
||||
ci = &uci->ci;
|
||||
get_filesys_unitconfig(&changed_prefs, unit_no, &mi);
|
||||
|
||||
EditFilesysVirtualLoop();
|
||||
|
||||
if(dialogResult)
|
||||
{
|
||||
struct uaedev_config_info ci;
|
||||
int bp = tweakbootpri(atoi(txtBootPri->getText().c_str()), chkAutoboot->isSelected() ? 1 : 0, 0);
|
||||
extractPath((char *) txtPath->getText().c_str(), currentDir);
|
||||
|
||||
uci_set_defaults(&ci, true);
|
||||
strcpy(ci.devname, (char *) txtDevice->getText().c_str());
|
||||
strcpy(ci.volname, (char *) txtVolume->getText().c_str());
|
||||
strcpy(ci.rootdir, (char *) txtPath->getText().c_str());
|
||||
ci.type = UAEDEV_DIR;
|
||||
ci.readonly = !chkReadWrite->isSelected();
|
||||
ci.bootpri = bp;
|
||||
|
||||
uci = add_filesys_config(&changed_prefs, unit_no, &ci);
|
||||
if (uci) {
|
||||
struct hardfiledata *hfd = get_hardfile_data (uci->configoffset);
|
||||
hardfile_media_change (hfd, &ci, true, false);
|
||||
}
|
||||
}
|
||||
strdevname.assign(ci->devname);
|
||||
txtDevice->setText(strdevname);
|
||||
strvolname.assign(ci->volname);
|
||||
txtVolume->setText(strvolname);
|
||||
strroot.assign(ci->rootdir);
|
||||
txtPath->setText(strroot);
|
||||
chkReadWrite->setSelected(!ci->readonly);
|
||||
chkAutoboot->setSelected(ci->bootpri != BOOTPRI_NOAUTOBOOT);
|
||||
snprintf(tmp, 32, "%d", ci->bootpri >= -127 ? ci->bootpri : -127);
|
||||
txtBootPri->setText(tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
CreateDefaultDevicename(tmp);
|
||||
txtDevice->setText(tmp);
|
||||
txtVolume->setText(tmp);
|
||||
strroot.assign(currentDir);
|
||||
txtPath->setText(strroot);
|
||||
chkReadWrite->setSelected(true);
|
||||
txtBootPri->setText("0");
|
||||
}
|
||||
|
||||
ExitEditFilesysVirtual();
|
||||
EditFilesysVirtualLoop();
|
||||
|
||||
return dialogResult;
|
||||
if (dialogResult)
|
||||
{
|
||||
struct uaedev_config_info ci;
|
||||
int bp = tweakbootpri(atoi(txtBootPri->getText().c_str()), chkAutoboot->isSelected() ? 1 : 0, 0);
|
||||
extractPath(const_cast<char *>(txtPath->getText().c_str()), currentDir);
|
||||
|
||||
uci_set_defaults(&ci, true);
|
||||
strcpy(ci.devname, const_cast<char *>(txtDevice->getText().c_str()));
|
||||
strcpy(ci.volname, const_cast<char *>(txtVolume->getText().c_str()));
|
||||
strcpy(ci.rootdir, const_cast<char *>(txtPath->getText().c_str()));
|
||||
ci.type = UAEDEV_DIR;
|
||||
ci.readonly = !chkReadWrite->isSelected();
|
||||
ci.bootpri = bp;
|
||||
|
||||
uci = add_filesys_config(&changed_prefs, unit_no, &ci);
|
||||
if (uci)
|
||||
{
|
||||
struct hardfiledata* hfd = get_hardfile_data(uci->configoffset);
|
||||
hardfile_media_change(hfd, &ci, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
ExitEditFilesysVirtual();
|
||||
|
||||
return dialogResult;
|
||||
}
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
#include "pandora_gfx.h"
|
||||
|
||||
|
@ -20,7 +17,7 @@ static int msg_done = 0;
|
|||
class DoneActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
msg_done = 1;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <guisan.hpp>
|
||||
#include <guisan/sdl.hpp>
|
||||
#include "guisan/sdl/sdltruetypefont.hpp"
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
|
@ -7,7 +6,7 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
|
||||
#include "gui_handling.h"
|
||||
|
||||
typedef struct
|
||||
|
@ -254,12 +253,12 @@ bool HandleNavigation(int direction)
|
|||
|
||||
if (activeWidget != nullptr && activeWidget->getId().length() > 0)
|
||||
{
|
||||
std::string activeName = activeWidget->getId();
|
||||
string activeName = activeWidget->getId();
|
||||
bool bFoundEnabled = false;
|
||||
|
||||
while (!bFoundEnabled)
|
||||
{
|
||||
std::string searchFor = "";
|
||||
string searchFor = "";
|
||||
|
||||
for (int i = 0; navMap[i].activeWidget != "END"; ++i)
|
||||
{
|
||||
|
@ -317,5 +316,5 @@ bool HandleNavigation(int direction)
|
|||
|
||||
if (focusTarget != nullptr)
|
||||
focusTarget->requestFocus();
|
||||
return (focusTarget != nullptr);
|
||||
return focusTarget != nullptr;
|
||||
}
|
||||
|
|
|
@ -8,9 +8,7 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
|
@ -38,7 +36,7 @@ static gcn::UaeRadioButton* optFastest;
|
|||
class CPUButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == optCPU68000)
|
||||
{
|
||||
|
@ -88,7 +86,7 @@ static CPUButtonActionListener* cpuButtonActionListener;
|
|||
class FPUButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == optFPUnone)
|
||||
{
|
||||
|
@ -117,7 +115,7 @@ static FPUButtonActionListener* fpuButtonActionListener;
|
|||
class CPUSpeedButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == opt7Mhz)
|
||||
changed_prefs.m68k_speed = M68K_SPEED_7MHZ_CYCLES;
|
||||
|
@ -136,7 +134,7 @@ static CPUSpeedButtonActionListener* cpuSpeedButtonActionListener;
|
|||
class CPU24BitActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
changed_prefs.address_space_24 = chk24Bit->isSelected();
|
||||
RefreshPanelCPU();
|
||||
|
@ -148,7 +146,7 @@ static CPU24BitActionListener* cpu24BitActionListener;
|
|||
class CPUCompActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (chkCPUCompatible->isSelected())
|
||||
{
|
||||
|
@ -169,7 +167,7 @@ static CPUCompActionListener* cpuCompActionListener;
|
|||
class JITActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (chkJIT->isSelected())
|
||||
{
|
||||
|
|
|
@ -8,11 +8,8 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "include/memory.h"
|
||||
#include "newcpu.h"
|
||||
#include "custom.h"
|
||||
#include "gui_handling.h"
|
||||
|
@ -40,7 +37,7 @@ static gcn::UaeRadioButton* optCollFull;
|
|||
class ChipsetButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == optOCS)
|
||||
changed_prefs.chipset_mask = 0;
|
||||
|
@ -59,7 +56,7 @@ static ChipsetButtonActionListener* chipsetButtonActionListener;
|
|||
class NTSCButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (chkNTSC->isSelected())
|
||||
{
|
||||
|
@ -80,7 +77,7 @@ static NTSCButtonActionListener* ntscButtonActionListener;
|
|||
class FastCopperActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
changed_prefs.fast_copper = chkFastCopper->isSelected();
|
||||
}
|
||||
|
@ -92,7 +89,7 @@ static FastCopperActionListener* fastCopperActionListener;
|
|||
class BlitterButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
changed_prefs.immediate_blits = optBlitImmed->isSelected();
|
||||
changed_prefs.waiting_blits = optBlitWait->isSelected();
|
||||
|
@ -105,7 +102,7 @@ static BlitterButtonActionListener* blitterButtonActionListener;
|
|||
class CollisionButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == optCollNone)
|
||||
changed_prefs.collision_level = 0;
|
||||
|
|
|
@ -7,10 +7,7 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "uae.h"
|
||||
#include "blkdev.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
|
@ -84,12 +81,12 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
int getNumberOfElements()
|
||||
int getNumberOfElements() override
|
||||
{
|
||||
return configs.size();
|
||||
}
|
||||
|
||||
string getElementAt(int i)
|
||||
string getElementAt(int i) override
|
||||
{
|
||||
if (i >= configs.size() || i < 0)
|
||||
return "---";
|
||||
|
@ -120,7 +117,7 @@ static ConfigsListModel* configsList;
|
|||
class ConfigButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
int i;
|
||||
if (actionEvent.getSource() == cmdLoad)
|
||||
|
@ -201,7 +198,7 @@ static ConfigButtonActionListener* configButtonActionListener;
|
|||
class ConfigsListActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
int selected_item;
|
||||
selected_item = lstConfigs->getSelected();
|
||||
|
|
|
@ -9,10 +9,7 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
|
|
|
@ -9,11 +9,8 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "disk.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
|
@ -55,12 +52,12 @@ public:
|
|||
types.push_back("3.5'' ESCOM");
|
||||
}
|
||||
|
||||
int getNumberOfElements()
|
||||
int getNumberOfElements() override
|
||||
{
|
||||
return types.size();
|
||||
}
|
||||
|
||||
string getElementAt(int i)
|
||||
string getElementAt(int i) override
|
||||
{
|
||||
if (i < 0 || i >= types.size())
|
||||
return "---";
|
||||
|
@ -77,12 +74,12 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
int getNumberOfElements()
|
||||
int getNumberOfElements() override
|
||||
{
|
||||
return lstMRUDiskList.size();
|
||||
}
|
||||
|
||||
std::string getElementAt(int i)
|
||||
std::string getElementAt(int i) override
|
||||
{
|
||||
if (i < 0 || i >= lstMRUDiskList.size())
|
||||
return "---";
|
||||
|
@ -96,7 +93,7 @@ static DiskfileListModel diskfileList;
|
|||
class DriveTypeActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
//---------------------------------------
|
||||
// New drive type selected
|
||||
|
@ -115,7 +112,7 @@ static DriveTypeActionListener* driveTypeActionListener;
|
|||
class DFxCheckActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == chkLoadConfig)
|
||||
bLoadConfigForDisk = chkLoadConfig->isSelected();
|
||||
|
@ -152,7 +149,7 @@ static DFxCheckActionListener* dfxCheckActionListener;
|
|||
class DFxButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
|
@ -217,7 +214,7 @@ static bool bIgnoreListChange = false;
|
|||
class DiskFileActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
|
@ -272,7 +269,7 @@ static DiskFileActionListener* diskFileActionListener;
|
|||
class DriveSpeedSliderActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
changed_prefs.floppy_speed = drivespeedvalues[(int)sldDriveSpeed->getValue()];
|
||||
RefreshPanelFloppy();
|
||||
|
@ -285,7 +282,7 @@ static DriveSpeedSliderActionListener* driveSpeedSliderActionListener;
|
|||
class SaveForDiskActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
//---------------------------------------
|
||||
// Save configuration for current disk
|
||||
|
@ -315,7 +312,7 @@ static SaveForDiskActionListener* saveForDiskActionListener;
|
|||
class CreateDiskActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == cmdCreateDDDisk)
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@ static const int COLUMN_SIZE[] =
|
|||
{
|
||||
50, // Device
|
||||
60, // Volume
|
||||
160, // Path
|
||||
220, // Path
|
||||
40, // R/W
|
||||
50, // Size
|
||||
40 // Bootpri
|
||||
|
|
|
@ -9,12 +9,7 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "uae.h"
|
||||
#include "autoconf.h"
|
||||
#include "filesys.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
#include "keyboard.h"
|
||||
|
@ -72,7 +67,7 @@ public:
|
|||
values.push_back(entries[i]);
|
||||
}
|
||||
|
||||
int getNumberOfElements()
|
||||
int getNumberOfElements() override
|
||||
{
|
||||
return values.size();
|
||||
}
|
||||
|
@ -83,7 +78,7 @@ public:
|
|||
return 0;
|
||||
}
|
||||
|
||||
std::string getElementAt(int i)
|
||||
std::string getElementAt(int i) override
|
||||
{
|
||||
if (i < 0 || i >= values.size())
|
||||
return "---";
|
||||
|
@ -158,7 +153,7 @@ static int GetAmigaKeyIndex(int key)
|
|||
class InputActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == cboPort0)
|
||||
{
|
||||
|
@ -190,7 +185,7 @@ public:
|
|||
changed_prefs.jports[0].mode = JSEM_MODE_JOYSTICK;
|
||||
break;
|
||||
}
|
||||
inputdevice_updateconfig(NULL, &changed_prefs);
|
||||
inputdevice_updateconfig(nullptr, &changed_prefs);
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == cboPort1)
|
||||
|
@ -223,7 +218,7 @@ public:
|
|||
changed_prefs.jports[1].mode = JSEM_MODE_JOYSTICK;
|
||||
break;
|
||||
}
|
||||
inputdevice_updateconfig(NULL, &changed_prefs);
|
||||
inputdevice_updateconfig(nullptr, &changed_prefs);
|
||||
}
|
||||
|
||||
else if (actionEvent.getSource() == cboAutofire)
|
||||
|
|
|
@ -9,12 +9,7 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "uae.h"
|
||||
#include "autoconf.h"
|
||||
#include "filesys.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
|
@ -35,8 +30,7 @@ static gcn::UaeDropDown* ButtonForQuit;
|
|||
#ifdef RASPBERRY
|
||||
class StringListModel : public gcn::ListModel
|
||||
{
|
||||
private:
|
||||
std::vector<std::string> values;
|
||||
vector<string> values;
|
||||
public:
|
||||
StringListModel(const char* entries[], int count)
|
||||
{
|
||||
|
@ -44,12 +38,12 @@ public:
|
|||
values.push_back(entries[i]);
|
||||
}
|
||||
|
||||
int getNumberOfElements()
|
||||
int getNumberOfElements() override
|
||||
{
|
||||
return values.size();
|
||||
}
|
||||
|
||||
std::string getElementAt(int i)
|
||||
string getElementAt(int i) override
|
||||
{
|
||||
if (i < 0 || i >= values.size())
|
||||
return "---";
|
||||
|
@ -102,7 +96,7 @@ static int GetControlButtonIndex(int button)
|
|||
class MiscActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == chkStatusLine)
|
||||
changed_prefs.leds_on_screen = chkStatusLine->isSelected();
|
||||
|
@ -251,7 +245,7 @@ void InitPanelMisc(const struct _ConfigCategory& category)
|
|||
RefreshPanelMisc();
|
||||
}
|
||||
|
||||
void ExitPanelMisc(void)
|
||||
void ExitPanelMisc()
|
||||
{
|
||||
delete chkStatusLine;
|
||||
delete chkHideIdleLed;
|
||||
|
@ -275,7 +269,7 @@ void ExitPanelMisc(void)
|
|||
delete ButtonForQuit;
|
||||
}
|
||||
|
||||
void RefreshPanelMisc(void)
|
||||
void RefreshPanelMisc()
|
||||
{
|
||||
char tmp[20];
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
@ -24,7 +22,7 @@ static gcn::Button* cmdRescanROMs;
|
|||
class FolderButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
char tmp[MAX_PATH];
|
||||
|
||||
|
@ -58,7 +56,7 @@ static FolderButtonActionListener* folderButtonActionListener;
|
|||
class RescanROMsButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
RescanROMs();
|
||||
RefreshPanelROM();
|
||||
|
@ -122,7 +120,7 @@ void InitPanelPaths(const struct _ConfigCategory& category)
|
|||
}
|
||||
|
||||
|
||||
void ExitPanelPaths(void)
|
||||
void ExitPanelPaths()
|
||||
{
|
||||
delete lblSystemROMs;
|
||||
delete txtSystemROMs;
|
||||
|
@ -139,7 +137,7 @@ void ExitPanelPaths(void)
|
|||
}
|
||||
|
||||
|
||||
void RefreshPanelPaths(void)
|
||||
void RefreshPanelPaths()
|
||||
{
|
||||
char tmp[MAX_PATH];
|
||||
|
||||
|
|
|
@ -9,10 +9,8 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "include/memory.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
|
@ -45,37 +43,37 @@ static gcn::Slider* sldGfxmem;
|
|||
class MemorySliderActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == sldChipmem)
|
||||
{
|
||||
changed_prefs.chipmem_size = ChipMem_values[(int)(sldChipmem->getValue())];
|
||||
changed_prefs.chipmem_size = ChipMem_values[int(sldChipmem->getValue())];
|
||||
if ((changed_prefs.chipmem_size > 0x200000) && (changed_prefs.fastmem_size > 0))
|
||||
changed_prefs.fastmem_size = 0;
|
||||
}
|
||||
|
||||
if (actionEvent.getSource() == sldSlowmem)
|
||||
{
|
||||
changed_prefs.bogomem_size = SlowMem_values[(int)(sldSlowmem->getValue())];
|
||||
changed_prefs.bogomem_size = SlowMem_values[int(sldSlowmem->getValue())];
|
||||
}
|
||||
|
||||
if (actionEvent.getSource() == sldFastmem)
|
||||
{
|
||||
changed_prefs.fastmem_size = FastMem_values[(int)(sldFastmem->getValue())];
|
||||
changed_prefs.fastmem_size = FastMem_values[int(sldFastmem->getValue())];
|
||||
if (changed_prefs.fastmem_size > 0 && changed_prefs.chipmem_size > 0x200000)
|
||||
changed_prefs.chipmem_size = 0x200000;
|
||||
}
|
||||
|
||||
if (actionEvent.getSource() == sldZ3mem)
|
||||
{
|
||||
changed_prefs.z3fastmem_size = FastMem_values[(int)(sldZ3mem->getValue())];
|
||||
changed_prefs.z3fastmem_size = FastMem_values[int(sldZ3mem->getValue())];
|
||||
if (changed_prefs.z3fastmem_size > max_z3fastmem)
|
||||
changed_prefs.z3fastmem_size = max_z3fastmem;
|
||||
}
|
||||
|
||||
if (actionEvent.getSource() == sldGfxmem)
|
||||
{
|
||||
changed_prefs.rtgmem_size = FastMem_values[(int)(sldGfxmem->getValue())];
|
||||
changed_prefs.rtgmem_size = FastMem_values[int(sldGfxmem->getValue())];
|
||||
changed_prefs.rtgmem_type = 1;
|
||||
}
|
||||
|
||||
|
@ -179,7 +177,7 @@ void InitPanelRAM(const struct _ConfigCategory& category)
|
|||
}
|
||||
|
||||
|
||||
void ExitPanelRAM(void)
|
||||
void ExitPanelRAM()
|
||||
{
|
||||
delete lblChipmem;
|
||||
delete sldChipmem;
|
||||
|
|
|
@ -9,11 +9,8 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "memory.h"
|
||||
#include "rommgr.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
|
@ -23,6 +20,7 @@ static gcn::Button* cmdMainROM;
|
|||
static gcn::Label* lblExtROM;
|
||||
static gcn::UaeDropDown* cboExtROM;
|
||||
static gcn::Button* cmdExtROM;
|
||||
|
||||
//static gcn::UaeCheckBox* chkMapROM;
|
||||
|
||||
class ROMListModel : public gcn::ListModel
|
||||
|
@ -37,12 +35,12 @@ public:
|
|||
ROMType = romtype;
|
||||
}
|
||||
|
||||
int getNumberOfElements()
|
||||
int getNumberOfElements() override
|
||||
{
|
||||
return roms.size();
|
||||
}
|
||||
|
||||
std::string getElementAt(int i)
|
||||
std::string getElementAt(int i) override
|
||||
{
|
||||
if (i < 0 || i >= roms.size())
|
||||
return "---";
|
||||
|
@ -88,7 +86,7 @@ static ROMListModel* extROMList;
|
|||
class MainROMActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
AvailableROM* rom = mainROMList->getROMat(cboMainROM->getSelected());
|
||||
if (rom != nullptr)
|
||||
|
@ -102,7 +100,7 @@ static MainROMActionListener* mainROMActionListener;
|
|||
class ExtROMActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
AvailableROM* rom = extROMList->getROMat(cboExtROM->getSelected());
|
||||
if (rom != nullptr)
|
||||
|
@ -118,7 +116,7 @@ static ExtROMActionListener* extROMActionListener;
|
|||
class ROMButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
char tmp[MAX_PATH];
|
||||
const char* filter[] = {".rom", "\0"};
|
||||
|
@ -199,8 +197,8 @@ void InitPanelROM(const struct _ConfigCategory& category)
|
|||
cmdExtROM->setBaseColor(gui_baseCol);
|
||||
cmdExtROM->addActionListener(romButtonActionListener);
|
||||
|
||||
// chkMapROM = new gcn::UaeCheckBox("MapROM emulation", true);
|
||||
// chkMapROM->setEnabled(false);
|
||||
// chkMapROM = new gcn::UaeCheckBox("MapROM emulation", true);
|
||||
// chkMapROM->setEnabled(false);
|
||||
|
||||
int posY = DISTANCE_BORDER;
|
||||
category.panel->add(lblMainROM, DISTANCE_BORDER, posY);
|
||||
|
@ -216,7 +214,7 @@ void InitPanelROM(const struct _ConfigCategory& category)
|
|||
posY += cboExtROM->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
// category.panel->add(chkMapROM, DISTANCE_BORDER, posY);
|
||||
// posY += chkMapROM->getHeight() + DISTANCE_NEXT_Y;
|
||||
// posY += chkMapROM->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
RefreshPanelROM();
|
||||
}
|
||||
|
@ -237,7 +235,7 @@ void ExitPanelROM()
|
|||
delete extROMActionListener;
|
||||
|
||||
delete romButtonActionListener;
|
||||
// delete chkMapROM;
|
||||
// delete chkMapROM;
|
||||
}
|
||||
|
||||
|
||||
|
@ -249,5 +247,5 @@ void RefreshPanelROM()
|
|||
idx = extROMList->InitROMList(changed_prefs.romextfile);
|
||||
cboExtROM->setSelected(idx);
|
||||
|
||||
// chkMapROM->setSelected(false);
|
||||
// chkMapROM->setSelected(false);
|
||||
}
|
||||
|
|
|
@ -9,15 +9,6 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "autoconf.h"
|
||||
#include "include/memory.h"
|
||||
#include "newcpu.h"
|
||||
#include "custom.h"
|
||||
#include "xwin.h"
|
||||
#include "drawing.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "savestate.h"
|
||||
#include "gui_handling.h"
|
||||
|
@ -41,7 +32,7 @@ static gcn::Label* lblWarningHDDon;
|
|||
class SavestateActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == optState0)
|
||||
currentStateNum = 0;
|
||||
|
@ -167,12 +158,12 @@ void ExitPanelSavestate()
|
|||
delete optState3;
|
||||
delete grpNumber;
|
||||
|
||||
if (imgSavestate != 0)
|
||||
if (imgSavestate != nullptr)
|
||||
delete imgSavestate;
|
||||
imgSavestate = 0;
|
||||
if (icoSavestate != 0)
|
||||
imgSavestate = nullptr;
|
||||
if (icoSavestate != nullptr)
|
||||
delete icoSavestate;
|
||||
icoSavestate = 0;
|
||||
icoSavestate = nullptr;
|
||||
delete wndScreenshot;
|
||||
|
||||
delete cmdLoadState;
|
||||
|
@ -189,12 +180,12 @@ void RefreshPanelSavestate()
|
|||
{
|
||||
wndScreenshot->remove(icoSavestate);
|
||||
delete icoSavestate;
|
||||
icoSavestate = 0;
|
||||
icoSavestate = nullptr;
|
||||
}
|
||||
if (imgSavestate != 0)
|
||||
if (imgSavestate != nullptr)
|
||||
{
|
||||
delete imgSavestate;
|
||||
imgSavestate = 0;
|
||||
imgSavestate = nullptr;
|
||||
}
|
||||
|
||||
switch (currentStateNum)
|
||||
|
@ -222,7 +213,7 @@ void RefreshPanelSavestate()
|
|||
fclose(f);
|
||||
gcn::Rectangle rect = wndScreenshot->getChildrenArea();
|
||||
SDL_Surface* loadedImage = IMG_Load(screenshot_filename);
|
||||
if (loadedImage != NULL)
|
||||
if (loadedImage != nullptr)
|
||||
{
|
||||
SDL_Rect source = {0, 0, 0, 0};
|
||||
SDL_Rect target = {0, 0, 0, 0};
|
||||
|
|
|
@ -9,13 +9,8 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "uae.h"
|
||||
#include "gui.h"
|
||||
#include "include/memory.h"
|
||||
#include "newcpu.h"
|
||||
#include "custom.h"
|
||||
#include "gui_handling.h"
|
||||
#include "sounddep/sound.h"
|
||||
|
||||
|
@ -58,12 +53,12 @@ public:
|
|||
freq.push_back("44100");
|
||||
}
|
||||
|
||||
int getNumberOfElements()
|
||||
int getNumberOfElements() override
|
||||
{
|
||||
return freq.size();
|
||||
}
|
||||
|
||||
string getElementAt(int i)
|
||||
string getElementAt(int i) override
|
||||
{
|
||||
if (i < 0 || i >= freq.size())
|
||||
return "---";
|
||||
|
@ -88,12 +83,12 @@ public:
|
|||
entry.push_back("Crux");
|
||||
}
|
||||
|
||||
int getNumberOfElements()
|
||||
int getNumberOfElements() override
|
||||
{
|
||||
return entry.size();
|
||||
}
|
||||
|
||||
string getElementAt(int i)
|
||||
string getElementAt(int i) override
|
||||
{
|
||||
if (i < 0 || i >= entry.size())
|
||||
return "---";
|
||||
|
@ -118,12 +113,12 @@ public:
|
|||
entry.push_back("Always on (A1200)");
|
||||
}
|
||||
|
||||
int getNumberOfElements()
|
||||
int getNumberOfElements() override
|
||||
{
|
||||
return entry.size();
|
||||
}
|
||||
|
||||
string getElementAt(int i)
|
||||
string getElementAt(int i) override
|
||||
{
|
||||
if (i < 0 || i >= entry.size())
|
||||
return "---";
|
||||
|
@ -137,7 +132,7 @@ static FilterListModel filterTypeList;
|
|||
class SoundActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == optSoundDisabled)
|
||||
changed_prefs.produce_sound = 0;
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "fsdb.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
#include "pandora_gfx.h"
|
||||
|
||||
#define DIALOG_WIDTH 520
|
||||
#define DIALOG_HEIGHT 400
|
||||
|
@ -52,12 +51,12 @@ public:
|
|||
changeDir(path);
|
||||
}
|
||||
|
||||
int getNumberOfElements()
|
||||
int getNumberOfElements() override
|
||||
{
|
||||
return dirs.size() + files.size();
|
||||
}
|
||||
|
||||
string getElementAt(int i)
|
||||
string getElementAt(int i) override
|
||||
{
|
||||
if (i >= dirs.size() + files.size() || i < 0)
|
||||
return "---";
|
||||
|
@ -74,7 +73,7 @@ public:
|
|||
FilterFiles(&files, filefilter);
|
||||
}
|
||||
|
||||
bool isDir(int i)
|
||||
bool isDir(int i) const
|
||||
{
|
||||
return (i < dirs.size());
|
||||
}
|
||||
|
@ -86,7 +85,7 @@ static SelectFileListModel* fileList;
|
|||
class FileButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == cmdOK)
|
||||
{
|
||||
|
@ -160,7 +159,7 @@ static void checkfilename(char* current)
|
|||
class SelectFileActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
int selected_item;
|
||||
char foldername[256] = "";
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "config.h"
|
||||
#include "uae.h"
|
||||
#include "gui_handling.h"
|
||||
#include "pandora_gfx.h"
|
||||
|
||||
#define DIALOG_WIDTH 520
|
||||
#define DIALOG_HEIGHT 400
|
||||
|
@ -33,7 +32,7 @@ static gcn::TextField* txtCurrent;
|
|||
class ButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == cmdOK)
|
||||
{
|
||||
|
@ -56,12 +55,12 @@ public:
|
|||
changeDir(path);
|
||||
}
|
||||
|
||||
int getNumberOfElements()
|
||||
int getNumberOfElements() override
|
||||
{
|
||||
return dirs.size();
|
||||
}
|
||||
|
||||
std::string getElementAt(int i)
|
||||
string getElementAt(int i) override
|
||||
{
|
||||
if (i >= dirs.size() || i < 0)
|
||||
return "---";
|
||||
|
@ -101,7 +100,7 @@ static void checkfoldername(char* current)
|
|||
class ListBoxActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
int selected_item;
|
||||
char foldername[256] = "";
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace gcn
|
|||
}
|
||||
|
||||
|
||||
bool SelectorEntry::getActive(void)
|
||||
bool SelectorEntry::getActive()
|
||||
{
|
||||
return active;
|
||||
}
|
||||
|
|
|
@ -1,51 +1,48 @@
|
|||
#ifndef GCN_SELECTORENTRY_HPP
|
||||
#define GCN_SELECTORENTRY_HPP
|
||||
|
||||
#include <list>
|
||||
|
||||
#include "guisan/basiccontainer.hpp"
|
||||
#include "guisan/graphics.hpp"
|
||||
#include "guisan/platform.hpp"
|
||||
#include "guisan/widgetlistener.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace gcn
|
||||
{
|
||||
class Container;
|
||||
class Icon;
|
||||
class Label;
|
||||
class Color;
|
||||
class WidgetListener;
|
||||
class Container;
|
||||
class Icon;
|
||||
class Label;
|
||||
class Color;
|
||||
class WidgetListener;
|
||||
|
||||
|
||||
class GCN_CORE_DECLSPEC SelectorEntry :
|
||||
public Widget,
|
||||
public WidgetListener
|
||||
{
|
||||
public:
|
||||
SelectorEntry(const std::string& caption, const std::string& imagepath);
|
||||
class GCN_CORE_DECLSPEC SelectorEntry :
|
||||
public Widget,
|
||||
public WidgetListener
|
||||
{
|
||||
public:
|
||||
SelectorEntry(const std::string& caption, const std::string& imagepath);
|
||||
|
||||
virtual ~SelectorEntry();
|
||||
virtual ~SelectorEntry();
|
||||
|
||||
virtual void draw(Graphics* graphics);
|
||||
void draw(Graphics* graphics) override;
|
||||
|
||||
void setInactiveColor(const Color& color);
|
||||
void setActiveColor(const Color& color);
|
||||
void setActive(bool active);
|
||||
bool getActive(void);
|
||||
void setInactiveColor(const Color& color);
|
||||
void setActiveColor(const Color& color);
|
||||
void setActive(bool active);
|
||||
bool getActive();
|
||||
|
||||
virtual void widgetResized(const Event& event);
|
||||
void widgetResized(const Event& event) override;
|
||||
|
||||
protected:
|
||||
Container *container;
|
||||
Icon *icon;
|
||||
Label *label;
|
||||
protected:
|
||||
Container* container;
|
||||
Icon* icon;
|
||||
Label* label;
|
||||
|
||||
Color inactiveColor;
|
||||
Color activeColor;
|
||||
Color inactiveColor;
|
||||
Color activeColor;
|
||||
|
||||
bool active;
|
||||
};
|
||||
bool active;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // end GCN_SELECTORENTRY_HPP
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "config.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
#include "pandora_gfx.h"
|
||||
|
||||
#define DIALOG_WIDTH 340
|
||||
#define DIALOG_HEIGHT 140
|
||||
|
@ -30,7 +29,7 @@ static gcn::Label* lblText2;
|
|||
class ShowMessageActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
void action(const gcn::ActionEvent& actionEvent) override
|
||||
{
|
||||
if (actionEvent.getSource() == cmdOK)
|
||||
dialogResult = true;
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
#include "UaeCheckBox.hpp"
|
||||
#include "guisan/widgets/checkbox.hpp"
|
||||
|
||||
#include "guisan/font.hpp"
|
||||
#include "guisan/graphics.hpp"
|
||||
#include "guisan/key.hpp"
|
||||
#include "guisan/mouseinput.hpp"
|
||||
|
||||
|
||||
namespace gcn
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "guisan/keylistener.hpp"
|
||||
#include "guisan/mouselistener.hpp"
|
||||
#include "guisan/platform.hpp"
|
||||
#include "guisan/widget.hpp"
|
||||
#include "guisan/widgets/checkbox.hpp"
|
||||
|
@ -13,22 +11,21 @@
|
|||
|
||||
namespace gcn
|
||||
{
|
||||
class GCN_CORE_DECLSPEC UaeCheckBox : public CheckBox
|
||||
{
|
||||
public:
|
||||
UaeCheckBox();
|
||||
class GCN_CORE_DECLSPEC UaeCheckBox : public CheckBox
|
||||
{
|
||||
public:
|
||||
UaeCheckBox();
|
||||
|
||||
UaeCheckBox(const std::string &caption,
|
||||
bool selected = false);
|
||||
UaeCheckBox(const std::string& caption,
|
||||
bool selected = false);
|
||||
|
||||
virtual ~UaeCheckBox();
|
||||
virtual ~UaeCheckBox();
|
||||
|
||||
virtual void draw(Graphics* graphics);
|
||||
void draw(Graphics* graphics) override;
|
||||
|
||||
protected:
|
||||
virtual void drawBox(Graphics *graphics);
|
||||
|
||||
};
|
||||
protected:
|
||||
void drawBox(Graphics* graphics) override;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
#include "UaeDropDown.hpp"
|
||||
#include "guisan/widgets/dropdown.hpp"
|
||||
|
||||
#include "guisan/font.hpp"
|
||||
#include "guisan/graphics.hpp"
|
||||
#include "guisan/key.hpp"
|
||||
#include "guisan/mouseinput.hpp"
|
||||
|
||||
|
||||
namespace gcn
|
||||
{
|
||||
|
@ -50,12 +45,12 @@ namespace gcn
|
|||
}
|
||||
}
|
||||
|
||||
void UaeDropDown::clearSelected(void)
|
||||
void UaeDropDown::clearSelected()
|
||||
{
|
||||
mListBox->setSelected(-1);
|
||||
}
|
||||
|
||||
bool UaeDropDown::isDroppedDown(void)
|
||||
bool UaeDropDown::isDroppedDown()
|
||||
{
|
||||
return mDroppedDown;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
#ifndef GCN_UAEDROPDOWN_HPP
|
||||
#define GCN_UAEDROPDOWN_HPP
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "guisan/keylistener.hpp"
|
||||
#include "guisan/mouselistener.hpp"
|
||||
#include "guisan/platform.hpp"
|
||||
#include "guisan/widget.hpp"
|
||||
#include "guisan/widgets/dropdown.hpp"
|
||||
|
@ -16,15 +14,15 @@ namespace gcn
|
|||
class GCN_CORE_DECLSPEC UaeDropDown : public DropDown
|
||||
{
|
||||
public:
|
||||
UaeDropDown(ListModel *listModel = NULL,
|
||||
ScrollArea *scrollArea = NULL,
|
||||
ListBox *listBox = NULL);
|
||||
UaeDropDown(ListModel *listModel = nullptr,
|
||||
ScrollArea *scrollArea = nullptr,
|
||||
ListBox *listBox = nullptr);
|
||||
|
||||
virtual ~UaeDropDown();
|
||||
|
||||
virtual void keyPressed(KeyEvent& keyEvent);
|
||||
void keyPressed(KeyEvent& keyEvent) override;
|
||||
|
||||
virtual void setEnabled(bool enabled);
|
||||
void setEnabled(bool enabled);
|
||||
|
||||
void clearSelected(void);
|
||||
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
#include "UaeListBox.hpp"
|
||||
#include "guisan/widgets/listbox.hpp"
|
||||
|
||||
#include "guisan/basiccontainer.hpp"
|
||||
#include "guisan/font.hpp"
|
||||
#include "guisan/graphics.hpp"
|
||||
#include "guisan/key.hpp"
|
||||
#include "guisan/listmodel.hpp"
|
||||
#include "guisan/mouseinput.hpp"
|
||||
#include "guisan/selectionlistener.hpp"
|
||||
|
||||
|
||||
namespace gcn
|
||||
{
|
||||
|
@ -31,7 +26,7 @@ namespace gcn
|
|||
graphics->setColor(getBackgroundColor());
|
||||
graphics->fillRectangle(Rectangle(0, 0, getWidth(), getHeight()));
|
||||
|
||||
if (mListModel == NULL)
|
||||
if (mListModel == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
|
||||
#include <list>
|
||||
|
||||
#include "guisan/keylistener.hpp"
|
||||
#include "guisan/listmodel.hpp"
|
||||
#include "guisan/mouselistener.hpp"
|
||||
#include "guisan/platform.hpp"
|
||||
#include "guisan/widget.hpp"
|
||||
#include "guisan/widgets/listbox.hpp"
|
||||
|
@ -13,17 +11,17 @@
|
|||
|
||||
namespace gcn
|
||||
{
|
||||
class GCN_CORE_DECLSPEC UaeListBox : public ListBox
|
||||
{
|
||||
public:
|
||||
UaeListBox();
|
||||
class GCN_CORE_DECLSPEC UaeListBox : public ListBox
|
||||
{
|
||||
public:
|
||||
UaeListBox();
|
||||
|
||||
UaeListBox(ListModel *listModel);
|
||||
UaeListBox(ListModel* listModel);
|
||||
|
||||
virtual ~UaeListBox();
|
||||
virtual ~UaeListBox();
|
||||
|
||||
virtual void draw(Graphics* graphics);
|
||||
};
|
||||
void draw(Graphics* graphics) override;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
#include "UaeRadioButton.hpp"
|
||||
#include "guisan/widgets/radiobutton.hpp"
|
||||
|
||||
#include "guisan/font.hpp"
|
||||
#include "guisan/graphics.hpp"
|
||||
#include "guisan/key.hpp"
|
||||
#include "guisan/mouseinput.hpp"
|
||||
|
||||
|
||||
namespace gcn
|
||||
{
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "guisan/keylistener.hpp"
|
||||
#include "guisan/mouselistener.hpp"
|
||||
#include "guisan/platform.hpp"
|
||||
#include "guisan/widget.hpp"
|
||||
#include "guisan/widgets/radiobutton.hpp"
|
||||
|
@ -13,20 +11,19 @@
|
|||
|
||||
namespace gcn
|
||||
{
|
||||
class GCN_CORE_DECLSPEC UaeRadioButton : public RadioButton
|
||||
{
|
||||
public:
|
||||
UaeRadioButton();
|
||||
class GCN_CORE_DECLSPEC UaeRadioButton : public RadioButton
|
||||
{
|
||||
public:
|
||||
UaeRadioButton();
|
||||
|
||||
UaeRadioButton(const std::string &caption,
|
||||
const std::string &group,
|
||||
bool selected = false);
|
||||
UaeRadioButton(const std::string& caption,
|
||||
const std::string& group,
|
||||
bool selected = false);
|
||||
|
||||
virtual ~UaeRadioButton();
|
||||
virtual ~UaeRadioButton();
|
||||
|
||||
virtual void draw(Graphics* graphics);
|
||||
|
||||
};
|
||||
void draw(Graphics* graphics) override;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -13,10 +13,11 @@
|
|||
#define SMALL_BUTTON_WIDTH 30
|
||||
#define SMALL_BUTTON_HEIGHT 22
|
||||
#define LABEL_HEIGHT 20
|
||||
#define TEXTFIELD_HEIGHT 24
|
||||
#define TEXTFIELD_HEIGHT 22
|
||||
#define DROPDOWN_HEIGHT 22
|
||||
#define SLIDER_HEIGHT 18
|
||||
#define TITLEBAR_HEIGHT 24
|
||||
#include "guisan/sdl/sdlinput.hpp"
|
||||
|
||||
typedef struct _ConfigCategory
|
||||
{
|
||||
|
|
|
@ -156,15 +156,15 @@ namespace sdl
|
|||
//-------------------------------------------------
|
||||
// Create new screen for GUI
|
||||
//-------------------------------------------------
|
||||
|
||||
|
||||
// make the scaled rendering look smoother (linear scaling).
|
||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
|
||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
|
||||
|
||||
gui_screen = SDL_CreateRGBSurface(0, GUI_WIDTH, GUI_HEIGHT, 32, 0, 0, 0, 0);
|
||||
check_error_sdl(gui_screen == nullptr, "Unable to create a surface");
|
||||
|
||||
SDL_RenderSetLogicalSize(renderer, GUI_WIDTH, GUI_HEIGHT);
|
||||
|
||||
|
||||
gui_texture = SDL_CreateTextureFromSurface(renderer, gui_screen);
|
||||
check_error_sdl(gui_texture == nullptr, "Unable to create texture");
|
||||
|
||||
|
|
|
@ -423,7 +423,7 @@ int loadconfig_old(struct uae_prefs* p, const char* orgpath)
|
|||
int dummy;
|
||||
|
||||
fscanf(f, "kickstart=%d\n", &kickstart);
|
||||
#if defined(PANDORA) || defined(ANDROIDSDL)
|
||||
#if defined(RASPBERRY) || defined(ANDROIDSDL)
|
||||
fscanf(f, "scaling=%d\n", &dummy);
|
||||
#else
|
||||
fscanf(f, "scaling=%d\n", &mainMenu_enableHWscaling);
|
||||
|
@ -431,7 +431,7 @@ int loadconfig_old(struct uae_prefs* p, const char* orgpath)
|
|||
fscanf(f, "showstatus=%d\n", &p->leds_on_screen);
|
||||
fscanf(f, "mousemultiplier=%d\n", &p->input_joymouse_multiplier);
|
||||
p->input_joymouse_multiplier *= 10;
|
||||
#if defined(PANDORA) || defined(ANDROIDSDL)
|
||||
#if defined(RASPBERRY) || defined(ANDROIDSDL)
|
||||
fscanf(f, "systemclock=%d\n", &dummy); // mainMenu_throttle never changes -> removed
|
||||
fscanf(f, "syncthreshold=%d\n", &dummy); // timeslice_mode never changes -> removed
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue