mirror of https://github.com/stella-emu/stella.git
'Light' palette polishing
This commit is contained in:
parent
1f2062feeb
commit
b05d686891
|
@ -51,7 +51,7 @@ class DebuggerParser
|
|||
|
||||
static inline string red(const string& msg = "")
|
||||
{
|
||||
return char(kDbgChangedColor) + msg;
|
||||
return char(kDbgColorRed) + msg;
|
||||
}
|
||||
static inline string inverse(const string& msg = "")
|
||||
{
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//============================================================================
|
||||
|
||||
#include "OSystem.hxx"
|
||||
#include "Widget.hxx"
|
||||
#include "Dialog.hxx"
|
||||
#include "Font.hxx"
|
||||
|
@ -599,22 +598,20 @@ void DataGridWidget::drawWidget(bool hilite)
|
|||
int x = _x + 4 + (col * _colWidth);
|
||||
int y = _y + 2 + (row * _rowHeight);
|
||||
int pos = row*_cols + col;
|
||||
uInt32 color = kTextColor;
|
||||
uInt32 textColor = kTextColor;
|
||||
|
||||
// Draw the selected item inverted, on a highlighted background.
|
||||
if (_currentRow == row && _currentCol == col &&
|
||||
_hasFocus && !_editMode)
|
||||
{
|
||||
s.fillRect(x - 4, y - 2, _colWidth+1, _rowHeight+1, kTextColorHi);
|
||||
#ifdef FLAT_UI
|
||||
color = kWidColor;
|
||||
#endif
|
||||
textColor = kTextColorInv;
|
||||
}
|
||||
|
||||
if (_selectedItem == pos && _editMode)
|
||||
{
|
||||
adjustOffset();
|
||||
s.drawString(_font, editString(), x, y, _colWidth, color,
|
||||
s.drawString(_font, editString(), x, y, _colWidth, textColor,
|
||||
TextAlign::Left, -_editScrollOffset, false);
|
||||
}
|
||||
else
|
||||
|
@ -624,14 +621,14 @@ void DataGridWidget::drawWidget(bool hilite)
|
|||
s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, kDbgChangedColor);
|
||||
|
||||
if(_hiliteList[pos])
|
||||
color = kDbgColorHi;
|
||||
textColor = kDbgColorHi;
|
||||
else
|
||||
color = kDbgChangedTextColor;
|
||||
textColor = kDbgChangedTextColor;
|
||||
}
|
||||
else if(_hiliteList[pos])
|
||||
color = kDbgColorHi;
|
||||
textColor = kDbgColorHi;
|
||||
|
||||
s.drawString(_font, _valueStringList[pos], x, y, _colWidth, color);
|
||||
s.drawString(_font, _valueStringList[pos], x, y, _colWidth, textColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -474,6 +474,8 @@ void RomListWidget::drawWidget(bool hilite)
|
|||
xpos = _x + CheckboxWidget::boxSize() + 10; ypos = _y + 2;
|
||||
for (i = 0, pos = _currentPos; i < _rows && pos < len; i++, pos++, ypos += _fontHeight)
|
||||
{
|
||||
uInt32 bytesColor = kTextColor;
|
||||
|
||||
// Draw checkboxes for correct lines (takes scrolling into account)
|
||||
myCheckList[i]->setState(myBPState->isSet(dlist[pos].address));
|
||||
myCheckList[i]->setDirty();
|
||||
|
@ -484,10 +486,13 @@ void RomListWidget::drawWidget(bool hilite)
|
|||
s.frameRect(_x + l.x() - 3, ypos - 1, _w - l.x(), _fontHeight, kTextColorHi);
|
||||
|
||||
// Draw the selected item inverted, on a highlighted background.
|
||||
if (_selectedItem == pos && _hasFocus)
|
||||
if(_selectedItem == pos && _hasFocus)
|
||||
{
|
||||
if(!_editMode)
|
||||
{
|
||||
if (!_editMode)
|
||||
s.fillRect(_x + r.x() - 3, ypos - 1, r.width(), _fontHeight, kTextColorHi);
|
||||
bytesColor = kTextColorInv;
|
||||
}
|
||||
else
|
||||
s.frameRect(_x + r.x() - 3, ypos - 1, r.width(), _fontHeight, kTextColorHi);
|
||||
}
|
||||
|
@ -535,7 +540,7 @@ void RomListWidget::drawWidget(bool hilite)
|
|||
}
|
||||
else
|
||||
{
|
||||
s.drawString(_font, dlist[pos].bytes, _x + r.x(), ypos, r.width(), kTextColor);
|
||||
s.drawString(_font, dlist[pos].bytes, _x + r.x(), ypos, r.width(), bytesColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,13 +89,17 @@ void ToggleBitWidget::drawWidget(bool hilite)
|
|||
{
|
||||
for (col = 0; col < _cols; col++)
|
||||
{
|
||||
uInt32 textColor = kTextColor;
|
||||
int x = _x + 4 + (col * _colWidth);
|
||||
int y = _y + 2 + (row * _rowHeight);
|
||||
int pos = row*_cols + col;
|
||||
|
||||
// Draw the selected item inverted, on a highlighted background.
|
||||
if (_currentRow == row && _currentCol == col && _hasFocus)
|
||||
s.fillRect(x - 4, y - 2, _colWidth+1, _rowHeight+1, kTextColorHi);
|
||||
if(_currentRow == row && _currentCol == col && _hasFocus)
|
||||
{
|
||||
s.fillRect(x - 4, y - 2, _colWidth + 1, _rowHeight + 1, kTextColorHi);
|
||||
textColor = kTextColorInv;
|
||||
}
|
||||
|
||||
if(_stateList[pos])
|
||||
buffer = _onList[pos];
|
||||
|
@ -111,7 +115,7 @@ void ToggleBitWidget::drawWidget(bool hilite)
|
|||
s.drawString(_font, buffer, x, y, _colWidth, kDbgChangedTextColor);
|
||||
}
|
||||
else
|
||||
s.drawString(_font, buffer, x, y, _colWidth, kTextColor);
|
||||
s.drawString(_font, buffer, x, y, _colWidth, textColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -913,71 +913,71 @@ void FrameBuffer::VideoModeList::setZoom(uInt32 zoom)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
/*
|
||||
Palette is defined as follows:
|
||||
// Base colors
|
||||
*** Base colors ***
|
||||
kColor Normal foreground color (non-text)
|
||||
kBGColor Normal background color (non-text)
|
||||
kBGColorLo Disabled background color dark (non-text)
|
||||
kBGColorHi Disabled background color light (non-text)
|
||||
kShadowColor Item is disabled
|
||||
*** Text colors ***
|
||||
kTextColor Normal text color
|
||||
kTextColorHi Highlighted text color
|
||||
kTextColorEm Emphasized text color
|
||||
|
||||
// UI elements (dialog and widgets)
|
||||
kTextColorSel Color for selected text
|
||||
*** UI elements (dialog and widgets) ***
|
||||
kDlgColor Dialog background
|
||||
kWidColor Widget background
|
||||
kWidFrameColor Border for currently selected widget
|
||||
|
||||
// Button colors
|
||||
*** Button colors ***
|
||||
kBtnColor Normal button background
|
||||
kBtnColorHi Highlighted button background
|
||||
kBtnTextColor Normal button font color
|
||||
kBtnTextColorHi Highlighted button font color
|
||||
|
||||
// Checkbox colors
|
||||
*** Checkbox colors ***
|
||||
kCheckColor Color of 'X' in checkbox
|
||||
|
||||
// Scrollbar colors
|
||||
*** Scrollbar colors ***
|
||||
kScrollColor Normal scrollbar color
|
||||
kScrollColorHi Highlighted scrollbar color
|
||||
|
||||
// Slider colors
|
||||
*** Slider colors ***
|
||||
kSliderColor,
|
||||
kSliderColorHi
|
||||
|
||||
// Debugger colors
|
||||
*** Debugger colors ***
|
||||
kDbgChangedColor Background color for changed cells
|
||||
kDbgChangedTextColor Text color for changed cells
|
||||
kDbgColorHi Highlighted color in debugger data cells
|
||||
kDbgColorRed Red color in debugger
|
||||
*/
|
||||
uInt32 FrameBuffer::ourGUIColors[3][kNumColors-256] = {
|
||||
// Standard
|
||||
{ 0x686868, 0x000000, 0xa38c61, 0xdccfa5, 0x404040, 0x000000, 0x62a108, 0x9f0000,
|
||||
{ 0x686868, 0x000000, 0xa38c61, 0xdccfa5, 0x404040,
|
||||
0x000000, 0x62a108, 0x9f0000, 0x000000,
|
||||
0xc9af7c, 0xf0f0cf, 0xc80000,
|
||||
0xac3410, 0xd55941, 0xffffff, 0xffd652,
|
||||
0xac3410,
|
||||
0xac3410, 0xd55941,
|
||||
0xac3410, 0xd55941,
|
||||
0xc80000, 0x00ff00, 0xc8c8ff
|
||||
0xc80000, 0x00ff00, 0xc8c8ff, 0xc80000,
|
||||
},
|
||||
|
||||
// Classic
|
||||
{ 0x686868, 0x000000, 0x404040, 0x404040, 0x404040, 0x20a020, 0x00ff00, 0xc80000,
|
||||
{ 0x686868, 0x000000, 0x404040, 0x404040, 0x404040,
|
||||
0x20a020, 0x00ff00, 0xc80000, 0x20a020,
|
||||
0x000000, 0x000000, 0xc80000,
|
||||
0x000000, 0x000000, 0x20a020, 0x00ff00,
|
||||
0x20a020,
|
||||
0x20a020, 0x00ff00,
|
||||
0x20a020, 0x00ff00,
|
||||
0xc80000, 0x00ff00, 0xc8c8ff
|
||||
0xc80000, 0x00ff00, 0xc8c8ff, 0xc80000
|
||||
},
|
||||
// Light
|
||||
{
|
||||
0x686868, 0x000000, 0xc0c0c0, 0xe1e1e1, 0x333333, 0x000000, 0x0078d7, 0x0078d7, // base
|
||||
0x686868, 0x000000, 0xc0c0c0, 0xe1e1e1, 0x333333, // base
|
||||
0x000000, 0x0078d7, 0x0078d7, 0xffffff, // text
|
||||
0xf0f0f0, 0xffffff, 0x0f0f0f, // elements
|
||||
0xe1e1e1, 0xe5f1fb, 0x202020, 0x000000, // buttons
|
||||
0x333333, // checkbox
|
||||
0x808080, 0x0078d7, // scrollbar
|
||||
0x333333, 0x0078d7, // slider
|
||||
0x800000, 0xffff80, 0x00e0e0 // debugger
|
||||
0xffc0c0, 0x000000, 0xe00000, 0x800000 // debugger
|
||||
}
|
||||
};
|
||||
|
|
|
@ -50,6 +50,7 @@ enum {
|
|||
kTextColor,
|
||||
kTextColorHi,
|
||||
kTextColorEm,
|
||||
kTextColorInv,
|
||||
kDlgColor,
|
||||
kWidColor,
|
||||
kWidFrameColor,
|
||||
|
@ -65,6 +66,7 @@ enum {
|
|||
kDbgChangedColor,
|
||||
kDbgChangedTextColor,
|
||||
kDbgColorHi,
|
||||
kDbgColorRed,
|
||||
kNumColors
|
||||
};
|
||||
|
||||
|
|
|
@ -100,15 +100,19 @@ void CheckListWidget::drawWidget(bool hilite)
|
|||
_checkList[i]->draw();
|
||||
|
||||
const int y = _y + 2 + _fontHeight * i + 2;
|
||||
uInt32 textColor = kTextColor;
|
||||
|
||||
GUI::Rect r(getEditRect());
|
||||
|
||||
// Draw the selected item inverted, on a highlighted background.
|
||||
if (_selectedItem == pos)
|
||||
{
|
||||
if (_hasFocus && !_editMode)
|
||||
if(_hasFocus && !_editMode)
|
||||
{
|
||||
s.fillRect(_x + r.left - 3, _y + 1 + _fontHeight * i,
|
||||
_w - r.left, _fontHeight, kTextColorHi);
|
||||
textColor = kTextColorInv;
|
||||
}
|
||||
else
|
||||
s.frameRect(_x + r.left - 3, _y + 1 + _fontHeight * i,
|
||||
_w - r.left, _fontHeight, kTextColorHi);
|
||||
|
@ -117,20 +121,11 @@ void CheckListWidget::drawWidget(bool hilite)
|
|||
if (_selectedItem == pos && _editMode)
|
||||
{
|
||||
adjustOffset();
|
||||
#ifndef FLAT_UI
|
||||
s.drawString(_font, editString(), _x + r.left, y, r.width(), kTextColor,
|
||||
TextAlign::Left, -_editScrollOffset, false);
|
||||
}
|
||||
else
|
||||
s.drawString(_font, _list[pos], _x + r.left, y, r.width(), kTextColor);
|
||||
#else
|
||||
s.drawString(_font, editString(), _x + r.left, y, r.width(), kTextColor,
|
||||
TextAlign::Left, -_editScrollOffset, false);
|
||||
}
|
||||
else
|
||||
s.drawString(_font, _list[pos], _x + r.left, y, r.width(),
|
||||
_selectedItem == pos && hilite && _hasFocus && !_editMode ? kWidColor : kTextColor);
|
||||
#endif
|
||||
s.drawString(_font, _list[pos], _x + r.left, y, r.width(), textColor);
|
||||
}
|
||||
|
||||
// Only draw the caret while editing, and if it's in the current viewport
|
||||
|
|
|
@ -54,12 +54,16 @@ void StringListWidget::drawWidget(bool hilite)
|
|||
for (i = 0, pos = _currentPos; i < _rows && pos < len; i++, pos++)
|
||||
{
|
||||
const int y = _y + 2 + _fontHeight * i;
|
||||
uInt32 textColor = kTextColor;
|
||||
|
||||
// Draw the selected item inverted, on a highlighted background.
|
||||
if (_selectedItem == pos && _hilite)
|
||||
{
|
||||
if (_hasFocus && !_editMode)
|
||||
if(_hasFocus && !_editMode)
|
||||
{
|
||||
s.fillRect(_x + 1, _y + 1 + _fontHeight * i, _w - 1, _fontHeight, kTextColorHi);
|
||||
textColor = kTextColorInv;
|
||||
}
|
||||
else
|
||||
s.frameRect(_x + 1, _y + 1 + _fontHeight * i, _w - 1, _fontHeight, kTextColorHi);
|
||||
}
|
||||
|
@ -68,20 +72,12 @@ void StringListWidget::drawWidget(bool hilite)
|
|||
if (_selectedItem == pos && _editMode)
|
||||
{
|
||||
adjustOffset();
|
||||
#ifndef FLAT_UI
|
||||
s.drawString(_font, editString(), _x + r.left, y, r.width(), kTextColor,
|
||||
|
||||
s.drawString(_font, editString(), _x + r.left, y, r.width(), textColor,
|
||||
TextAlign::Left, -_editScrollOffset, false);
|
||||
}
|
||||
else
|
||||
s.drawString(_font, _list[pos], _x + r.left, y, r.width(), kTextColor);
|
||||
#else
|
||||
s.drawString(_font, editString(), _x + r.left, y, r.width(), kTextColor,
|
||||
TextAlign::Left, -_editScrollOffset, false);
|
||||
}
|
||||
else
|
||||
s.drawString(_font, _list[pos], _x + r.left, y, r.width(),
|
||||
_selectedItem == pos && _hilite && _hasFocus && !_editMode ? kWidColor : kTextColor);
|
||||
#endif
|
||||
s.drawString(_font, _list[pos], _x + r.left, y, r.width(), textColor);
|
||||
}
|
||||
|
||||
// Only draw the caret while editing, and if it's in the current viewport
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<AdditionalOptions>/MP /std:c++latest %(AdditionalOptions)</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>FLAT_UI;BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
|
@ -142,7 +142,7 @@
|
|||
<AdditionalOptions>/MP /std:c++latest %(AdditionalOptions)</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>FLAT_UI;BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
|
@ -171,7 +171,7 @@
|
|||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>FLAT_UI;BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>
|
||||
|
@ -204,7 +204,7 @@
|
|||
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\yacc;..\emucore;..\emucore\tia;..\emucore\tia\frame-manager;..\common;..\common\tv_filters;..\gui;..\debugger\gui;..\debugger;..\windows;..\cheat;..\zlib;..\libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>FLAT_UI;BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>BSPF_WINDOWS;WIN32;NDEBUG;JOYSTICK_SUPPORT;DEBUGGER_SUPPORT;WINDOWED_SUPPORT;SOUND_SUPPORT;CHEATCODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>
|
||||
|
|
Loading…
Reference in New Issue