2023-01-06 22:18:33 +08:00
|
|
|
<template>
|
|
|
|
<div id="fixed-detail">
|
2023-01-08 22:59:39 +08:00
|
|
|
<BookDetail
|
|
|
|
:from-book="false"
|
|
|
|
:default-panel="panel"
|
|
|
|
@close="close"
|
|
|
|
></BookDetail>
|
2023-01-06 22:18:33 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2023-08-02 15:20:39 +08:00
|
|
|
import { getDetailedEnemy, getLocFromMouseLoc } from '../plugin/ui/fixed';
|
2023-01-06 22:18:33 +08:00
|
|
|
import BookDetail from './bookDetail.vue';
|
2023-08-02 15:20:39 +08:00
|
|
|
import { detailInfo } from '../plugin/ui/book';
|
2023-01-06 22:18:33 +08:00
|
|
|
|
2023-01-08 22:59:39 +08:00
|
|
|
const panel = core.plugin.fixedDetailPanel ?? 'special';
|
|
|
|
|
2023-08-02 15:20:39 +08:00
|
|
|
detailInfo.pos = 0;
|
2023-01-06 22:18:33 +08:00
|
|
|
|
2023-01-06 23:00:38 +08:00
|
|
|
const [x, y] = flags.mouseLoc;
|
2023-08-02 15:20:39 +08:00
|
|
|
const [mx, my] = getLocFromMouseLoc(x, y);
|
|
|
|
const enemy = core.status.thisMap.enemy.list.find(v => {
|
|
|
|
return v.x === mx && v.y === my;
|
|
|
|
});
|
|
|
|
if (enemy) {
|
|
|
|
const detail = getDetailedEnemy(enemy);
|
|
|
|
detailInfo.enemy = detail;
|
2023-01-06 23:00:38 +08:00
|
|
|
} else {
|
|
|
|
close();
|
|
|
|
}
|
|
|
|
|
|
|
|
function close() {
|
2023-08-01 12:22:05 +08:00
|
|
|
ancTe.plugin.ui.fixedDetailOpened.value = false;
|
2023-01-06 23:00:38 +08:00
|
|
|
}
|
2023-01-06 22:18:33 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
#fixed-detail {
|
|
|
|
width: 80%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
</style>
|