Browse Source

Fix descriptions not appearing consistently

master
Fen Dweller 5 years ago
parent
commit
04ec1bd5cf
2 changed files with 4 additions and 3 deletions
  1. +3
    -1
      src/components/ActionButton.vue
  2. +1
    -2
      src/components/Combat.vue

+ 3
- 1
src/components/ActionButton.vue View File

@@ -1,5 +1,5 @@
<template> <template>
<button @focus="describe" @mouseover="describe" class="action-button" @click="execute">
<button @focus="describe" @mouseover="describe" @mouseleave="undescribe" class="action-button" @click="execute">
<div class="action-title">{{ action.name }}</div> <div class="action-title">{{ action.name }}</div>
<div class="action-desc">{{ action.desc }}</div> <div class="action-desc">{{ action.desc }}</div>
</button> </button>
@@ -80,10 +80,12 @@ export default class ActionButton extends Vue {
.action-title { .action-title {
font-size: 125%; font-size: 125%;
color: #eee; color: #eee;
pointer-events: none;
} }


.action-desc { .action-desc {
color: #ccc; color: #ccc;
pointer-events: none;
} }


</style> </style>

+ 1
- 2
src/components/Combat.vue View File

@@ -40,7 +40,7 @@
<ActionButton @described="described" @executed="executedRight" v-for="(action, index) in right.validActions(right)" :key="'right-' + action.name + '-' + index" :action="action" :user="right" :target="right" :combatants="combatants" /> <ActionButton @described="described" @executed="executedRight" v-for="(action, index) in right.validActions(right)" :key="'right-' + action.name + '-' + index" :action="action" :user="right" :target="right" :combatants="combatants" />
</div> </div>
</div> </div>
<div v-if="actionDescVisible && encounter.winner === null" class="action-description">
<div v-show="actionDescVisible && encounter.winner === null" class="action-description">
</div> </div>
<button @click="$emit('leave-combat')" v-if="encounter.winner !== null" class="exit-combat"> <button @click="$emit('leave-combat')" v-if="encounter.winner !== null" class="exit-combat">
Exit Combat Exit Combat
@@ -59,7 +59,6 @@ import { LogEntry, LogLine, nilLog } from '@/game/interface'
import Statblock from './Statblock.vue' import Statblock from './Statblock.vue'
import ActionButton from './ActionButton.vue' import ActionButton from './ActionButton.vue'
import { Side, Encounter } from '@/game/combat' import { Side, Encounter } from '@/game/combat'
import { NoAI } from '../game/ai'
import { World } from '@/game/world' import { World } from '@/game/world'


@Component( @Component(


Loading…
Cancel
Save