Skip to content

Commit

Permalink
add simulator tab
Browse files Browse the repository at this point in the history
  • Loading branch information
emielsteerneman committed Aug 6, 2023
1 parent e454128 commit 2b2c59f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<script setup lang="ts">
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { computed, toRaw } from 'vue'
import { useAiController } from '../../composables/ai-controller'
const aiController = useAiController()
const disabled = computed(() => aiController.useReferee)
const sendSimulatorCommand = aiController.sendSimulatorCommand
</script>

<template>
<div class="btn-group">
<button
:disabled='disabled'
class="btn btn-sm btn-secondary gap-2"
@click="sendSimulatorCommand('robotsToSide')"
>
<font-awesome-icon icon="fa-arrows" />
Move robots to side
</button>

<button
:disabled='disabled'
class="btn btn-sm btn-secondary gap-2"
@click="sendSimulatorCommand('ballToCenter')"
>
<font-awesome-icon icon="fa-arrows" />
Move ball to center
</button>


</div>
</template>
15 changes: 10 additions & 5 deletions roboteam_interface_vue/src/tabs.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import { markRaw } from 'vue'
import GameSettings from './modules/components/game-settings.vue'
import StpStatus from './modules/components/panels/stp-panel/stp-widget.vue'
import Feedback from './modules/components/panels/feedback-widget.vue'
import GameSettings from './modules/components/game-settings.vue'
import Simulator from './modules/components/panels/simulator-widget.vue'
import StpStatus from './modules/components/panels/stp-panel/stp-widget.vue'
import Feedback from './modules/components/panels/feedback-widget.vue'
import PlayEvaluation from './modules/components/panels/play-evaluation-widget.vue'
import Metrics from './modules/components/panels/metrics-widget.vue'
import UiSettings from './modules/components/ui-settings/ui-settings.vue'
import Metrics from './modules/components/panels/metrics-widget.vue'
import UiSettings from './modules/components/ui-settings/ui-settings.vue'

export const TABS_DEFINITION = {
'Game Settings': {
icon: 'fa-gear',
component: markRaw(GameSettings)
},
'Simulator': {
icon: 'fa-gamepad',
component: markRaw(Simulator)
},
STP: {
icon: 'fa-layer-group',
component: markRaw(StpStatus)
Expand Down

0 comments on commit 2b2c59f

Please sign in to comment.