MCPcopy Create free account
hub / github.com/BlaNKtext/webosu / LoadingMenu

Function LoadingMenu

js/overlay/loading.js:10–107  ·  view source on GitHub ↗
(windowfield, track)

Source from the content-addressed store, hash-verified

8
9define([], function () {
10 function LoadingMenu(windowfield, track) {
11 // constructor.
12 PIXI.Container.call(this);
13 this.fadetime = 200;
14 this.alpha = 1;
15 this.hidden = false;
16
17 this.bg = new PIXI.Sprite(Skin["hpbarright.png"]);
18 this.bg.rotation = Math.PI / 2;
19 this.bg.anchor.set(0.5);
20 this.bg.scale.set(0.6, 500);
21 this.bg.alpha = 0.8;
22 this.addChild(this.bg);
23
24 this.titletext = new PIXI.Text(track.metadata.Title || "-", {
25 fontFamily: "Comfortaa",
26 fontSize: 24,
27 fill: ["#ffffff"],
28 });
29 this.artisttext = new PIXI.Text(track.metadata.Artist || "-", {
30 fontFamily: "Comfortaa",
31 fontSize: 14,
32 fill: ["#ffffff"],
33 });
34 this.versiontext = new PIXI.Text(track.metadata.Version || "-", {
35 fontFamily: "Comfortaa",
36 fontSize: 14,
37 fill: ["#ffffff"],
38 });
39 this.sourcetext = new PIXI.Text(
40 "Source: " + (track.metadata.Source || "-"),
41 { fontFamily: "Comfortaa", fontSize: 14, fill: ["#ffffff"] }
42 );
43 this.mappertext = new PIXI.Text(
44 "Mapper: " + (track.metadata.Creator || "-"),
45 { fontFamily: "Comfortaa", fontSize: 14, fill: ["#ffffff"] }
46 );
47 this.titletext.anchor.set(0.5);
48 this.artisttext.anchor.set(0.5);
49 this.versiontext.anchor.set(0.5);
50 this.sourcetext.anchor.set(0.5);
51 this.mappertext.anchor.set(0.5);
52
53 this.addChild(this.titletext);
54 this.addChild(this.artisttext);
55 this.addChild(this.versiontext);
56 this.addChild(this.sourcetext);
57 this.addChild(this.mappertext);
58
59 this.loading = new PIXI.Sprite(Skin["dot.png"]);
60 this.loading.anchor.set(0.5, 0.3);
61 this.loading.scale.set(1, 0.6);
62 this.addChild(this.loading);
63
64 this.resize = function (windowfield) {
65 this.bg.x = windowfield.width / 2;
66 this.bg.y = windowfield.height / 2;
67 this.titletext.x = windowfield.width / 2;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected