mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-23 21:28:35 +01:00
added wip disclaimer to the web demo
This commit is contained in:
parent
88136ab9c5
commit
c9d7fd29df
1 changed files with 9 additions and 1 deletions
|
@ -2,13 +2,16 @@ using System.Threading.Tasks;
|
|||
using Microsoft.JSInterop;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
using MLEM.Formatting;
|
||||
using MLEM.Misc;
|
||||
using MLEM.Ui;
|
||||
using MLEM.Ui.Elements;
|
||||
|
||||
namespace Demos.Web.Pages;
|
||||
|
||||
public partial class Index {
|
||||
|
||||
private Game game;
|
||||
private GameImpl game;
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender) {
|
||||
await base.OnAfterRenderAsync(firstRender);
|
||||
|
@ -21,6 +24,11 @@ public partial class Index {
|
|||
if (this.game == null) {
|
||||
MlemPlatform.Current = new MlemPlatform.DesktopGl<TextInputEventArgs>((w, c) => w.TextInput += c);
|
||||
this.game = new GameImpl();
|
||||
this.game.OnLoadContent += g => g.UiSystem.Add("WebDisclaimer", new Paragraph(Anchor.BottomCenter, 1, "The Web version of MLEM's demos is still in development.\nFor the best experience, please try their Desktop and Android versions instead.") {
|
||||
PositionOffset = new Vector2(0, 1),
|
||||
Alignment = TextAlignment.Center,
|
||||
TextScale = 0.075F
|
||||
});
|
||||
this.game.Run();
|
||||
}
|
||||
this.game.Tick();
|
||||
|
|
Loading…
Reference in a new issue