-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Separate the HUD into it's own class / folders
- Loading branch information
Showing
14 changed files
with
717 additions
and
466 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using OpenBveApi.Colors; | ||
using OpenBveApi.Math; | ||
|
||
namespace OpenBve | ||
{ | ||
internal static partial class HUD | ||
{ | ||
internal class Element | ||
{ | ||
internal string Subject; | ||
internal Vector2 Position; | ||
internal Vector2 Alignment; | ||
internal Image TopLeft; | ||
internal Image TopMiddle; | ||
internal Image TopRight; | ||
internal Image CenterLeft; | ||
internal Image CenterMiddle; | ||
internal Image CenterRight; | ||
internal Image BottomLeft; | ||
internal Image BottomMiddle; | ||
internal Image BottomRight; | ||
internal Color32 BackgroundColor; | ||
internal Color32 OverlayColor; | ||
internal Color32 TextColor; | ||
internal Vector2 TextPosition; | ||
internal Vector2 TextAlignment; | ||
internal Fonts.OpenGlFont Font; | ||
internal bool TextShadow; | ||
internal string Text; | ||
internal float Value1; | ||
internal float Value2; | ||
internal Transition Transition; | ||
internal Vector2 TransitionVector; | ||
internal double TransitionState; | ||
internal Element() | ||
{ | ||
this.Subject = null; | ||
this.Position = new Vector2(); | ||
this.Alignment = new Vector2(-1, -1); | ||
this.BackgroundColor = new Color32(255, 255, 255, 255); | ||
this.OverlayColor = new Color32(255, 255, 255, 255); | ||
this.TextColor = new Color32(255, 255, 255, 255); | ||
this.TextPosition = new Vector2(); | ||
this.TextAlignment = new Vector2(-1, 0); | ||
this.Font = Fonts.VerySmallFont; | ||
this.TextShadow = true; | ||
this.Text = null; | ||
this.Value1 = 0.0f; | ||
this.Value2 = 0.0f; | ||
this.Transition = Transition.None; | ||
this.TransitionState = 1.0; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace OpenBve | ||
{ | ||
internal static partial class HUD | ||
{ | ||
internal struct Image | ||
{ | ||
internal Textures.Texture BackgroundTexture; | ||
internal Textures.Texture OverlayTexture; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
|
||
namespace OpenBve | ||
{ | ||
internal static partial class HUD | ||
{ | ||
[Flags] | ||
internal enum Transition | ||
{ | ||
None = 0, | ||
Move = 1, | ||
Fade = 2, | ||
MoveAndFade = 3 | ||
} | ||
} | ||
} |
Oops, something went wrong.