Updated ScrollBarWidget

Refined LauncherDialog
Added missing Ellipsis to StellaFont.hxx
This commit is contained in:
thrust26 2018-01-24 20:53:00 +01:00
parent 97553b9d93
commit d179b8ebe8
10 changed files with 179 additions and 92 deletions

View File

@ -993,6 +993,7 @@ void FrameBuffer::VideoModeList::setZoom(uInt32 zoom)
*** UI elements (dialog and widgets) *** *** UI elements (dialog and widgets) ***
kDlgColor Dialog background kDlgColor Dialog background
kWidColor Widget background kWidColor Widget background
kWidColorHi Widget highlight color
kWidFrameColor Border for currently selected widget kWidFrameColor Border for currently selected widget
*** Button colors *** *** Button colors ***
kBtnColor Normal button background kBtnColor Normal button background
@ -1021,7 +1022,7 @@ uInt32 FrameBuffer::ourGUIColors[3][kNumColors-256] = {
// Standard // Standard
{ 0x686868, 0x000000, 0xa38c61, 0xdccfa5, 0x404040, // base { 0x686868, 0x000000, 0xa38c61, 0xdccfa5, 0x404040, // base
0x000000, 0x62a108, 0x9f0000, 0x000000, // text 0x000000, 0x62a108, 0x9f0000, 0x000000, // text
0xc9af7c, 0xf0f0cf, 0xc80000, // elements 0xc9af7c, 0xf0f0cf, 0xd55941, 0xc80000, // UI elements
0xac3410, 0xd55941, 0xffffff, 0xffd652, // buttons 0xac3410, 0xd55941, 0xffffff, 0xffd652, // buttons
0xac3410, // checkbox 0xac3410, // checkbox
0xac3410, 0xd55941, // scrollbar 0xac3410, 0xd55941, // scrollbar
@ -1032,7 +1033,7 @@ uInt32 FrameBuffer::ourGUIColors[3][kNumColors-256] = {
// Classic // Classic
{ 0x686868, 0x000000, 0x404040, 0x404040, 0x404040, // base { 0x686868, 0x000000, 0x404040, 0x404040, 0x404040, // base
0x20a020, 0x00ff00, 0xc80000, 0x20a020, // text 0x20a020, 0x00ff00, 0xc80000, 0x20a020, // text
0x000000, 0x000000, 0xc80000, // elements 0x000000, 0x000000, 0x00ff00, 0xc80000, // UI elements
0x000000, 0x000000, 0x20a020, 0x00ff00, // buttons 0x000000, 0x000000, 0x20a020, 0x00ff00, // buttons
0x20a020, // checkbox 0x20a020, // checkbox
0x20a020, 0x00ff00, // scrollbar 0x20a020, 0x00ff00, // scrollbar
@ -1044,10 +1045,10 @@ uInt32 FrameBuffer::ourGUIColors[3][kNumColors-256] = {
{ {
0x808080, 0x000000, 0xc0c0c0, 0xe1e1e1, 0x333333, // base 0x808080, 0x000000, 0xc0c0c0, 0xe1e1e1, 0x333333, // base
0x000000, 0x0078d7, 0x0078d7, 0xffffff, // text 0x000000, 0x0078d7, 0x0078d7, 0xffffff, // text
0xf0f0f0, 0xffffff, 0x0f0f0f, // elements 0xf0f0f0, 0xffffff, 0x0078d7, 0x0f0f0f, // UI elements
0xe1e1e1, 0xe5f1fb, 0x000000, 0x000000, // buttons 0xe1e1e1, 0xe5f1fb, 0x000000, 0x000000, // buttons
0x333333, // checkbox 0x333333, // checkbox
0x808080, 0x0078d7, // scrollbar 0xc0c0c0, 0x808080, // scrollbar
0x333333, 0x0078d7, // slider 0x333333, 0x0078d7, // slider
0xffc0c0, 0x000000, 0xe00000, 0xc00000, // debugger 0xffc0c0, 0x000000, 0xe00000, 0xc00000, // debugger
0xffffff, 0x808080, 0xffffff // other 0xffffff, 0x808080, 0xffffff // other

View File

@ -53,6 +53,7 @@ enum {
kTextColorInv, kTextColorInv,
kDlgColor, kDlgColor,
kWidColor, kWidColor,
kWidColorHi,
kWidFrameColor, kWidFrameColor,
kBtnColor, kBtnColor,
kBtnColorHi, kBtnColorHi,

View File

@ -54,21 +54,22 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
myRomInfoWidget(nullptr), myRomInfoWidget(nullptr),
mySelectedItem(0) mySelectedItem(0)
{ {
const string ELLIPSIS = "\x1d";
const GUI::Font& font = instance().frameBuffer().launcherFont(); const GUI::Font& font = instance().frameBuffer().launcherFont();
const int fontWidth = font.getMaxCharWidth(), const int fontWidth = font.getMaxCharWidth(),
fontHeight = font.getFontHeight(), fontHeight = font.getFontHeight(),
lineHeight = font.getLineHeight(), lineHeight = font.getLineHeight(),
bwidth = (_w - 2 * 10 - 8 * (4 - 1)) / 4, bwidth = (_w - 2 * 10 - 8 * (4 - 1)) / 4,
bheight = font.getLineHeight() + 4; bheight = lineHeight + 4;
int xpos = 0, ypos = 0, lwidth = 0, lwidth2 = 0; int xpos = 0, ypos = 0, lwidth = 0, lwidth2 = 0;
WidgetArray wid; WidgetArray wid;
// Show game name // Show game name
lwidth = font.getStringWidth("Select an item from the list ..."); lwidth = font.getStringWidth("Select a ROM from the list" + ELLIPSIS);
xpos += 10; ypos += 8; xpos += 10; ypos += 8;
new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight, new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight,
"Select an item from the list ...", TextAlign::Left); "Select a ROM from the list" + ELLIPSIS);
lwidth2 = font.getStringWidth("XXXX items found"); lwidth2 = font.getStringWidth("XXXX items found");
xpos = _w - lwidth2 - 10; xpos = _w - lwidth2 - 10;
@ -81,14 +82,17 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
if(w >= 640) if(w >= 640)
{ {
int fwidth = std::min(15 * fontWidth, xpos - 20 - lwidth); int fwidth = std::min(15 * fontWidth, xpos - 20 - lwidth);
new StaticTextWidget(this, font, xpos - fwidth - 5 - font.getStringWidth("Filter "),
ypos, "Filter ");
xpos -= fwidth + 5; xpos -= fwidth + 5;
myPattern = new EditTextWidget(this, font, xpos, ypos, myPattern = new EditTextWidget(this, font, xpos, ypos - 2,
fwidth, fontHeight, ""); fwidth, lineHeight, "");
} }
// Add list with game titles // Add list with game titles
// Before we add the list, we need to know the size of the RomInfoWidget // Before we add the list, we need to know the size of the RomInfoWidget
xpos = 10; ypos += fontHeight + 5; xpos = 10; ypos += lineHeight + 4;
int romWidth = 0; int romWidth = 0;
int romSize = instance().settings().getInt("romviewer"); int romSize = instance().settings().getInt("romviewer");
if(romSize > 1 && w >= 1000 && h >= 760) if(romSize > 1 && w >= 1000 && h >= 760)
@ -96,9 +100,9 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
else if(romSize > 0 && w >= 640 && h >= 480) else if(romSize > 0 && w >= 640 && h >= 480)
romWidth = 365; romWidth = 365;
int listWidth = _w - (romWidth > 0 ? romWidth+5 : 0) - 20; int listWidth = _w - (romWidth > 0 ? romWidth+8 : 0) - 20;
myList = new StringListWidget(this, font, xpos, ypos, myList = new StringListWidget(this, font, xpos, ypos,
listWidth, _h - 35 - bheight - 2*fontHeight); listWidth, _h - 43 - bheight - fontHeight - lineHeight);
myList->setEditable(false); myList->setEditable(false);
wid.push_back(myList); wid.push_back(myList);
if(myPattern) wid.push_back(myPattern); // Add after the list for tab order if(myPattern) wid.push_back(myPattern); // Add after the list for tab order
@ -106,7 +110,7 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
// Add ROM info area (if enabled) // Add ROM info area (if enabled)
if(romWidth > 0) if(romWidth > 0)
{ {
xpos += myList->getWidth() + 5; xpos += myList->getWidth() + 8;
myRomInfoWidget = new RomInfoWidget(this, myRomInfoWidget = new RomInfoWidget(this,
romWidth < 660 ? instance().frameBuffer().smallFont() : romWidth < 660 ? instance().frameBuffer().smallFont() :
instance().frameBuffer().infoFont(), instance().frameBuffer().infoFont(),
@ -115,7 +119,7 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
// Add textfield to show current directory // Add textfield to show current directory
xpos = 10; xpos = 10;
ypos += myList->getHeight() + 4; ypos += myList->getHeight() + 8;
lwidth = font.getStringWidth("Path "); lwidth = font.getStringWidth("Path ");
myDirLabel = new StaticTextWidget(this, font, xpos, ypos+2, lwidth, fontHeight, myDirLabel = new StaticTextWidget(this, font, xpos, ypos+2, lwidth, fontHeight,
"Path", TextAlign::Left); "Path", TextAlign::Left);
@ -125,7 +129,7 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
myDir->clearFlags(WIDGET_RETAIN_FOCUS); myDir->clearFlags(WIDGET_RETAIN_FOCUS);
// Add four buttons at the bottom // Add four buttons at the bottom
xpos = 10; ypos += myDir->getHeight() + 4; xpos = 10; ypos += myDir->getHeight() + 8;
#ifndef BSPF_MAC_OSX #ifndef BSPF_MAC_OSX
myStartButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, myStartButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
"Select", kLoadROMCmd); "Select", kLoadROMCmd);

View File

@ -160,7 +160,7 @@ void RadioButtonWidget::drawWidget(bool hilite)
FBSurface& s = _boss->dialog().surface(); FBSurface& s = _boss->dialog().surface();
// Draw the outer bounding circle // Draw the outer bounding circle
s.drawBitmap(radio_img_outercircle, _x, _y + _boxY, hilite ? kScrollColorHi : kShadowColor, 14, 14); s.drawBitmap(radio_img_outercircle, _x, _y + _boxY, hilite ? kWidColorHi : kShadowColor, 14, 14);
// Draw the inner bounding circle with enabled color // Draw the inner bounding circle with enabled color
s.drawBitmap(radio_img_innercircle, _x + 1, _y + _boxY + 1, isEnabled() s.drawBitmap(radio_img_innercircle, _x + 1, _y + _boxY + 1, isEnabled()
@ -169,7 +169,7 @@ void RadioButtonWidget::drawWidget(bool hilite)
// draw state // draw state
if(_state) if(_state)
s.drawBitmap(_img, _x + 2, _y + _boxY + 2, isEnabled() s.drawBitmap(_img, _x + 2, _y + _boxY + 2, isEnabled()
? hilite ? kScrollColorHi : kCheckColor ? hilite ? kWidColorHi : kCheckColor
: kShadowColor, 10); : kShadowColor, 10);
// Finally draw the label // Finally draw the label

View File

@ -118,17 +118,17 @@ void RomInfoWidget::parseProperties()
mySurface->setVisible(mySurfaceIsValid); mySurface->setVisible(mySurfaceIsValid);
// Now add some info for the message box below the image // Now add some info for the message box below the image
myRomInfo.push_back("Name: " + myProperties.get(Cartridge_Name)); myRomInfo.push_back("Name: " + myProperties.get(Cartridge_Name));
myRomInfo.push_back("Manufacturer: " + myProperties.get(Cartridge_Manufacturer)); myRomInfo.push_back("Manufacturer: " + myProperties.get(Cartridge_Manufacturer));
myRomInfo.push_back("Model: " + myProperties.get(Cartridge_ModelNo)); myRomInfo.push_back("Model: " + myProperties.get(Cartridge_ModelNo));
myRomInfo.push_back("Rarity: " + myProperties.get(Cartridge_Rarity)); myRomInfo.push_back("Rarity: " + myProperties.get(Cartridge_Rarity));
myRomInfo.push_back("Note: " + myProperties.get(Cartridge_Note)); myRomInfo.push_back("Note: " + myProperties.get(Cartridge_Note));
bool swappedPorts = myProperties.get(Console_SwapPorts) == "YES"; bool swappedPorts = myProperties.get(Console_SwapPorts) == "YES";
myRomInfo.push_back("Controllers: " + (!swappedPorts myRomInfo.push_back("Controllers: " + (!swappedPorts
? myProperties.get(Controller_Left) + " (left), " + myProperties.get(Controller_Right) + " (right)" ? myProperties.get(Controller_Left) + " (left), " + myProperties.get(Controller_Right) + " (right)"
: myProperties.get(Controller_Right) + " (left), " + myProperties.get(Controller_Left) + " (right)")); : myProperties.get(Controller_Right) + " (left), " + myProperties.get(Controller_Left) + " (right)"));
#if 0 #if 0
myRomInfo.push_back("YStart/Height: " + myProperties.get(Display_YStart) + myRomInfo.push_back("YStart/Height: " + myProperties.get(Display_YStart) +
" " + myProperties.get(Display_Height)); " " + myProperties.get(Display_Height));
#endif #endif
@ -142,9 +142,9 @@ void RomInfoWidget::drawWidget(bool hilite)
const int yoff = myAvail.h + 10; const int yoff = myAvail.h + 10;
s.fillRect(_x+2, _y+2, _w-4, _h-4, kWidColor); s.fillRect(_x+2, _y+2, _w-4, _h-4, kDlgColor);
s.box(_x, _y, _w, _h, kColor, kShadowColor); s.frameRect(_x, _y, _w, _h, kColor);
s.box(_x, _y+yoff, _w, _h-yoff, kColor, kShadowColor); s.frameRect(_x, _y+yoff, _w, _h-yoff, kColor);
if(!myHaveProperties) return; if(!myHaveProperties) return;
@ -167,10 +167,10 @@ void RomInfoWidget::drawWidget(bool hilite)
s.drawString(font, mySurfaceErrorMsg, x, y, _w - 10, _textcolor); s.drawString(font, mySurfaceErrorMsg, x, y, _w - 10, _textcolor);
} }
int xpos = _x + 5, ypos = _y + yoff + 10; int xpos = _x + 8, ypos = _y + yoff + 10;
for(const auto& info: myRomInfo) for(const auto& info: myRomInfo)
{ {
s.drawString(_font, info, xpos, ypos, _w - 10, _textcolor); s.drawString(_font, info, xpos, ypos, _w - 16, _textcolor);
ypos += _font.getLineHeight(); ypos += _font.getLineHeight();
} }
} }

View File

@ -32,26 +32,26 @@
// Up arrow // Up arrow
static uInt32 up_arrow[8] = { static uInt32 up_arrow[8] = {
0b00011000, 0b00000000,
0b00011000, 0b00010000,
0b00111100, 0b00111000,
0b00111100, 0b01111100,
0b01111110, 0b11101110,
0b01111110, 0b11000110,
0b11111111, 0b10000010,
0b11111111 0b00000000
}; };
// Down arrow // Down arrow
static uInt32 down_arrow[8] = { static uInt32 down_arrow[8] = {
0b11111111, 0b00000000,
0b11111111, 0b10000010,
0b01111110, 0b11000110,
0b01111110, 0b11101110,
0b00111100, 0b01111100,
0b00111100, 0b00111000,
0b00011000, 0b00010000,
0b00011000 0b00000000
}; };
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -101,11 +101,11 @@ void ScrollBarWidget::handleMouseDown(int x, int y, MouseButton b,
} }
else if(y < _sliderPos) else if(y < _sliderPos)
{ {
_currentPos -= _entriesPerPage; _currentPos -= _entriesPerPage - 1;
} }
else if(y >= _sliderPos + _sliderHeight) else if(y >= _sliderPos + _sliderHeight)
{ {
_currentPos += _entriesPerPage; _currentPos += _entriesPerPage - 1;
} }
else else
{ {
@ -256,25 +256,22 @@ void ScrollBarWidget::drawWidget(bool hilite)
_part = _draggingPart; _part = _draggingPart;
// Up arrow // Up arrow
s.frameRect(_x, _y, _w, UP_DOWN_BOX_HEIGHT, kColor); if(hilite && _part == kUpArrowPart)
s.drawBitmap(up_arrow, _x+3, _y+5, isSinglePage ? kColor : s.fillRect(_x + 1, _y + 1, _w - 2, UP_DOWN_BOX_HEIGHT - 2, kScrollColor);
(hilite && _part == kUpArrowPart) ? kScrollColorHi : kScrollColor, 8); s.drawBitmap(up_arrow, _x+4, _y+5, isSinglePage ? kColor :
(hilite && _part == kUpArrowPart) ? kWidColor : kTextColor, 8);
// Down arrow // Down arrow
s.frameRect(_x, bottomY - UP_DOWN_BOX_HEIGHT, _w, UP_DOWN_BOX_HEIGHT, kColor); if(hilite && _part == kDownArrowPart)
s.drawBitmap(down_arrow, _x+3, bottomY - UP_DOWN_BOX_HEIGHT + 5, isSinglePage ? kColor : s.fillRect(_x + 1, bottomY - UP_DOWN_BOX_HEIGHT + 1, _w - 2, UP_DOWN_BOX_HEIGHT - 2, kScrollColor);
(hilite && _part == kDownArrowPart) ? kScrollColorHi : kScrollColor, 8); s.drawBitmap(down_arrow, _x+4, bottomY - UP_DOWN_BOX_HEIGHT + 5, isSinglePage ? kColor :
(hilite && _part == kDownArrowPart) ? kWidColor : kTextColor, 8);
// Slider // Slider
if(!isSinglePage) if(!isSinglePage)
{ {
s.fillRect(_x, _y + _sliderPos, _w, _sliderHeight, s.fillRect(_x + 1, _y + _sliderPos - 1, _w - 2, _sliderHeight + 2,
(hilite && _part == kSliderPart) ? kScrollColorHi : kScrollColor); (hilite && _part == kSliderPart) ? kScrollColorHi : kScrollColor);
s.frameRect(_x, _y + _sliderPos, _w, _sliderHeight, kColor);
int y = _y + _sliderPos + _sliderHeight / 2;
s.hLine(_x + 2, y - 2, _x + _w - 3, kWidColor);
s.hLine(_x + 2, y, _x + _w - 3, kWidColor);
s.hLine(_x + 2, y + 2, _x + _w - 3, kWidColor);
} }
} }

View File

@ -25,7 +25,7 @@ class GuiObject;
#include "bspf.hxx" #include "bspf.hxx"
enum { enum {
kScrollBarWidth = 14 kScrollBarWidth = 15
}; };
class ScrollBarWidget : public Widget, public CommandSender class ScrollBarWidget : public Widget, public CommandSender

View File

@ -30,7 +30,7 @@
size: 95 size: 95
ascent: 8 ascent: 8
descent: 2 descent: 2
first char: 32 (0x20) first char: 29 (0x1d)
last char: 126 (0x7e) last char: 126 (0x7e)
default char: 32 (0x20) default char: 32 (0x20)
proportional: no proportional: no
@ -42,6 +42,90 @@ namespace GUI {
// Font character bitmap data. // Font character bitmap data.
static const uInt16 stella_font_bits[] = { static const uInt16 stella_font_bits[] = {
/* Character 29 (0x1d):
width 6
bbx ( 6, 10, 0, -2 )
+------+
| |
| |
| |
| |
| |
| |
| |
|* * * |
| |
| |
+------+
*/
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0b1010100000000000,
0x0000,
0x0000,
/* Character 30 (0x1e):
width 6
bbx ( 6, 10, 0, -2 )
+------+
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
+------+
*/
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
/* Character 31 (0x1f):
width 6
bbx ( 6, 10, 0, -2 )
+------+
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
+------+
*/
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
0x0000,
/* Character 32 (0x20): /* Character 32 (0x20):
width 6 width 6
bbx ( 6, 10, 0, -2 ) bbx ( 6, 10, 0, -2 )
@ -445,9 +529,9 @@ static const uInt16 stella_font_bits[] = {
| | | |
| | | |
| | | |
| * | | |
| *** | | ** |
| * | | |
| | | |
+------+ +------+
*/ */
@ -457,9 +541,9 @@ static const uInt16 stella_font_bits[] = {
0x0000, 0x0000,
0x0000, 0x0000,
0x0000, 0x0000,
0x2000, 0x0000,
0x7000, 0x6000,
0x2000, 0x0000,
0x0000, 0x0000,
/* Character 47 (0x2f): /* Character 47 (0x2f):
@ -777,25 +861,25 @@ static const uInt16 stella_font_bits[] = {
+------+ +------+
| | | |
| | | |
| * |
| *** |
| * |
| | | |
| * | | ** |
| *** | | |
| * | | |
| |
| ** |
| |
| | | |
+------+ +------+
*/ */
0x0000, 0x0000,
0x0000, 0x0000,
0x2000,
0x7000,
0x2000,
0x0000, 0x0000,
0x2000, 0x6000,
0x7000, 0x0000,
0x2000, 0x0000,
0x0000,
0x6000,
0x0000,
0x0000, 0x0000,
/* Character 59 (0x3b): /* Character 59 (0x3b):
@ -805,9 +889,9 @@ static const uInt16 stella_font_bits[] = {
+------+ +------+
| | | |
| | | |
| * | | |
| *** | | ** |
| * | | |
| | | |
| ** | | ** |
| * | | * |
@ -817,9 +901,9 @@ static const uInt16 stella_font_bits[] = {
*/ */
0x0000, 0x0000,
0x0000, 0x0000,
0x2000, 0x0000,
0x7000, 0x3000,
0x2000, 0x0000,
0x0000, 0x0000,
0x3000, 0x3000,
0x2000, 0x2000,
@ -2710,8 +2794,8 @@ static const FontDesc stellaDesc = {
10, 10,
6, 10, 0, -2, 6, 10, 0, -2,
8, 8,
32, 29,
95, 98,
stella_font_bits, stella_font_bits,
nullptr, /* no encode table*/ nullptr, /* no encode table*/
nullptr, /* fixed width*/ nullptr, /* fixed width*/

View File

@ -30,9 +30,9 @@
size: 95 size: 95
ascent: 14 ascent: 14
descent: 4 descent: 4
first char: 30 (0x1e) first char: 29 (0x1d)
last char: 126 (0x7e) last char: 126 (0x7e)
default char: 30 (0x1e) default char: 32 (0x20)
proportional: no proportional: no
Public domain font. Share and enjoy. Public domain font. Share and enjoy.
*/ */

View File

@ -90,7 +90,7 @@ void Widget::draw()
// Draw border // Draw border
if(hasBorder) if(hasBorder)
{ {
s.frameRect(_x, _y, _w, _h, (_flags & WIDGET_HILITED) && isEnabled() ? kScrollColorHi : kColor); s.frameRect(_x, _y, _w, _h, (_flags & WIDGET_HILITED) && isEnabled() ? kWidColorHi : kColor);
_x += 4; _x += 4;
_y += 4; _y += 4;
_w -= 8; _w -= 8;
@ -607,12 +607,12 @@ void CheckboxWidget::drawWidget(bool hilite)
FBSurface& s = _boss->dialog().surface(); FBSurface& s = _boss->dialog().surface();
if(_drawBox) if(_drawBox)
s.frameRect(_x, _y + _boxY, 14, 14, hilite ? kScrollColorHi : kShadowColor); s.frameRect(_x, _y + _boxY, 14, 14, hilite ? kWidColorHi : kShadowColor);
// Do we draw a square or cross? // Do we draw a square or cross?
s.fillRect(_x + 1, _y + _boxY + 1, 12, 12, _changed ? kDbgChangedColor s.fillRect(_x + 1, _y + _boxY + 1, 12, 12, _changed ? kDbgChangedColor
: isEnabled() ? _bgcolor : kColor); : isEnabled() ? _bgcolor : kColor);
if(_state) if(_state)
s.drawBitmap(_img, _x + 2, _y + _boxY + 2, isEnabled() ? hilite ? kScrollColorHi : kCheckColor s.drawBitmap(_img, _x + 2, _y + _boxY + 2, isEnabled() ? hilite ? kWidColorHi : kCheckColor
: kShadowColor, 10); : kShadowColor, 10);
// Finally draw the label // Finally draw the label