Implement little arrows for menus and dialogs

This commit is contained in:
Tissevert 2018-11-20 09:48:17 +01:00
parent af342c72d5
commit 2eecc2c7fb
2 changed files with 18 additions and 8 deletions

View file

@ -28,6 +28,13 @@ body {
height: 4.4em; height: 4.4em;
} }
#screen .text.read:after {
content: "\25be";
position: absolute;
bottom: 0.1em;
right: 0.5em;
}
#screen .text p { #screen .text p {
margin: 0; margin: 0;
padding: 0.5em; padding: 0.5em;
@ -39,9 +46,11 @@ ul.menu {
margin: 0; margin: 0;
} }
ul.menu .selected { ul.menu .selected:before {
background: #000; content: "\25b8";
color: #fff; width: 0.8em;
margin-left: -0.8em;
display: inline-block;
} }
/* 1st frame */ /* 1st frame */

View file

@ -39,8 +39,11 @@ function Screen(dom) {
return textZone return textZone
} }
function markAsRead() { function markAsRead(yes) {
getTextZone().classList.add('read'); if(yes == undefined) {
yes = false;
}
getTextZone().classList[yes ? 'add' : 'remove']('read');
} }
function menu(entries) { function menu(entries) {
@ -68,8 +71,6 @@ function Screen(dom) {
function text(message) { function text(message) {
getTextZone().children[0].textContent = message; getTextZone().children[0].textContent = message;
if(message.length > 0) { markAsRead(message.length > 0);
markAsRead();
}
} }
} }