start work on achievements

This commit is contained in:
RandomityGuy 2022-11-21 00:55:24 +05:30
parent d9ac2585ad
commit 592a6d78ec
52 changed files with 49 additions and 0 deletions

BIN
data/ui/achiev/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
data/ui/achiev/10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
data/ui/achiev/11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
data/ui/achiev/12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
data/ui/achiev/13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
data/ui/achiev/14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
data/ui/achiev/15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

BIN
data/ui/achiev/16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
data/ui/achiev/17.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
data/ui/achiev/18.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

BIN
data/ui/achiev/19.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
data/ui/achiev/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
data/ui/achiev/20.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
data/ui/achiev/21.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
data/ui/achiev/22.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
data/ui/achiev/23.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
data/ui/achiev/24.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
data/ui/achiev/25.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
data/ui/achiev/26.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

BIN
data/ui/achiev/27.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
data/ui/achiev/28.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
data/ui/achiev/29.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
data/ui/achiev/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
data/ui/achiev/30.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
data/ui/achiev/31.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
data/ui/achiev/32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
data/ui/achiev/33.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
data/ui/achiev/34.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
data/ui/achiev/35.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
data/ui/achiev/36.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
data/ui/achiev/37.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
data/ui/achiev/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
data/ui/achiev/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
data/ui/achiev/6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
data/ui/achiev/7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

BIN
data/ui/achiev/8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
data/ui/achiev/9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
data/ui/achiev/achiev.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
data/ui/achiev/close_d.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
data/ui/achiev/close_h.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
data/ui/achiev/close_i.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
data/ui/achiev/close_n.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
data/ui/achiev/n1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
data/ui/achiev/n2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
data/ui/achiev/n3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
data/ui/achiev/n4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
data/ui/achiev/n5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
data/ui/achiev/n6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
data/ui/achiev/window.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View file

@ -0,0 +1,37 @@
package gui;
import h3d.Vector;
import src.ResourceLoader;
import src.MarbleGame;
class AchievementsGui extends GuiImage {
public function new() {
var img = ResourceLoader.getImage("data/ui/achiev/window.png");
super(img.resource.toTile());
this.horizSizing = Center;
this.vertSizing = Center;
this.position = new Vector(73, -21);
this.extent = new Vector(493, 512);
var achiev = new GuiImage(ResourceLoader.getResource("data/ui/achiev/achiev.png", ResourceLoader.getImage, this.imageResources).toTile());
achiev.position = new Vector(152, 26);
achiev.extent = new Vector(176, 50);
this.addChild(achiev);
function loadButtonImages(path:String) {
var normal = ResourceLoader.getResource('${path}_n.png', ResourceLoader.getImage, this.imageResources).toTile();
var hover = ResourceLoader.getResource('${path}_h.png', ResourceLoader.getImage, this.imageResources).toTile();
var pressed = ResourceLoader.getResource('${path}_d.png', ResourceLoader.getImage, this.imageResources).toTile();
var disabled = ResourceLoader.getResource('${path}_i.png', ResourceLoader.getImage, this.imageResources).toTile();
return [normal, hover, pressed, disabled];
}
var closeButton = new GuiButton(loadButtonImages("data/ui/achiev/close"));
closeButton.position = new Vector(355, 426);
closeButton.extent = new Vector(95, 45);
closeButton.pressedAction = (e) -> {
MarbleGame.canvas.popDialog(this);
}
this.addChild(closeButton);
}
}

View file

@ -619,11 +619,15 @@ class PlayMissionGui extends GuiImage {
var pmAchievements = new GuiButton(loadButtonImages("data/ui/play/achiev"));
pmAchievements.position = new Vector(150, 46);
pmAchievements.extent = new Vector(43, 43);
pmAchievements.pressedAction = (e) -> {
MarbleGame.canvas.pushDialog(new AchievementsGui());
}
pmMorePopDlg.addChild(pmAchievements);
var pmEditorToggle = new GuiButton(loadButtonImages("data/ui/play/editor"));
pmEditorToggle.position = new Vector(198, 46);
pmEditorToggle.extent = new Vector(43, 43);
pmEditorToggle.disabled = true;
pmMorePopDlg.addChild(pmEditorToggle);
var pmRecord = new GuiButton(loadButtonImages("data/ui/play/replay"));
@ -707,6 +711,14 @@ class PlayMissionGui extends GuiImage {
currentList = "category" == "custom" ? MissionList.customMissions : MissionList.missionList[game][category];
@:privateAccess pmDifficulty.anim.frames = loadButtonImages('data/ui/play/difficulty_${category}');
pmDifficultyMarble.bmp.tile = ResourceLoader.getResource('data/ui/play/marble_${game}.png', ResourceLoader.getImage, this.imageResources).toTile();
if (game == "platinum") {
pmAchievements.disabled = false;
} else {
pmAchievements.disabled = true;
}
currentCategoryStatic = currentCategory;
currentGame = game;
setSelectedFunc(currentList.length - 1);