Skip to content

Commit

Permalink
[ui] Add hotkeys to tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
g3force committed Aug 6, 2018
1 parent 5b36f10 commit 217925d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions ui/src/components/control/ControlGeneral.vue
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<template>
<span class="control-general">
<span v-b-tooltip.hover
title="Immediately stop all robots">
:title="'Immediately stop all robots (' + Object.keys(keymapHalt)[0] + ')'">
<b-button v-hotkey="keymapHalt"
v-on:click="send('halt')"
v-bind:disabled="halted">
Halt
</b-button>
</span>
<span v-b-tooltip.hover
title="Robots have to keep distance to the ball">
:title="'Robots have to keep distance to the ball (' + Object.keys(keymapStop)[0] + ')'">
<b-button v-hotkey="keymapStop"
v-on:click="send('stop')"
v-bind:disabled="stopped || !inNormalHalf">
Stop
</b-button>
</span>
<span v-b-tooltip.hover
title="Restart the game in draw situations">
:title="'Restart the game in draw situations (' + Object.keys(keymapForceStart)[0] + ')'">
<b-button v-hotkey="keymapForceStart"
v-on:click="send('forceStart')"
v-bind:disabled="!stopped || !inNormalHalf">
Force Start
</b-button>
</span>
<span v-b-tooltip.hover
title="Continue game after a prepare state">
:title="'Continue game after a prepare state (' + Object.keys(keymapNormalStart)[0] + ')'">
<b-button v-hotkey="keymapNormalStart"
v-on:click="send('normalStart')"
v-bind:disabled="!prepareSth || !inNormalHalf">
Expand Down
6 changes: 3 additions & 3 deletions ui/src/components/control/ControlTeam.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
<div class="control-team">
<h2>Team {{teamColor}}</h2>
<span v-b-tooltip.hover
title="Prepare for a kickoff">
:title="'Prepare for a kickoff (' + Object.keys(keymapKickoff)[0] + ')'">
<b-button v-hotkey="keymapKickoff"
v-on:click="send('kickoff')"
v-bind:disabled="halted || running || preparing">
Kickoff
</b-button>
</span>
<span v-b-tooltip.hover
title="Perform direct kick (corner and goal kicks)">
:title="'Perform direct kick (corner and goal kicks) (' + Object.keys(keymapDirect)[0] + ')'">
<b-button v-hotkey="keymapDirect"
v-on:click="send('direct')"
v-bind:disabled="halted || running || preparing">
Direct
</b-button>
</span>
<span v-b-tooltip.hover
title="Perform indirect kick (throw-in)">
:title="'Perform indirect kick (throw-in) (' + Object.keys(keymapIndirect)[0] + ')'">
<b-button v-hotkey="keymapIndirect"
v-on:click="send('indirect')"
v-bind:disabled="halted || running || preparing">
Expand Down
1 change: 1 addition & 0 deletions ui/src/components/team/TeamYellowCards.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<b-collapse id="collapseDurations" class="mt-2">
<EditableLabelDuration
class="editable-label"
v-bind:key="cardTime"
v-for="(cardTime, cardId) in yellowCardTimes"
:value="cardTime"
:callback="(v) => updateCardTime(v, cardId)"/>
Expand Down

0 comments on commit 217925d

Please sign in to comment.