Skip to content

Commit

Permalink
Very nice introduction sequence. Waiting on a logo.
Browse files Browse the repository at this point in the history
  • Loading branch information
steviegt6 committed Dec 5, 2021
1 parent 764f991 commit b115c78
Show file tree
Hide file tree
Showing 11 changed files with 172 additions and 21 deletions.
1 change: 1 addition & 0 deletions Aurora.Desktop/Aurora.Desktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
<Version>0.0.0</Version>
<FileVersion>0.0.0</FileVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup Label="Project References">
<ProjectReference Include="..\Aurora.Game\Aurora.Game.csproj" />
Expand Down
18 changes: 15 additions & 3 deletions Aurora.Desktop/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,23 @@ namespace Aurora.Desktop
{
public static class Program
{
public const string HOST = "Aurora";

public class AuroraDesktop : AuroraGame
{
public override void SetHost(GameHost host)
{
base.SetHost(host);

Window.Title = HOST;
}
}

public static void Main()
{
using (GameHost host = Host.GetSuitableHost(@"Aurora"))
using (osu.Framework.Game game = new AuroraGame())
host.Run(game);
using GameHost host = Host.GetSuitableHost(HOST);
using osu.Framework.Game game = new AuroraDesktop();
host.Run(game);
}
}
}
Binary file modified Aurora.Desktop/game.ico
Binary file not shown.
1 change: 1 addition & 0 deletions Aurora.Game.Tests/Aurora.Game.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<GenerateProgramFile>false</GenerateProgramFile>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup Label="Project References">
<ProjectReference Include="..\Aurora.Game\Aurora.Game.csproj" />
Expand Down
1 change: 1 addition & 0 deletions Aurora.Game/Aurora.Game.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Aurora.Resources\Aurora.Resources.csproj" />
Expand Down
11 changes: 11 additions & 0 deletions Aurora.Game/AuroraGameBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ protected AuroraGameBase()
private void load()
{
Resources.AddStore(new DllResourceStore(typeof(AuroraResources).Assembly));

addFonts();
}

private void addFonts()
{
AddFont(Resources, "Fonts/Torus-Bold");
AddFont(Resources, "Fonts/Torus-Light");
AddFont(Resources, "Fonts/Torus-Regular");
AddFont(Resources, "Fonts/Torus-SemiBold");
AddFont(Resources, "Fonts/TorusNotched-Regular");
}
}
}
22 changes: 13 additions & 9 deletions Aurora.Game/Graphics/Utilities/AuroraFont.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ public static class AuroraFont
{
public const float DEFAULT_FONT_SIZE = 26f;

public static Typeface TorusTypeface = new("Torus");
public static readonly Typeface TORUS_TYPEFACE = new("Torus", medium: 0, black: 0);

public static readonly Typeface TORUS_NOTCHED_TYPEFACE = new("TorusNotched", 0, medium: 0, semiBold: 0, bold: 0, black: 0);

public static FontUsage DefaultFont => GetFont();

public static FontUsage TorusFont => GetFont(TorusTypeface, weight: FontWeight.Regular);
public static FontUsage TorusFont => GetFont(TORUS_TYPEFACE, weight: FontWeight.Regular);

public static FontUsage TorusNotchedFont => GetFont(TORUS_NOTCHED_TYPEFACE, weight: FontWeight.Regular);

public static FontUsage GetFont(
Typeface? typeface = null,
Expand All @@ -22,7 +26,7 @@ public static FontUsage GetFont(
bool fixedWidth = false
)
{
typeface ??= TorusTypeface;
typeface ??= TORUS_TYPEFACE;

return new FontUsage(
typeface.Value.FontName,
Expand Down Expand Up @@ -78,12 +82,12 @@ public Typeface(

Weights = new Dictionary<FontWeight, int>
{
{FontWeight.Light, light },
{FontWeight.Regular, regular },
{FontWeight.Medium, medium },
{FontWeight.SemiBold, semiBold },
{FontWeight.Bold, bold },
{FontWeight.Black, black },
{ FontWeight.Light, light },
{ FontWeight.Regular, regular },
{ FontWeight.Medium, medium },
{ FontWeight.SemiBold, semiBold },
{ FontWeight.Bold, bold },
{ FontWeight.Black, black }
};
}

Expand Down
138 changes: 129 additions & 9 deletions Aurora.Game/Screens/InitialLoadingScreen.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,55 @@
using Aurora.Game.Graphics.Containers;
using Aurora.Game.Graphics.Utilities;
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Screens;
using osuTK;
using osuTK.Graphics;

namespace Aurora.Game.Screens
{
public class InitialLoadingScreen : Screen
{
public Screen ScreenToExitTo { get; init; }

protected LinkTextFlowContainer TitleText { get; private set; }

protected LinkTextFlowContainer OurProductIsGoodISwearText { get; private set; }

protected LinkTextFlowContainer SupporterText { get; private set; }

[BackgroundDependencyLoader]
private void load()
{
InternalChildren = new Drawable[]
{
TitleText = new LinkTextFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
TextAnchor = Anchor.BottomCentre,
Anchor = Anchor.Centre,
Origin = Anchor.BottomCentre,
Padding = new MarginPadding(40f),
Alpha = 1f,
Spacing = new Vector2(0f, 6f)
},

OurProductIsGoodISwearText = new LinkTextFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
TextAnchor = Anchor.TopCentre,
Anchor = Anchor.Centre,
Origin = Anchor.BottomCentre,
Padding = new MarginPadding(20f),
Alpha = 0f,
Spacing = new Vector2(0f, 2f),
Scale = Vector2.Zero,
AlwaysPresent = true
},

SupporterText = new LinkTextFlowContainer
{
RelativeSizeAxes = Axes.X,
Expand All @@ -28,17 +58,107 @@ private void load()
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
Padding = new MarginPadding(20f),
Alpha = 0,
Alpha = 0f,
Spacing = new Vector2(0f, 2f)
}
};

void creationParameters(SpriteText x) => x.Font = AuroraFont.TorusFont;
#region Title Text

{
void creationParameters(SpriteText x)
{
x.Font = AuroraFont.GetFont(AuroraFont.TORUS_NOTCHED_TYPEFACE, 84f, AuroraFont.FontWeight.Regular);
x.AlwaysPresent = true;
x.Alpha = 0f;
}

TitleText.AddText("A", creationParameters);
TitleText.AddText("u", creationParameters);
TitleText.AddText("r", creationParameters);
TitleText.AddText("o", creationParameters);
TitleText.AddText("r", creationParameters);
TitleText.AddText("a", creationParameters);

for (int i = 0; i < TitleText.Children.Count; i++)
{
int index = i;
Scheduler.AddDelayed(() => TitleText.Children[index].FadeIn(1000D), 500D * (i + 1));
}
}

#endregion

#region Guys It's Good I Swear Text

{
void creationParameters(SpriteText x) => x.Font = AuroraFont.TorusFont;

OurProductIsGoodISwearText.AddText("Redefining client launchers.", creationParameters);

Scheduler.AddDelayed(() =>
{
OurProductIsGoodISwearText.FadeInFromZero(3000D);
OurProductIsGoodISwearText.ScaleTo(new Vector2(1f), 3000D, Easing.OutCubic);
}, 3000D);
}

#endregion

#region Supporter Text

{
void creationParameters(SpriteText x) => x.Font = AuroraFont.GetFont(AuroraFont.TORUS_TYPEFACE, 16f);

SupporterText.AddText("Crafted with ", creationParameters);
SupporterText.AddIcon(FontAwesome.Solid.Heart, x =>
{
creationParameters(x);

x.Colour = Colour4.PaleVioletRed;
});
SupporterText.AddText(" and free for everyone!", creationParameters);
SupporterText.NewLine();

SupporterText.AddText("Support me through ", creationParameters);
SupporterText.AddLink(
"Patreon",
"Opens my Patreon.",
"https://patreon.com/tomatophile",
null,
creationParameters,
Color4Extensions.FromHex("#FF424D").Lighten(0.75f),
Color4Extensions.FromHex("#FF424D")
);
SupporterText.AddText("! ", creationParameters);
SupporterText.AddIcon(FontAwesome.Brands.Patreon, x =>
{
creationParameters(x);

x.Colour = Color4Extensions.FromHex("#FF424D");
});

SupporterText.NewLine();
SupporterText.AddText("Join the ", creationParameters);
SupporterText.AddLink("Discord",
"diskc,sfrodsd", "",
null,
creationParameters,
Color4Extensions.FromHex("#5865F2").Lighten(0.75f),
Color4Extensions.FromHex("#5865F2")
);
SupporterText.AddText(" as well! ", creationParameters);
SupporterText.AddIcon(FontAwesome.Brands.Discord, x =>
{
creationParameters(x);

x.Colour = Color4Extensions.FromHex("#5865F2");
});

SupporterText.FadeInFromZero(5000D);
}

SupporterText.AddText("Hi, click ", creationParameters);
SupporterText.AddLink("here", "Opens Google", "https://google.com", null, creationParameters, Color4.White, Color4.Orange);
SupporterText.AddText(" to open Google.", creationParameters);
SupporterText.FadeInFromZero(500D);
#endregion
}

public override void OnEntering(IScreen last)
Expand All @@ -52,13 +172,13 @@ public override void OnEntering(IScreen last)

protected void CheckIfLoaded()
{
if (ScreenToExitTo.LoadState != LoadState.Ready)
if (ScreenToExitTo.LoadState != LoadState.Ready || Scheduler.HasPendingTasks)
{
Schedule(CheckIfLoaded);
return;
}

// this.Push(ScreenToExitTo);
Scheduler.AddDelayed(() => this.Push(ScreenToExitTo), 4000D);
}
}
}
1 change: 1 addition & 0 deletions Aurora.Resources/Aurora.Resources.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Fonts\**\*" />
Expand Down
Binary file added Aurora.Resources/Fonts/TorusNotched-Regular.fnt
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b115c78

Please sign in to comment.