import jexer.bits.Color;
import jexer.bits.GraphicsChars;
import jexer.bits.MnemonicString;
+import jexer.bits.StringUtils;
import jexer.event.TKeypressEvent;
import jexer.event.TMouseEvent;
import static jexer.TKeypress.kbEnter;
setX(x);
setY(y);
setHeight(2);
- setWidth(mnemonic.getRawLabel().length() + 3);
+ setWidth(StringUtils.width(mnemonic.getRawLabel()) + 3);
shadowColor = new CellAttributes();
shadowColor.setTo(getWindow().getBackground());
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);
}
}