-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAvconDemoEndDaemon.cs
61 lines (55 loc) · 1.67 KB
/
AvconDemoEndDaemon.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
57
58
59
60
61
using System;
using Hacknet.Gui;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace Hacknet
{
// Token: 0x020000FB RID: 251
internal class AvconDemoEndDaemon : Daemon
{
// Token: 0x06000564 RID: 1380 RVA: 0x00054E21 File Offset: 0x00053021
public AvconDemoEndDaemon(Computer c, string name, OS os) : base(c, name, os)
{
this.name = "Complete Demo";
}
// Token: 0x06000565 RID: 1381 RVA: 0x00054E41 File Offset: 0x00053041
public override void navigatedTo()
{
base.navigatedTo();
this.confirmed = false;
}
// Token: 0x06000566 RID: 1382 RVA: 0x00054E54 File Offset: 0x00053054
public override void draw(Rectangle bounds, SpriteBatch sb)
{
base.draw(bounds, sb);
if (Button.doButton(255, bounds.X + bounds.Width / 4, bounds.Y + bounds.Height / 4, bounds.Width / 2, 35, LocaleTerms.Loc("Back"), null))
{
this.os.display.command = "connect";
}
if (Button.doButton(258, bounds.X + bounds.Width / 4, bounds.Y + bounds.Height / 4 + 40, bounds.Width / 2, 35, (!this.confirmed) ? "End Session" : "Confirm End", new Color?(this.confirmed ? Color.Red : Color.DarkRed)))
{
if (this.confirmed)
{
this.endDemo();
}
else
{
this.confirmed = true;
}
}
}
// Token: 0x06000567 RID: 1383 RVA: 0x00054F68 File Offset: 0x00053168
public override string getSaveString()
{
return "<addAvconDemoEndDaemon name=\"" + this.name + "\"/>";
}
// Token: 0x06000568 RID: 1384 RVA: 0x00054F8F File Offset: 0x0005318F
private void endDemo()
{
this.os.ScreenManager.AddScreen(new MainMenu());
this.os.ExitScreen();
}
// Token: 0x04000624 RID: 1572
private bool confirmed = false;
}
}