feat(editor): настройки экрана презентации при запуске сессии
Выбор монитора и полноэкранного режима в настройках; при «Запустить» окно презентации открывается на выбранном дисплее автоматически. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -31,6 +31,7 @@ import { SceneMarkerStore } from './effects/sceneMarkerStore';
|
||||
import { SceneTrapsStore } from './sceneTraps/sceneTrapsStore';
|
||||
import { installIpcRouter, registerHandler, setLicenseAssert } from './ipc/router';
|
||||
import { LicenseService } from './license/licenseService';
|
||||
import { readPresentationSettings, writePresentationSettings } from './preferences/appPreferences';
|
||||
import { MaterialsOverlayStore } from './materials/materialsOverlayStore';
|
||||
import { NpcsOverlayStore } from './npcs/npcsOverlayStore';
|
||||
import { ZipProjectStore } from './project/zipStore';
|
||||
@@ -81,6 +82,7 @@ import {
|
||||
waitForEditorWindowReady,
|
||||
warmNpcsEditorWindow,
|
||||
} from './windows/createWindows';
|
||||
import { listDisplayInfos } from './windows/presentationDisplay';
|
||||
import { TokenPathSessionStore } from './tokens/tokenPathSessionStore';
|
||||
import { tokenPathTotalLength } from '../shared/types/tokenPath';
|
||||
import type { TokenPathTargetKind } from '../shared/types/tokenPathSession';
|
||||
@@ -592,6 +594,16 @@ async function main() {
|
||||
const size = getPresentationContentSize();
|
||||
return size ?? { width: null, height: null };
|
||||
});
|
||||
registerHandler(ipcChannels.windows.listDisplays, () => {
|
||||
return { displays: listDisplayInfos() };
|
||||
});
|
||||
registerHandler(ipcChannels.preferences.getPresentation, () => {
|
||||
return { settings: readPresentationSettings(app.getPath('userData')) };
|
||||
});
|
||||
registerHandler(ipcChannels.preferences.setPresentation, ({ settings }) => {
|
||||
const next = writePresentationSettings(app.getPath('userData'), settings);
|
||||
return { settings: next };
|
||||
});
|
||||
registerHandler(ipcChannels.windows.openSceneDescription, ({ html }) => {
|
||||
openSceneDescriptionWindow(html);
|
||||
return { ok: true };
|
||||
|
||||
Reference in New Issue
Block a user