mirror of https://github.com/stella-emu/stella.git
Re-added 'uipalette' option.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2989 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
8c3c668276
commit
4b6f589a4e
10
Changes.txt
10
Changes.txt
|
@ -12,6 +12,14 @@
|
||||||
Release History
|
Release History
|
||||||
===========================================================================
|
===========================================================================
|
||||||
|
|
||||||
|
4.1 to 4.2: (September x, 2014)
|
||||||
|
|
||||||
|
* Re-added 'uipalette' option due to popular demand (of at least one
|
||||||
|
person :)).
|
||||||
|
|
||||||
|
-Have fun!
|
||||||
|
|
||||||
|
|
||||||
4.0 to 4.1: (September 1, 2014)
|
4.0 to 4.1: (September 1, 2014)
|
||||||
|
|
||||||
* Improved 'DASH' bankswitching scheme support; there is now a debugger
|
* Improved 'DASH' bankswitching scheme support; there is now a debugger
|
||||||
|
@ -39,8 +47,6 @@
|
||||||
* The UNIX configure script now supports newer versions of Hurd.
|
* The UNIX configure script now supports newer versions of Hurd.
|
||||||
Special thanks to Stephen Kitt for the patch.
|
Special thanks to Stephen Kitt for the patch.
|
||||||
|
|
||||||
-Have fun!
|
|
||||||
|
|
||||||
|
|
||||||
3.9.3 to 4.0: (July 1, 2014)
|
3.9.3 to 4.0: (July 1, 2014)
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
@ -2093,6 +2093,11 @@
|
||||||
given zoom level (1 or 2).</td>
|
given zoom level (1 or 2).</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><pre>-uipalette <standard|classic></pre></td>
|
||||||
|
<td>Use the specified palette for UI elements.</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre>-listdelay <delay></pre></td>
|
<td><pre>-listdelay <delay></pre></td>
|
||||||
<td>Set the amount of time to wait between treating successive
|
<td>Set the amount of time to wait between treating successive
|
||||||
|
@ -2475,6 +2480,7 @@
|
||||||
<td valign="top">
|
<td valign="top">
|
||||||
<table border="1" cellpadding="4">
|
<table border="1" cellpadding="4">
|
||||||
<tr><th>Item</th><th>Brief description</th><th>For more information,<br>see <a href="#CommandLine">CommandLine</a></th></tr>
|
<tr><th>Item</th><th>Brief description</th><th>For more information,<br>see <a href="#CommandLine">CommandLine</a></th></tr>
|
||||||
|
<tr><td>Interface Palette</td><td>palette to use for UI elements</td><td>-uipalette</td></tr>
|
||||||
<tr><td>List quick delay</td><td>time to wait between keypresses in listwidget</td><td>-listdelay</td></tr>
|
<tr><td>List quick delay</td><td>time to wait between keypresses in listwidget</td><td>-listdelay</td></tr>
|
||||||
<tr><td>Mouse wheel scroll</td><td>number of lines mouse scroll will move in listwidget</td><td>-mscroll</td></tr>
|
<tr><td>Mouse wheel scroll</td><td>number of lines mouse scroll will move in listwidget</td><td>-mscroll</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -77,10 +77,8 @@ FrameBuffer::~FrameBuffer(void)
|
||||||
bool FrameBuffer::initialize()
|
bool FrameBuffer::initialize()
|
||||||
{
|
{
|
||||||
// Get desktop resolution and supported renderers
|
// Get desktop resolution and supported renderers
|
||||||
uInt32 query_w, query_h;
|
|
||||||
queryHardware(myDisplays, myRenderers);
|
queryHardware(myDisplays, myRenderers);
|
||||||
query_w = myDisplays[0].w;
|
uInt32 query_w = myDisplays[0].w, query_h = myDisplays[0].h;
|
||||||
query_h = myDisplays[0].h;
|
|
||||||
|
|
||||||
// Check the 'maxres' setting, which is an undocumented developer feature
|
// Check the 'maxres' setting, which is an undocumented developer feature
|
||||||
// that specifies the desktop size (not normally set)
|
// that specifies the desktop size (not normally set)
|
||||||
|
@ -104,8 +102,7 @@ bool FrameBuffer::initialize()
|
||||||
// We can probably add ifdefs to take care of corner cases,
|
// We can probably add ifdefs to take care of corner cases,
|
||||||
// but that means we've failed to abstract it enough ...
|
// but that means we've failed to abstract it enough ...
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
bool smallScreen = myDesktopSize.w < kFBMinW ||
|
bool smallScreen = myDesktopSize.w < kFBMinW || myDesktopSize.h < kFBMinH;
|
||||||
myDesktopSize.h < kFBMinH;
|
|
||||||
|
|
||||||
// This font is used in a variety of situations when a really small
|
// This font is used in a variety of situations when a really small
|
||||||
// font is needed; we let the specific widget/dialog decide when to
|
// font is needed; we let the specific widget/dialog decide when to
|
||||||
|
@ -150,11 +147,13 @@ bool FrameBuffer::initialize()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set palette for GUI (upper area of array, doesn't change during execution)
|
// Set palette for GUI (upper area of array, doesn't change during execution)
|
||||||
|
int palID = myOSystem.settings().getString("uipalette") == "classic" ? 1 : 0;
|
||||||
|
|
||||||
for(int i = 0, j = 256; i < kNumColors-256; ++i, ++j)
|
for(int i = 0, j = 256; i < kNumColors-256; ++i, ++j)
|
||||||
{
|
{
|
||||||
Uint8 r = (ourGUIColors[i] >> 16) & 0xff;
|
Uint8 r = (ourGUIColors[palID][i] >> 16) & 0xff;
|
||||||
Uint8 g = (ourGUIColors[i] >> 8) & 0xff;
|
Uint8 g = (ourGUIColors[palID][i] >> 8) & 0xff;
|
||||||
Uint8 b = ourGUIColors[i] & 0xff;
|
Uint8 b = ourGUIColors[palID][i] & 0xff;
|
||||||
|
|
||||||
myPalette[j] = mapRGB(r, g, b);
|
myPalette[j] = mapRGB(r, g, b);
|
||||||
}
|
}
|
||||||
|
@ -1030,12 +1029,24 @@ void FrameBuffer::VideoModeList::setZoom(uInt32 zoom)
|
||||||
kDbgChangedTextColor Text color for changed cells
|
kDbgChangedTextColor Text color for changed cells
|
||||||
kDbgColorHi Highlighted color in debugger data cells
|
kDbgColorHi Highlighted color in debugger data cells
|
||||||
*/
|
*/
|
||||||
uInt32 FrameBuffer::ourGUIColors[kNumColors-256] = {
|
uInt32 FrameBuffer::ourGUIColors[2][kNumColors-256] = {
|
||||||
0x686868, 0x000000, 0x404040, 0x000000, 0x62a108, 0x9f0000,
|
// Standard
|
||||||
0xc9af7c, 0xf0f0cf, 0xc80000,
|
{ 0x686868, 0x000000, 0x404040, 0x000000, 0x62a108, 0x9f0000,
|
||||||
0xac3410, 0xd55941, 0xffffff, 0xffd652,
|
0xc9af7c, 0xf0f0cf, 0xc80000,
|
||||||
0xac3410,
|
0xac3410, 0xd55941, 0xffffff, 0xffd652,
|
||||||
0xac3410, 0xd55941,
|
0xac3410,
|
||||||
0xac3410, 0xd55941,
|
0xac3410, 0xd55941,
|
||||||
0xc80000, 0x00ff00, 0xc8c8ff
|
0xac3410, 0xd55941,
|
||||||
|
0xc80000, 0x00ff00, 0xc8c8ff
|
||||||
|
},
|
||||||
|
|
||||||
|
// Classic
|
||||||
|
{ 0x686868, 0x000000, 0x404040, 0x20a020, 0x00ff00, 0xc80000,
|
||||||
|
0x000000, 0x000000, 0xc80000,
|
||||||
|
0x000000, 0x000000, 0x20a020, 0x00ff00,
|
||||||
|
0x20a020,
|
||||||
|
0x20a020, 0x00ff00,
|
||||||
|
0x20a020, 0x00ff00,
|
||||||
|
0xc80000, 0x00ff00, 0xc8c8ff
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -579,8 +579,8 @@ class FrameBuffer
|
||||||
// Holds a reference to all the surfaces that have been created
|
// Holds a reference to all the surfaces that have been created
|
||||||
map<uInt32,FBSurface*> mySurfaceList;
|
map<uInt32,FBSurface*> mySurfaceList;
|
||||||
|
|
||||||
// Holds UI palette data
|
// Holds UI palette data (standard and classic colours)
|
||||||
static uInt32 ourGUIColors[kNumColors-256];
|
static uInt32 ourGUIColors[2][kNumColors-256];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -121,6 +121,7 @@ Settings::Settings(OSystem& osystem)
|
||||||
GUI::Size(DebuggerDialog::kMediumFontMinW,
|
GUI::Size(DebuggerDialog::kMediumFontMinW,
|
||||||
DebuggerDialog::kMediumFontMinH));
|
DebuggerDialog::kMediumFontMinH));
|
||||||
#endif
|
#endif
|
||||||
|
setInternal("uipalette", "standard");
|
||||||
setInternal("listdelay", "300");
|
setInternal("listdelay", "300");
|
||||||
setInternal("mwheel", "4");
|
setInternal("mwheel", "4");
|
||||||
|
|
||||||
|
|
|
@ -236,10 +236,19 @@ UIDialog::UIDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
// 3) Misc. options
|
// 3) Misc. options
|
||||||
wid.clear();
|
wid.clear();
|
||||||
tabID = myTab->addTab(" Misc. ");
|
tabID = myTab->addTab(" Misc. ");
|
||||||
lwidth = font.getStringWidth("Mouse wheel scroll: ");
|
lwidth = font.getStringWidth("Interface Palette (*): ");
|
||||||
pwidth = font.getStringWidth("Standard");
|
pwidth = font.getStringWidth("Standard");
|
||||||
xpos = ypos = vBorder;
|
xpos = ypos = vBorder;
|
||||||
|
|
||||||
|
// UI Palette
|
||||||
ypos += 1;
|
ypos += 1;
|
||||||
|
items.clear();
|
||||||
|
items.push_back("Standard", "standard");
|
||||||
|
items.push_back("Classic", "classic");
|
||||||
|
myPalettePopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight,
|
||||||
|
items, "Interface Palette (*): ", lwidth);
|
||||||
|
wid.push_back(myPalettePopup);
|
||||||
|
ypos += lineHeight + 4;
|
||||||
|
|
||||||
// Delay between quick-selecting characters in ListWidget
|
// Delay between quick-selecting characters in ListWidget
|
||||||
items.clear();
|
items.clear();
|
||||||
|
@ -273,6 +282,13 @@ UIDialog::UIDialog(OSystem* osystem, DialogContainer* parent,
|
||||||
wid.push_back(myWheelLinesPopup);
|
wid.push_back(myWheelLinesPopup);
|
||||||
ypos += lineHeight + 4;
|
ypos += lineHeight + 4;
|
||||||
|
|
||||||
|
// Add message concerning usage
|
||||||
|
xpos = vBorder; ypos += 1*(lineHeight + 4);
|
||||||
|
lwidth = ifont.getStringWidth("(*) Requires application restart");
|
||||||
|
new StaticTextWidget(myTab, ifont, xpos, ypos, BSPF_min(lwidth, _w-20), fontHeight,
|
||||||
|
"(*) Requires application restart",
|
||||||
|
kTextAlignLeft);
|
||||||
|
|
||||||
// Add items for tab 2
|
// Add items for tab 2
|
||||||
addToFocusList(wid, myTab, tabID);
|
addToFocusList(wid, myTab, tabID);
|
||||||
|
|
||||||
|
@ -341,6 +357,10 @@ void UIDialog::loadConfig()
|
||||||
myDebuggerFontStyle->setSelected(style, "0");
|
myDebuggerFontStyle->setSelected(style, "0");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// UI palette
|
||||||
|
const string& pal = instance().settings().getString("uipalette");
|
||||||
|
myPalettePopup->setSelected(pal, "standard");
|
||||||
|
|
||||||
// Listwidget quick delay
|
// Listwidget quick delay
|
||||||
const string& delay = instance().settings().getString("listdelay");
|
const string& delay = instance().settings().getString("listdelay");
|
||||||
myListDelayPopup->setSelected(delay, "300");
|
myListDelayPopup->setSelected(delay, "300");
|
||||||
|
@ -381,6 +401,10 @@ void UIDialog::saveConfig()
|
||||||
instance().settings().setValue("dbg.fontstyle",
|
instance().settings().setValue("dbg.fontstyle",
|
||||||
myDebuggerFontStyle->getSelectedTag().toString());
|
myDebuggerFontStyle->getSelectedTag().toString());
|
||||||
|
|
||||||
|
// UI palette
|
||||||
|
instance().settings().setValue("uipalette",
|
||||||
|
myPalettePopup->getSelectedTag().toString());
|
||||||
|
|
||||||
// Listwidget quick delay
|
// Listwidget quick delay
|
||||||
instance().settings().setValue("listdelay",
|
instance().settings().setValue("listdelay",
|
||||||
myListDelayPopup->getSelectedTag().toString());
|
myListDelayPopup->getSelectedTag().toString());
|
||||||
|
@ -426,6 +450,7 @@ void UIDialog::setDefaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
case 2: // Misc. options
|
case 2: // Misc. options
|
||||||
|
myPalettePopup->setSelected("standard");
|
||||||
myListDelayPopup->setSelected("300");
|
myListDelayPopup->setSelected("300");
|
||||||
myWheelLinesPopup->setSelected("4");
|
myWheelLinesPopup->setSelected("4");
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -58,6 +58,7 @@ class UIDialog : public Dialog
|
||||||
PopUpWidget* myDebuggerFontStyle;
|
PopUpWidget* myDebuggerFontStyle;
|
||||||
|
|
||||||
// Misc options
|
// Misc options
|
||||||
|
PopUpWidget* myPalettePopup;
|
||||||
PopUpWidget* myListDelayPopup;
|
PopUpWidget* myListDelayPopup;
|
||||||
PopUpWidget* myWheelLinesPopup;
|
PopUpWidget* myWheelLinesPopup;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue