Browse Source

misc: Minor visual touches

tags/v2.0.0
Dale 1 month ago
parent
commit
5d6d96636b
Signed by: Deiru GPG Key ID: AA250C0277B927E1
3 changed files with 18 additions and 6 deletions
  1. +15
    -2
      src/playback/components/Renderer/Backlog.tsx
  2. +1
    -0
      src/test-game/game.tsx
  3. +2
    -4
      src/test-game/nodes.ts

+ 15
- 2
src/playback/components/Renderer/Backlog.tsx View File

@@ -20,12 +20,15 @@ cursor: pointer;
const AdvanceItem = styled("li")`
& > span {
text-transform: uppercase;
padding: 5px;
padding: 5px 5px 5px 35px;
cursor: pointer;
display: inline-block;
width: 100%;
background-color: ${({ theme }: any) => theme.colors.backgroundStrong};
color: ${({ theme }: any) => theme.colors.background};
@media(max-width: 799px) {
padding: 5px;
}
}
`;

@@ -60,7 +63,7 @@ const Backlog: FC<Props> = ({ backlog, className, options = [], next, gameOver =
<ul tabIndex={!options.length ? 1 : undefined} className={className} ref={textLog} onClick={onAdvance}>
{backlog.map((entry, index) => (
<li key={index}>
{!!entry.actor && `${entry.actor.name}: `}
{!!entry.actor && `${entry.actor.name} `}
{entry.text}
</li>
))}
@@ -90,10 +93,20 @@ overflow-y: auto;
scroll-behavior: smooth;
cursor: pointer;
& > li {
text-indent: -30px;
margin-left: 30px;
line-height: 30px;
padding: 10px 25px 0px 25px;
font-size: ${({ theme }: any) => theme.fontSizes.normal};
}
& > li:last-of-type {
padding-bottom: 10px;
}

@media(max-width: 799px) {
& > li {
text-indent: 0;
margin-left: 0;
}
}
`;

+ 1
- 0
src/test-game/game.tsx View File

@@ -35,6 +35,7 @@ const locations: Location[] = [
awardSkill(dispatch);
return null;
},
{ actorId: Helper.id, text: 'Oooh! You got a skill point! You can open skills screen again by clicking "Character" button from the top toolbar.' },
{ actorId: Helper.id, text: "Here's an exceptionally long line specifically designed to annoy me (and you!) and test us (and our patience!) on how long a single line could be. Turns out - pretty long!" },
{ actorId: Helper.id, text: "Now let's try something harder. Left, or right?" },
],


+ 2
- 4
src/test-game/nodes.ts View File

@@ -16,10 +16,9 @@ const nodes: Node[] = [
next: 'exit',
lines: [
{ text: '[FAIL] You were so overhyped you couldn\'t even say what you wanted to say' },
{ actorId: 'char_helper', text: 'Well, this is the end.' },
(_, _gameState, dispatch) => {
dispatch(endGame())
return null;
return { actorId: 'char_helper', text: 'Well, this is the end.' };
},
],
},
@@ -68,10 +67,9 @@ const nodes: Node[] = [
kind: 'node',
lines: [
{ actorId: 'char_helper', text: 'Ok, it\'s time for us to part ways. We\'re done here' },
{ actorId: 'char_helper', text: 'Thanks, but this is the end.' },
(_engineState, _gameState, dispatch) => {
dispatch(endGame())
return null;
return { actorId: 'char_helper', text: 'Thanks, but this is the end.' };
},
]
},


Loading…
Cancel
Save