-
Notifications
You must be signed in to change notification settings - Fork 33
/
ConfigWindow.cs
56 lines (40 loc) · 1.02 KB
/
ConfigWindow.cs
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
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace KSPAdvancedFlyByWire
{
public class ConfigWindow
{
private Vector2 position = new Vector2(128, 128);
private Vector2 size = new Vector2(512, 512);
private AdvancedFlyByWire m_FlyByWire = null;
private bool m_Hidden = false;
public ConfigWindow(AdvancedFlyByWire flyByWire)
{
m_FlyByWire = flyByWire;
}
public void Show()
{
m_Hidden = false;
}
public void Hide()
{
m_Hidden = true;
}
private void DoWindow(int window)
{
GUI.DragWindow();
}
public void OnGUI()
{
if (m_Hidden)
{
return;
}
GUI.Window(1338, new Rect(position.x, position.y, size.x, size.y), DoWindow, "Fly-By-Wire Preset Editor");
}
}
}