blob: d9a20e1a731258f33e167cafa90d777954fd2461 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
import React from "react";
import { observable, action } from "mobx";
import { SelectionManager } from "./SelectionManager";
import MainViewModal from "../views/MainViewModal";
export default class GroupManager extends React.Component<{}>{
static Instance: GroupManager;
@observable private isOpen: boolean = false; // whether the menu is open or not
@observable private dialogueBoxOpacity = 1;
@observable private overlayOpacity = 0.4;
constructor(props: Readonly<{}>) {
super(props);
GroupManager.Instance = this;
}
open = action(() => {
SelectionManager.DeselectAll();
this.isOpen = true;
});
close = action(() => {
this.isOpen = false;
});
private get groupInterface() {
return <div>TESTING</div>;
}
render() {
return <MainViewModal
contents={this.groupInterface}
isDisplayed={this.isOpen}
interactive={true}
dialogueBoxDisplayedOpacity={this.dialogueBoxOpacity}
overlayDisplayedOpacity={this.overlayOpacity}
/>;
}
}
|