Fixed GUI layout (RAM)
This commit is contained in:
parent
601663fbf1
commit
753aab1682
1 changed files with 89 additions and 82 deletions
|
@ -25,18 +25,20 @@
|
|||
#include "gui_handling.h"
|
||||
|
||||
|
||||
static const char *ChipMem_list[] = { "512 K", "1 MB", "2 MB", "4 MB", "8 MB" };
|
||||
static const int ChipMem_values[] = { 0x080000, 0x100000, 0x200000, 0x400000, 0x800000 };
|
||||
static const char *SlowMem_list[] = { "None", "512 K", "1 MB", "1.5 MB", "1.8 MB" };
|
||||
static const int SlowMem_values[] = { 0x000000, 0x080000, 0x100000, 0x180000, 0x1c0000 };
|
||||
static const char *FastMem_list[] = { "None", "1 MB", "2 MB", "4 MB", "8 MB", "16 MB", "32 MB", "64 MB", "128 MB" };
|
||||
static const int FastMem_values[] = { 0x000000, 0x100000, 0x200000, 0x400000, 0x800000, 0x1000000, 0x2000000, 0x4000000, 0x8000000 };
|
||||
static const char *A3000LowMem_list[] = { "None", "8 MB", "16 MB" };
|
||||
static const int A3000LowMem_values[] = { 0x080000, 0x800000, 0x1000000 };
|
||||
static const char *A3000HighMem_list[] = { "None", "8 MB", "16 MB", "32 MB" };
|
||||
static const int A3000HighMem_values[] = { 0x080000, 0x800000, 0x1000000, 0x2000000 };
|
||||
static const char* ChipMem_list[] = {"512 K", "1 MB", "2 MB", "4 MB", "8 MB"};
|
||||
static const int ChipMem_values[] = {0x080000, 0x100000, 0x200000, 0x400000, 0x800000};
|
||||
static const char* SlowMem_list[] = {"None", "512 K", "1 MB", "1.5 MB", "1.8 MB"};
|
||||
static const int SlowMem_values[] = {0x000000, 0x080000, 0x100000, 0x180000, 0x1c0000};
|
||||
static const char* FastMem_list[] = {"None", "1 MB", "2 MB", "4 MB", "8 MB", "16 MB", "32 MB", "64 MB", "128 MB"};
|
||||
static const int FastMem_values[] = {
|
||||
0x000000, 0x100000, 0x200000, 0x400000, 0x800000, 0x1000000, 0x2000000, 0x4000000, 0x8000000
|
||||
};
|
||||
static const char* A3000LowMem_list[] = {"None", "8 MB", "16 MB"};
|
||||
static const int A3000LowMem_values[] = {0x080000, 0x800000, 0x1000000};
|
||||
static const char* A3000HighMem_list[] = {"None", "8 MB", "16 MB", "32 MB"};
|
||||
static const int A3000HighMem_values[] = {0x080000, 0x800000, 0x1000000, 0x2000000};
|
||||
|
||||
static gcn::Window *grpRAM;
|
||||
static gcn::Window* grpRAM;
|
||||
static gcn::Label* lblChipmem;
|
||||
static gcn::Label* lblChipsize;
|
||||
static gcn::Slider* sldChipmem;
|
||||
|
@ -97,13 +99,15 @@ public:
|
|||
changed_prefs.rtgboards[0].rtgmem_type = GFXBOARD_UAE_Z3;
|
||||
}
|
||||
|
||||
if (actionEvent.getSource() == sldA3000Lowmem) {
|
||||
if (actionEvent.getSource() == sldA3000Lowmem)
|
||||
{
|
||||
changed_prefs.mbresmem_low_size = A3000LowMem_values[(int)(sldA3000Lowmem->getValue())];
|
||||
if (currprefs.mbresmem_low_size != changed_prefs.mbresmem_low_size)
|
||||
DisableResume();
|
||||
}
|
||||
|
||||
if (actionEvent.getSource() == sldA3000Highmem) {
|
||||
if (actionEvent.getSource() == sldA3000Highmem)
|
||||
{
|
||||
changed_prefs.mbresmem_high_size = A3000HighMem_values[(int)(sldA3000Highmem->getValue())];
|
||||
if (currprefs.mbresmem_high_size != changed_prefs.mbresmem_high_size)
|
||||
DisableResume();
|
||||
|
@ -204,42 +208,42 @@ void InitPanelRAM(const struct _ConfigCategory& category)
|
|||
|
||||
int posY = 10;
|
||||
grpRAM->add(lblChipmem, 8, posY);
|
||||
grpRAM->add(sldChipmem, 160, posY);
|
||||
grpRAM->add(lblChipsize, 160 + sldChipmem->getWidth() + 12, posY);
|
||||
grpRAM->add(sldChipmem, lblA3000Lowmem->getWidth() + DISTANCE_NEXT_Y, posY);
|
||||
grpRAM->add(lblChipsize, lblA3000Lowmem->getWidth() + DISTANCE_NEXT_Y + sldChipmem->getWidth() + 12, posY);
|
||||
posY += sldChipmem->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
grpRAM->add(lblSlowmem, 8, posY);
|
||||
grpRAM->add(sldSlowmem, 160, posY);
|
||||
grpRAM->add(lblSlowsize, 160 + sldSlowmem->getWidth() + 12, posY);
|
||||
grpRAM->add(sldSlowmem, lblA3000Lowmem->getWidth() + DISTANCE_NEXT_Y, posY);
|
||||
grpRAM->add(lblSlowsize, lblA3000Lowmem->getWidth() + DISTANCE_NEXT_Y + sldSlowmem->getWidth() + 12, posY);
|
||||
posY += sldSlowmem->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
grpRAM->add(lblFastmem, 8, posY);
|
||||
grpRAM->add(sldFastmem, 160, posY);
|
||||
grpRAM->add(lblFastsize, 160 + sldFastmem->getWidth() + 12, posY);
|
||||
grpRAM->add(sldFastmem, lblA3000Lowmem->getWidth() + DISTANCE_NEXT_Y, posY);
|
||||
grpRAM->add(lblFastsize, lblA3000Lowmem->getWidth() + DISTANCE_NEXT_Y + sldFastmem->getWidth() + 12, posY);
|
||||
posY += sldFastmem->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
grpRAM->add(lblZ3mem, 8, posY);
|
||||
grpRAM->add(sldZ3mem, 160, posY);
|
||||
grpRAM->add(lblZ3size, 160 + sldZ3mem->getWidth() + 12, posY);
|
||||
grpRAM->add(sldZ3mem, lblA3000Lowmem->getWidth() + DISTANCE_NEXT_Y, posY);
|
||||
grpRAM->add(lblZ3size, lblA3000Lowmem->getWidth() + DISTANCE_NEXT_Y + sldZ3mem->getWidth() + 12, posY);
|
||||
posY += sldZ3mem->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
grpRAM->add(lblGfxmem, 8, posY);
|
||||
grpRAM->add(sldGfxmem, 160, posY);
|
||||
grpRAM->add(lblGfxsize, 160 + sldGfxmem->getWidth() + 12, posY);
|
||||
grpRAM->add(sldGfxmem, lblA3000Lowmem->getWidth() + DISTANCE_NEXT_Y, posY);
|
||||
grpRAM->add(lblGfxsize, lblA3000Lowmem->getWidth() + DISTANCE_NEXT_Y + sldGfxmem->getWidth() + 12, posY);
|
||||
posY += sldGfxmem->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
grpRAM->add(lblA3000Lowmem, 8, posY);
|
||||
grpRAM->add(sldA3000Lowmem, 160, posY);
|
||||
grpRAM->add(lblA3000Lowsize, 160 + sldA3000Lowmem->getWidth() + 12, posY);
|
||||
grpRAM->add(sldA3000Lowmem, lblA3000Lowmem->getWidth() + DISTANCE_NEXT_Y, posY);
|
||||
grpRAM->add(lblA3000Lowsize, lblA3000Lowmem->getWidth() + DISTANCE_NEXT_Y + sldA3000Lowmem->getWidth() + 12, posY);
|
||||
posY += sldA3000Lowmem->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
grpRAM->add(lblA3000Highmem, 8, posY);
|
||||
grpRAM->add(sldA3000Highmem, 160, posY);
|
||||
grpRAM->add(lblA3000Highsize, 160 + sldA3000Highmem->getWidth() + 12, posY);
|
||||
grpRAM->add(sldA3000Highmem, lblA3000Lowmem->getWidth() + DISTANCE_NEXT_Y, posY);
|
||||
grpRAM->add(lblA3000Highsize, lblA3000Lowmem->getWidth() + DISTANCE_NEXT_Y + sldA3000Highmem->getWidth() + 12, posY);
|
||||
posY += sldA3000Highmem->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
grpRAM->setMovable(false);
|
||||
grpRAM->setSize(350, posY + DISTANCE_BORDER);
|
||||
grpRAM->setSize(400, posY + DISTANCE_BORDER);
|
||||
grpRAM->setBaseColor(gui_baseCol);
|
||||
|
||||
category.panel->add(grpRAM);
|
||||
|
@ -300,7 +304,7 @@ void RefreshPanelRAM()
|
|||
}
|
||||
}
|
||||
|
||||
for (i = 0; i<5; ++i)
|
||||
for (i = 0; i < 5; ++i)
|
||||
{
|
||||
if (changed_prefs.fastmem[0].size == FastMem_values[i])
|
||||
{
|
||||
|
@ -310,7 +314,7 @@ void RefreshPanelRAM()
|
|||
}
|
||||
}
|
||||
|
||||
for (i = 0; i<9; ++i)
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
if (changed_prefs.z3fastmem[0].size == FastMem_values[i])
|
||||
{
|
||||
|
@ -321,7 +325,7 @@ void RefreshPanelRAM()
|
|||
}
|
||||
sldZ3mem->setEnabled(!changed_prefs.address_space_24);
|
||||
|
||||
for (i = 0; i<6; ++i)
|
||||
for (i = 0; i < 6; ++i)
|
||||
{
|
||||
if (changed_prefs.rtgboards[0].rtgmem_size == FastMem_values[i])
|
||||
{
|
||||
|
@ -332,7 +336,7 @@ void RefreshPanelRAM()
|
|||
}
|
||||
sldGfxmem->setEnabled(!changed_prefs.address_space_24);
|
||||
|
||||
for (i = 0; i<3; ++i)
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
if (changed_prefs.mbresmem_low_size == A3000LowMem_values[i])
|
||||
{
|
||||
|
@ -342,7 +346,7 @@ void RefreshPanelRAM()
|
|||
}
|
||||
}
|
||||
|
||||
for (i = 0; i<4; ++i)
|
||||
for (i = 0; i < 4; ++i)
|
||||
{
|
||||
if (changed_prefs.mbresmem_high_size == A3000HighMem_values[i])
|
||||
{
|
||||
|
@ -354,16 +358,19 @@ void RefreshPanelRAM()
|
|||
}
|
||||
|
||||
|
||||
bool HelpPanelRAM(std::vector<std::string> &helptext)
|
||||
bool HelpPanelRAM(vector<string>& helptext)
|
||||
{
|
||||
helptext.clear();
|
||||
helptext.push_back("Select the amount of RAM for each type you want to emulate in your Amiga.");
|
||||
helptext.push_back("\"Slow\" is the simple memory extension of an Amiga 500.");
|
||||
helptext.push_back("\"Z2 Fast\" is real fast memory in 24 bit address space.");
|
||||
helptext.push_back("\"Z3 Fast\" is real fast memory in 32 bit address space and only available if a 32 bit CPU is selected.");
|
||||
helptext.push_back("\"RTG board\" is the graphics memory used by Picasso96 and only available if a 32 bit CPU is selected. If you");
|
||||
helptext.push_back(
|
||||
"\"Z3 Fast\" is real fast memory in 32 bit address space and only available if a 32 bit CPU is selected.");
|
||||
helptext.push_back(
|
||||
"\"RTG board\" is the graphics memory used by Picasso96 and only available if a 32 bit CPU is selected. If you");
|
||||
helptext.push_back("select some memory for this type, the Z3 RTG board will be activated.");
|
||||
helptext.push_back("A4000 motherboard and processor board memory is only detected by the Amiga if you choose the correct");
|
||||
helptext.push_back(
|
||||
"A4000 motherboard and processor board memory is only detected by the Amiga if you choose the correct");
|
||||
helptext.push_back("Kickstart ROM (A4000).");
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue