Cell cell = getScreen().getCharXY(x, y);
if (cell.isImage()) {
cell.invertImage();
+ }
+ if (cell.getForeColorRGB() < 0) {
+ cell.setForeColor(cell.getForeColor().invert());
} else {
- if (cell.getForeColorRGB() < 0) {
- cell.setForeColor(cell.getForeColor().invert());
- } else {
- cell.setForeColorRGB(cell.getForeColorRGB() ^ 0x00ffffff);
- }
- if (cell.getBackColorRGB() < 0) {
- cell.setBackColor(cell.getBackColor().invert());
- } else {
- cell.setBackColorRGB(cell.getBackColorRGB() ^ 0x00ffffff);
- }
+ cell.setForeColorRGB(cell.getForeColorRGB() ^ 0x00ffffff);
+ }
+ if (cell.getBackColorRGB() < 0) {
+ cell.setBackColor(cell.getBackColor().invert());
+ } else {
+ cell.setBackColorRGB(cell.getBackColorRGB() ^ 0x00ffffff);
}
getScreen().putCharXY(x, y, cell);
if ((onlyThisCell == true) || (cell.getWidth() == Cell.Width.SINGLE)) {
menuColor);
getScreen().putStringXY(x + 1, 0, menu.getTitle(), menuColor);
// Draw the highlight character
- getScreen().putCharXY(x + 1 + menu.getMnemonic().getShortcutIdx(),
+ getScreen().putCharXY(x + 1 + menu.getMnemonic().getScreenShortcutIdx(),
0, menu.getMnemonic().getShortcut(), menuMnemonicColor);
if (menu.isActive()) {
GraphicsChars.CP437[0xDF], shadowColor);
}
}
- if (mnemonic.getShortcutIdx() >= 0) {
+ if (mnemonic.getScreenShortcutIdx() >= 0) {
if (inButtonPress) {
- putCharXY(2 + mnemonic.getShortcutIdx(), 0,
+ putCharXY(2 + mnemonic.getScreenShortcutIdx(), 0,
mnemonic.getShortcut(), menuMnemonicColor);
} else {
- putCharXY(1 + mnemonic.getShortcutIdx(), 0,
+ putCharXY(1 + mnemonic.getScreenShortcutIdx(), 0,
mnemonic.getShortcut(), menuMnemonicColor);
}
}
}
putCharXY(2, 0, ']', checkboxColor);
putStringXY(4, 0, mnemonic.getRawLabel(), checkboxColor);
- if (mnemonic.getShortcutIdx() >= 0) {
- putCharXY(4 + mnemonic.getShortcutIdx(), 0,
+ if (mnemonic.getScreenShortcutIdx() >= 0) {
+ putCharXY(4 + mnemonic.getScreenShortcutIdx(), 0,
mnemonic.getShortcut(), mnemonicColor);
}
}
mnemonicColor.setBackColor(background.getBackColor());
}
putStringXY(0, 0, mnemonic.getRawLabel(), color);
- if (mnemonic.getShortcutIdx() >= 0) {
- putCharXY(mnemonic.getShortcutIdx(), 0,
+ if (mnemonic.getScreenShortcutIdx() >= 0) {
+ putCharXY(mnemonic.getScreenShortcutIdx(), 0,
mnemonic.getShortcut(), mnemonicColor);
}
}
clipBottom = height - offsetY;
for (int i = 0; i < boxHeight; i++) {
- putAttrXY(boxLeft + boxWidth, boxTop + 1 + i, shadowAttr);
- putAttrXY(boxLeft + boxWidth + 1, boxTop + 1 + i, shadowAttr);
+ Cell cell = getCharXY(offsetX + boxLeft + boxWidth,
+ offsetY + boxTop + 1 + i);
+ if (cell.getWidth() == Cell.Width.SINGLE) {
+ putAttrXY(boxLeft + boxWidth, boxTop + 1 + i, shadowAttr);
+ } else {
+ putCharXY(boxLeft + boxWidth, boxTop + 1 + i, ' ', shadowAttr);
+ }
+ cell = getCharXY(offsetX + boxLeft + boxWidth + 1,
+ offsetY + boxTop + 1 + i);
+ if (cell.getWidth() == Cell.Width.SINGLE) {
+ putAttrXY(boxLeft + boxWidth + 1, boxTop + 1 + i, shadowAttr);
+ } else {
+ putCharXY(boxLeft + boxWidth + 1, boxTop + 1 + i, ' ',
+ shadowAttr);
+ }
}
for (int i = 0; i < boxWidth; i++) {
- putAttrXY(boxLeft + 2 + i, boxTop + boxHeight, shadowAttr);
+ Cell cell = getCharXY(offsetX + boxLeft + 2 + i,
+ offsetY + boxTop + boxHeight);
+ if (cell.getWidth() == Cell.Width.SINGLE) {
+ putAttrXY(boxLeft + 2 + i, boxTop + boxHeight, shadowAttr);
+ } else {
+ putCharXY(boxLeft + 2 + i, boxTop + boxHeight, ' ', shadowAttr);
+ }
}
clipRight = oldClipRight;
clipBottom = oldClipBottom;
Cell left = new Cell(cell);
left.setImage(leftImage);
left.setWidth(Cell.Width.LEFT);
- // Blank out the char itself, so that shadows do not leave artifacts.
- left.setChar(' ');
putCharXY(x, y, left);
Cell right = new Cell(cell);
right.setImage(rightImage);
right.setWidth(Cell.Width.RIGHT);
- // Blank out the char itself, so that shadows do not leave artifacts.
- right.setChar(' ');
putCharXY(x + 1, y, right);
}
putStringXY((getWidth() - StringUtils.width(keyLabel) - 2), 0,
keyLabel, menuColor);
}
- if (mnemonic.getShortcutIdx() >= 0) {
- putCharXY(2 + mnemonic.getShortcutIdx(), 0, mnemonic.getShortcut(),
- menuMnemonicColor);
+ if (mnemonic.getScreenShortcutIdx() >= 0) {
+ putCharXY(2 + mnemonic.getScreenShortcutIdx(), 0,
+ mnemonic.getShortcut(), menuMnemonicColor);
}
if (checked) {
assert (checkable);