mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Unit control menu only opens automatically if screen is wide
This commit is contained in:
parent
19b0eeeffd
commit
fd15406f5d
@ -60,7 +60,7 @@ export function UI() {
|
||||
|
||||
document.addEventListener("mapStateChanged", (ev) => {
|
||||
if ((ev as CustomEvent).detail === IDLE) hideAllMenus();
|
||||
else if ((ev as CustomEvent).detail === CONTEXT_ACTION) setUnitControlMenuVisible(true);
|
||||
else if ((ev as CustomEvent).detail === CONTEXT_ACTION && window.innerWidth > 1000) setUnitControlMenuVisible(true);
|
||||
setMapState(String((ev as CustomEvent).detail));
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user