Feast 2.0!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

71 lines
1.4 KiB

  1. <template>
  2. <button class="nav-button">
  3. {{ location.connections[direction].dst.name.capital.all }}
  4. <div class="tooltip-template">
  5. <div class="tooltip-title">{{ location.connections[direction].name }}</div>
  6. <div class="tooltip-body">{{ location.connections[direction].desc }}</div>
  7. </div>
  8. </button>
  9. </template>
  10. <script lang="ts">
  11. import { Component, Prop, Vue, Watch, Emit } from 'vue-property-decorator'
  12. import { Action, GroupAction } from '@/game/combat'
  13. import { Creature } from '@/game/creature'
  14. import { Place, Direction } from '@/game/world'
  15. import tippy from 'tippy.js'
  16. @Component({})
  17. export default class NavButton extends Vue {
  18. @Prop()
  19. location!: Place
  20. @Prop()
  21. direction!: Direction
  22. mounted () {
  23. const elem = this.$el
  24. const tooltip = this.$el.querySelector(".tooltip-template") as HTMLElement
  25. tippy(
  26. elem,
  27. {
  28. content: tooltip
  29. }
  30. )
  31. }
  32. }
  33. </script>
  34. <style scoped>
  35. .nav-button {
  36. grid-area: var(--nav-direction);
  37. padding: 5%;
  38. background: #555;
  39. color: #ccc;
  40. font-size: 18pt;
  41. border-color: #ccc;
  42. border-width: 3px;
  43. border-radius: 8px;
  44. border-style: outset;
  45. outline: none;
  46. width: 100%;
  47. height: 100%;
  48. z-index: 1;
  49. }
  50. .nav-button:hover {
  51. background: #666;
  52. }
  53. .nav-button:active {
  54. background: #777;
  55. border-style: inset;
  56. }
  57. .nav-button:focus {
  58. background: #666;
  59. }
  60. </style>