Skip to content

Commit

Permalink
this critical
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomityGuy committed Jul 19, 2024
1 parent bb33ddf commit 5a6c8ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/MarbleWorld.hx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class MarbleWorld extends Scheduler {

public function initLoading() {
Console.log("*** LOADING MISSION: " + mission.path);
this.loadingGui = new LoadingGui(this.mission.title, this.mission.game);
this.loadingGui = new LoadingGui(this.mission.title, this.mission.game, this.isMultiplayer);
MarbleGame.canvas.setContent(this.loadingGui);
if (this.mission.isClaMission) {
this.mission.download(() -> loadBegin());
Expand Down
5 changes: 3 additions & 2 deletions src/gui/LoadingGui.hx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import src.Util;
class LoadingGui extends GuiImage {
public var setProgress:Float->Void;

public function new(missionName:String, game:String) {
public function new(missionName:String, game:String, isMultiplayer:Bool = false) {
function chooseBg() {
if (game == "gold")
return ResourceLoader.getImage('data/ui/backgrounds/gold/${cast (Math.floor(Util.lerp(1, 12, Math.random())), Int)}.jpg');
Expand Down Expand Up @@ -76,7 +76,8 @@ class LoadingGui extends GuiImage {

loadingGui.addChild(mapName);
loadingGui.addChild(progress);
loadingGui.addChild(cancelButton);
if (!isMultiplayer)
loadingGui.addChild(cancelButton);
loadingGui.addChild(overlay);

this.addChild(loadingGui);
Expand Down

0 comments on commit 5a6c8ae

Please sign in to comment.