You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nothing/src/app/app.component.ts

47 lines
1.5 KiB

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<String>("loadTab").subscribe(event => {
if (event.payload === "editor") {
this.selected.setValue(1);
} else {
this.selected.setValue(0);
}
})
}
ngOnInit(): void {
}
}