keyboard hint in study gamebook
parent
6c27b7c554
commit
0a74d1f926
|
@ -138,6 +138,19 @@
|
|||
.gb_buttons .button {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.gb_play kbd {
|
||||
padding: 4px 5px;
|
||||
margin: 15px auto 0 auto;
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
line-height: 10px;
|
||||
color: #444;
|
||||
background-color: #fcfcfc;
|
||||
border: solid 1px #ccc;
|
||||
border-bottom-color: #bbb;
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0 -1px 0 #bbb;
|
||||
}
|
||||
|
||||
body.dark .gb_play .comment,
|
||||
body.dark .gb_play .comment::after {
|
||||
|
|
|
@ -2,7 +2,7 @@ import { h } from 'snabbdom'
|
|||
import { VNode } from 'snabbdom/vnode'
|
||||
import { Hooks } from 'snabbdom/hooks'
|
||||
import GamebookPlayCtrl from './gamebookPlayCtrl';
|
||||
import { bind, dataIcon, enrichText, innerHTML } from '../../util';
|
||||
import { bind, dataIcon, iconTag, enrichText, innerHTML } from '../../util';
|
||||
import { State } from './gamebookPlayCtrl';
|
||||
|
||||
const defaultComments = {
|
||||
|
@ -53,14 +53,14 @@ function renderFeedback(ctrl: GamebookPlayCtrl, state: State) {
|
|||
if (fb === 'bad') return h('div.feedback.act.bad' + (state.comment ? '.com' : ''), {
|
||||
hook: bind('click', ctrl.retry)
|
||||
}, [
|
||||
h('i', { attrs: dataIcon('P') }),
|
||||
iconTag('P'),
|
||||
h('span', 'Retry')
|
||||
]);
|
||||
if (fb === 'good' && state.comment) return h('div.feedback.act.good.com', {
|
||||
hook: bind('click', ctrl.next)
|
||||
}, [
|
||||
h('i', { attrs: dataIcon('G') }),
|
||||
h('span', 'Next')
|
||||
h('span.text', { attrs: dataIcon('G') }, 'Next'),
|
||||
h('kbd', '<space>')
|
||||
]);
|
||||
if (fb === 'end') return renderEnd(ctrl);
|
||||
return h('div.feedback.info.' + fb + (state.init ? '.init' : ''),
|
||||
|
|
Loading…
Reference in New Issue