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

56 lines
1.6 KiB

import { Component, NgZone, OnDestroy, OnInit } from "@angular/core";
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 { webviewWindow as appWindow} from '@tauri-apps/api';
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 => {
switch (event.payload) {
case "settings":
this.selected.setValue(0);
break;
case "editor":
this.selected.setValue(1);
break;
case "runstats":
this.selected.setValue(2);
break;
default:
this.selected.setValue(0);
break;
}
})
}
ngOnInit(): void {
}
}