-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScreen.vb
57 lines (51 loc) · 1.89 KB
/
Screen.vb
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
Imports GeonBit.UI.Entities
Imports Microsoft.Xna.Framework
Namespace Extensions
Public Class Screen
Inherits Panel
Overridable Property Group As String
Overridable Property ID As String
Overridable Property Title As String
Property InstanceID As Integer
''' <summary>Prevents Commands from cascading to the screens below this one.</summary>
Property EatsCommands As Boolean
Sub New()
MyBase.New(Game.Instance.CurrentSize, anchor:=Anchor.TopLeft)
PreInit()
Init()
End Sub
Sub New(Size As Vector2)
MyBase.New(Size, anchor:=Anchor.TopLeft)
PreInit()
Init()
End Sub
Sub New(ID As String, Optional Title As String = "")
MyBase.New(Game.Instance.CurrentSize, anchor:=Anchor.TopLeft)
If (Title IsNot Nothing) Then
Me.Title = Title
End If
PreInit()
Init()
End Sub
Public Sub New(Size As Vector2, Optional Anchor As Anchor = Anchor.Auto, Optional Offset As Vector2? = Nothing, Optional Skin As PanelSkin = PanelSkin.None)
MyBase.New(Size, Skin, Anchor, Offset)
PreInit()
Init()
End Sub
Private Sub PreInit()
FillColor = Nothing
End Sub
Overridable Sub Init()
End Sub
''' <summary>Removes this Screen from the ScreenStack</summary>
Sub Pop()
Constructor.Screenstack.Pop(Me)
End Sub
''' <summary>Adds this Screen to the Top of the ScreenStack</summary>
Sub Push()
Constructor.Screenstack.Push(Me)
End Sub
Overridable Sub DoCommand(Command As String, ParamArray Objects() As Object) : End Sub
Overridable Sub MouseMoved(Current As Vector2, Moved As Vector2) : End Sub
End Class
End Namespace