Added new interface palette 'Dark'

This commit is contained in:
thrust26 2020-06-21 15:58:58 +02:00
parent bda9eb8277
commit d3455ed607
5 changed files with 24 additions and 2 deletions

View File

@ -12,6 +12,11 @@
Release History Release History
=========================================================================== ===========================================================================
6.2.1 to 6.3 (XXXX XX, 2020)
* Added new interface palette 'Dark'. (TODO: DOC)
6.2 to 6.2.1: (June 20, 2020) 6.2 to 6.2.1: (June 20, 2020)
* Fixed Pitfall II ROM not working correctly. * Fixed Pitfall II ROM not working correctly.

View File

@ -862,6 +862,7 @@ void FrameBuffer::setUIPalette()
const UIPaletteArray& ui_palette = const UIPaletteArray& ui_palette =
(myOSystem.settings().getString("uipalette") == "classic") ? ourClassicUIPalette : (myOSystem.settings().getString("uipalette") == "classic") ? ourClassicUIPalette :
(myOSystem.settings().getString("uipalette") == "light") ? ourLightUIPalette : (myOSystem.settings().getString("uipalette") == "light") ? ourLightUIPalette :
(myOSystem.settings().getString("uipalette") == "dark") ? ourDarkUIPalette :
ourStandardUIPalette; ourStandardUIPalette;
for(size_t i = 0, j = myFullPalette.size() - ui_palette.size(); for(size_t i = 0, j = myFullPalette.size() - ui_palette.size();
@ -1553,3 +1554,16 @@ UIPaletteArray FrameBuffer::ourLightUIPalette = {
0xffffff, 0x333333, 0xf0f0f0, 0x808080, 0xc0c0c0 // other 0xffffff, 0x333333, 0xf0f0f0, 0x808080, 0xc0c0c0 // other
} }
}; };
UIPaletteArray FrameBuffer::ourDarkUIPalette = {
{ 0x646464, 0xc0c0c0, 0x3c3c3c, 0x282828, 0x989898, // base
0xc0c0c0, 0x1567a5, 0x0059a3, 0xc0c0c0, // text
0x202020, 0x000000, 0x0059a3, 0xb0b0b0, // UI elements
0x282828, 0x00467f, 0x646464, 0x0059a3, 0xc0c0c0, 0xc0c0c0, // buttons
0x989898, // checkbox
0x3c3c3c, 0x646464, // scrollbar
0x7f2020, 0xc0c0c0, 0xe00000, 0xc00000, // debugger
0x989898, 0x0059a3, 0x3c3c3c, 0x000000, 0x3c3c3c, // slider
0x000000, 0x989898, 0x202020, 0x646464, 0x3c3c3c // other
}
};

View File

@ -714,7 +714,8 @@ class FrameBuffer
FullPaletteArray myFullPalette; FullPaletteArray myFullPalette;
// Holds UI palette data (for each variation) // Holds UI palette data (for each variation)
static UIPaletteArray ourStandardUIPalette, ourClassicUIPalette, ourLightUIPalette; static UIPaletteArray ourStandardUIPalette, ourClassicUIPalette,
ourLightUIPalette, ourDarkUIPalette;
private: private:
// Following constructors and assignment operators not supported // Following constructors and assignment operators not supported

View File

@ -524,7 +524,8 @@ void Settings::usage() const
<< " launcher\n" << " launcher\n"
<< " -romloadcount <number> Number of ROM to load next from multicard\n" << " -romloadcount <number> Number of ROM to load next from multicard\n"
<< " -uipalette <standard| Selects GUI theme\n" << " -uipalette <standard| Selects GUI theme\n"
<< " classic|light>\n" << " classic|\n"
<< " light|dark>\n"
<< " -hidpi <0|1> Enable HiDPI mode\n" << " -hidpi <0|1> Enable HiDPI mode\n"
<< " -dialogfont <small| Use the specified font in the dialogs\n" << " -dialogfont <small| Use the specified font in the dialogs\n"
<< " low_medium|\n" << " low_medium|\n"

View File

@ -85,6 +85,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
VarList::push_back(items, "Standard", "standard"); VarList::push_back(items, "Standard", "standard");
VarList::push_back(items, "Classic", "classic"); VarList::push_back(items, "Classic", "classic");
VarList::push_back(items, "Light", "light"); VarList::push_back(items, "Light", "light");
VarList::push_back(items, "Dark", "dark");
myPalettePopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, myPalettePopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight,
items, "Theme ", lwidth); items, "Theme ", lwidth);
wid.push_back(myPalettePopup); wid.push_back(myPalettePopup);