mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
IntelHUD no longer builds #intel-hud with innerHTML or writes its readouts by id: it publishes its readouts, typing summary, REC blink, visibility, layout variant and style colors through its publish option to the gev-hud store, and the intel-hud application view renders them. The corners render from mount so the panel layout controllers register them as obstacles. The vessel layer presents the selected vessel's readout through src/hudReadouts.js, which IntelHUD follows, instead of writing into the HUD. The Cyber sonar state answers a HUD toggle from IntelHUD's visibility rather than the class the view renders on its next update.
20 lines
577 B
JavaScript
20 lines
577 B
JavaScript
import { defineStore } from 'pinia';
|
|
import { shallowRef } from 'vue';
|
|
|
|
/**
|
|
* The Intel HUD as its view renders it. IntelHUD presents its readouts,
|
|
* visibility, layout variant and style colors and the application shell
|
|
* publishes them here.
|
|
*/
|
|
export const useHudStore = defineStore('gev-hud', () => {
|
|
/** The presented HUD, frozen by IntelHUD; null until it is built. */
|
|
const hud = shallowRef(null);
|
|
|
|
/** @param {?object} next A fresh presentation; every publish re-renders. */
|
|
function publish(next) {
|
|
hud.value = next;
|
|
}
|
|
|
|
return { hud, publish };
|
|
});
|