import { Component, NgZone, OnDestroy, OnInit } from "@angular/core"; import { invoke } from "@tauri-apps/api/tauri"; import { ShortcutService } from "./_services/shortcut.service"; import { EventsService } from "./_services/events.service"; import { WorldAreaService } from "./_services/world-area.service"; import { Color } from "./color-picker/color-picker.component"; import { OverlayService } from "./_services/overlay.service"; import { ConfigService } from "./_services/config.service"; import { PlanService } from "./_services/plan.service"; import { from } from "rxjs"; import { appWindow } from "@tauri-apps/api/window" import { FormControl } from "@angular/forms"; @Component({ selector: "app-root", templateUrl: "./app.component.html", styleUrls: ["./app.component.scss"], }) export class AppComponent implements OnInit { auto_hide: boolean = true; interactable: boolean = false; isBinding: boolean = false; overlayShowSettings: boolean = false; hasAttachedOnce: boolean = false; selected = new FormControl(0); constructor( public overlayService: OverlayService, public worldAreas: WorldAreaService, public planService: PlanService, public configService: ConfigService, private events: EventsService, ) { this.events.listen("loadTab").subscribe(event => { if (event.payload === "editor") { this.selected.setValue(1); } else { this.selected.setValue(0); } }) } ngOnInit(): void { } }