mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
warning on js
This commit is contained in:
parent
649f856f6a
commit
02fd4afb67
2 changed files with 21 additions and 0 deletions
|
|
@ -122,11 +122,18 @@ class MainMenuGui extends GuiImage {
|
|||
btnList.addButton(2, "Changelog", (sender) -> {
|
||||
MarbleGame.canvas.setContent(new VersionGui());
|
||||
});
|
||||
#if hl
|
||||
btnList.addButton(4, "Return to Arcade", (sender) -> {
|
||||
#if hl
|
||||
Sys.exit(0);
|
||||
#end
|
||||
});
|
||||
#end
|
||||
#if js
|
||||
btnList.addButton(4, "Download", (sender) -> {
|
||||
js.Browser.window.open("https://github.com/RandomityGuy/MBHaxe");
|
||||
});
|
||||
#end
|
||||
|
||||
function loadButtonImages(path:String) {
|
||||
var normal = ResourceLoader.getResource('${path}_n.png', ResourceLoader.getImage, this.imageResources).toTile();
|
||||
|
|
|
|||
|
|
@ -53,6 +53,20 @@ class MultiplayerGui extends GuiImage {
|
|||
rootTitle.text.alpha = 0.5;
|
||||
innerCtrl.addChild(rootTitle);
|
||||
|
||||
var arial14fontdata = ResourceLoader.getFileEntry("data/font/Arial Bold.fnt");
|
||||
var arial14b = new BitmapFont(arial14fontdata.entry);
|
||||
@:privateAccess arial14b.loader = ResourceLoader.loader;
|
||||
var arial12 = arial14b.toSdfFont(cast 18 * Settings.uiScale, h2d.Font.SDFChannel.MultiChannel);
|
||||
|
||||
#if js
|
||||
var warningTxt = new GuiText(arial12);
|
||||
warningTxt.text.textColor = 0xEBEBEB;
|
||||
warningTxt.position = new Vector(150, 250);
|
||||
warningTxt.extent = new Vector(100, 100);
|
||||
warningTxt.text.text = "Warning: You are playing on a browser.\nFor smooth multiplayer experience, it is\nrecommended to download the game on your device.";
|
||||
innerCtrl.addChild(warningTxt);
|
||||
#end
|
||||
|
||||
var btnList = new GuiXboxList();
|
||||
btnList.position = new Vector(70 - offsetX, 165);
|
||||
btnList.horizSizing = Left;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue