mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
start doing help
This commit is contained in:
parent
35b353f535
commit
6a30687263
5 changed files with 114 additions and 107 deletions
BIN
data/ui/manual/home_d.png
Normal file
BIN
data/ui/manual/home_d.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
BIN
data/ui/manual/home_h.png
Normal file
BIN
data/ui/manual/home_h.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
BIN
data/ui/manual/home_n.png
Normal file
BIN
data/ui/manual/home_n.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
BIN
data/ui/manual/window.png
Normal file
BIN
data/ui/manual/window.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
|
|
@ -34,19 +34,19 @@ class HelpCreditsGui extends GuiImage {
|
||||||
var superBounceCtrl:GuiObjectShow;
|
var superBounceCtrl:GuiObjectShow;
|
||||||
|
|
||||||
public function new() {
|
public function new() {
|
||||||
var img = ResourceLoader.getImage("data/ui/background.jpg");
|
var img = ResourceLoader.getImage('data/ui/backgrounds/platinum/${cast (Math.floor(Util.lerp(1, 28, Math.random())), Int)}.jpg');
|
||||||
super(img.resource.toTile());
|
super(img.resource.toTile());
|
||||||
this.position = new Vector();
|
this.position = new Vector(0, 0);
|
||||||
this.extent = new Vector(640, 480);
|
this.extent = new Vector(640, 480);
|
||||||
this.horizSizing = Width;
|
this.horizSizing = Width;
|
||||||
this.vertSizing = Height;
|
this.vertSizing = Height;
|
||||||
|
|
||||||
var helpGui = new GuiImage(ResourceLoader.getResource("data/ui/help/help_gui.png", ResourceLoader.getImage, this.imageResources).toTile());
|
var wnd = new GuiImage(ResourceLoader.getResource("data/ui/manual/window.png", ResourceLoader.getImage, this.imageResources).toTile());
|
||||||
helpGui.horizSizing = Center;
|
wnd.position = new Vector(0, 0);
|
||||||
helpGui.vertSizing = Center;
|
wnd.extent = new Vector(640, 480);
|
||||||
helpGui.position = new Vector(15, 10);
|
wnd.horizSizing = Center;
|
||||||
helpGui.extent = new Vector(609, 460);
|
wnd.vertSizing = Center;
|
||||||
this.addChild(helpGui);
|
this.addChild(wnd);
|
||||||
|
|
||||||
function loadButtonImages(path:String) {
|
function loadButtonImages(path:String) {
|
||||||
var normal = ResourceLoader.getResource('${path}_n.png', ResourceLoader.getImage, this.imageResources).toTile();
|
var normal = ResourceLoader.getResource('${path}_n.png', ResourceLoader.getImage, this.imageResources).toTile();
|
||||||
|
|
@ -55,134 +55,141 @@ class HelpCreditsGui extends GuiImage {
|
||||||
return [normal, hover, pressed];
|
return [normal, hover, pressed];
|
||||||
}
|
}
|
||||||
|
|
||||||
var nextButton = new GuiButton(loadButtonImages("data/ui/play/next"));
|
var homeButton = new GuiButton(loadButtonImages("data/ui/manual/home"));
|
||||||
nextButton.position = new Vector(482, 376);
|
homeButton.position = new Vector(274, 385);
|
||||||
nextButton.extent = new Vector(75, 60);
|
homeButton.extent = new Vector(94, 46);
|
||||||
nextButton.pressedAction = (sender) -> nextPage();
|
|
||||||
helpGui.addChild(nextButton);
|
|
||||||
|
|
||||||
var prevButton = new GuiButton(loadButtonImages("data/ui/play/prev"));
|
|
||||||
prevButton.position = new Vector(58, 383);
|
|
||||||
prevButton.extent = new Vector(77, 58);
|
|
||||||
prevButton.pressedAction = (sender) -> previousPage();
|
|
||||||
helpGui.addChild(prevButton);
|
|
||||||
|
|
||||||
var homeButton = new GuiButton(loadButtonImages("data/ui/play/back"));
|
|
||||||
homeButton.position = new Vector(278, 378);
|
|
||||||
homeButton.extent = new Vector(79, 61);
|
|
||||||
homeButton.pressedAction = (sender) -> {
|
homeButton.pressedAction = (sender) -> {
|
||||||
MarbleGame.canvas.setContent(new MainMenuGui());
|
MarbleGame.canvas.setContent(new MainMenuGui());
|
||||||
}
|
}
|
||||||
helpGui.addChild(homeButton);
|
wnd.addChild(homeButton);
|
||||||
|
|
||||||
var helpWindow = new GuiImage(ResourceLoader.getResource("data/ui/help/help_window.png", ResourceLoader.getImage, this.imageResources).toTile());
|
// var helpGui = new GuiImage(ResourceLoader.getResource("data/ui/help/help_gui.png", ResourceLoader.getImage, this.imageResources).toTile());
|
||||||
helpWindow.position = new Vector(30, 31);
|
// helpGui.horizSizing = Center;
|
||||||
helpWindow.extent = new Vector(549, 338);
|
// helpGui.vertSizing = Center;
|
||||||
helpGui.addChild(helpWindow);
|
// helpGui.position = new Vector(15, 10);
|
||||||
|
// helpGui.extent = new Vector(609, 460);
|
||||||
|
// this.addChild(helpGui);
|
||||||
|
|
||||||
var arial14fontdata = ResourceLoader.getFileEntry("data/font/arial.fnt");
|
// var nextButton = new GuiButton(loadButtonImages("data/ui/play/next"));
|
||||||
var arial14b = new BitmapFont(arial14fontdata.entry);
|
// nextButton.position = new Vector(482, 376);
|
||||||
@:privateAccess arial14b.loader = ResourceLoader.loader;
|
// nextButton.extent = new Vector(75, 60);
|
||||||
var arial14 = arial14b.toSdfFont(cast 12 * Settings.uiScale, MultiChannel);
|
// nextButton.pressedAction = (sender) -> nextPage();
|
||||||
|
// helpGui.addChild(nextButton);
|
||||||
|
|
||||||
var domcasual32fontdata = ResourceLoader.getFileEntry("data/font/DomCasualD.fnt");
|
// var prevButton = new GuiButton(loadButtonImages("data/ui/play/prev"));
|
||||||
var domcasual32b = new BitmapFont(domcasual32fontdata.entry);
|
// prevButton.position = new Vector(58, 383);
|
||||||
@:privateAccess domcasual32b.loader = ResourceLoader.loader;
|
// prevButton.extent = new Vector(77, 58);
|
||||||
var domcasual32 = domcasual32b.toSdfFont(cast 26 * Settings.uiScale, MultiChannel);
|
// prevButton.pressedAction = (sender) -> previousPage();
|
||||||
|
// helpGui.addChild(prevButton);
|
||||||
|
|
||||||
var expo50fontdata = ResourceLoader.getFileEntry("data/font/EXPON.fnt");
|
// var helpWindow = new GuiImage(ResourceLoader.getResource("data/ui/help/help_window.png", ResourceLoader.getImage, this.imageResources).toTile());
|
||||||
var expo50b = new BitmapFont(expo50fontdata.entry);
|
// helpWindow.position = new Vector(30, 31);
|
||||||
@:privateAccess expo50b.loader = ResourceLoader.loader;
|
// helpWindow.extent = new Vector(549, 338);
|
||||||
var expo50 = expo50b.toSdfFont(cast 35 * Settings.uiScale, MultiChannel);
|
// helpGui.addChild(helpWindow);
|
||||||
var expo32 = expo50b.toSdfFont(cast 24 * Settings.uiScale, MultiChannel);
|
|
||||||
|
|
||||||
function mlFontLoader(text:String) {
|
// var arial14fontdata = ResourceLoader.getFileEntry("data/font/arial.fnt");
|
||||||
switch (text) {
|
// var arial14b = new BitmapFont(arial14fontdata.entry);
|
||||||
case "DomCasual32":
|
// @:privateAccess arial14b.loader = ResourceLoader.loader;
|
||||||
return domcasual32;
|
// var arial14 = arial14b.toSdfFont(cast 12 * Settings.uiScale, MultiChannel);
|
||||||
case "Arial14":
|
|
||||||
return arial14;
|
|
||||||
case "Expo32":
|
|
||||||
return expo32;
|
|
||||||
case "Expo50":
|
|
||||||
return expo50;
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hcText = new GuiMLText(domcasual32, mlFontLoader);
|
// var domcasual32fontdata = ResourceLoader.getFileEntry("data/font/DomCasualD.fnt");
|
||||||
hcText.position = new Vector(40, 24);
|
// var domcasual32b = new BitmapFont(domcasual32fontdata.entry);
|
||||||
hcText.extent = new Vector(488, 274);
|
// @:privateAccess domcasual32b.loader = ResourceLoader.loader;
|
||||||
hcText.text.textColor = 0;
|
// var domcasual32 = domcasual32b.toSdfFont(cast 26 * Settings.uiScale, MultiChannel);
|
||||||
hcText.text.lineSpacing = 5;
|
|
||||||
helpWindow.addChild(hcText);
|
|
||||||
|
|
||||||
hcText2 = new GuiMLText(domcasual32, mlFontLoader);
|
// var expo50fontdata = ResourceLoader.getFileEntry("data/font/EXPON.fnt");
|
||||||
hcText2.position = new Vector(40, 24);
|
// var expo50b = new BitmapFont(expo50fontdata.entry);
|
||||||
hcText2.extent = new Vector(488, 274);
|
// @:privateAccess expo50b.loader = ResourceLoader.loader;
|
||||||
hcText2.text.textColor = 0;
|
// var expo50 = expo50b.toSdfFont(cast 35 * Settings.uiScale, MultiChannel);
|
||||||
hcText2.text.lineSpacing = 5;
|
// var expo32 = expo50b.toSdfFont(cast 24 * Settings.uiScale, MultiChannel);
|
||||||
helpWindow.addChild(hcText2);
|
|
||||||
|
|
||||||
startPadCtrl = buildObjectShow("data/shapes/pads/startarea.dts", new Vector(30, 82), new Vector(79, 66), 8, 0.5);
|
// function mlFontLoader(text:String) {
|
||||||
helpWindow.addChild(startPadCtrl);
|
// switch (text) {
|
||||||
|
// case "DomCasual32":
|
||||||
|
// return domcasual32;
|
||||||
|
// case "Arial14":
|
||||||
|
// return arial14;
|
||||||
|
// case "Expo32":
|
||||||
|
// return expo32;
|
||||||
|
// case "Expo50":
|
||||||
|
// return expo50;
|
||||||
|
// default:
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
endPadCtrl = buildObjectShow("data/shapes/pads/endarea.dts", new Vector(31, 146), new Vector(79, 66), 8, 0.5);
|
// hcText = new GuiMLText(domcasual32, mlFontLoader);
|
||||||
helpWindow.addChild(endPadCtrl);
|
// hcText.position = new Vector(40, 24);
|
||||||
|
// hcText.extent = new Vector(488, 274);
|
||||||
|
// hcText.text.textColor = 0;
|
||||||
|
// hcText.text.lineSpacing = 5;
|
||||||
|
// helpWindow.addChild(hcText);
|
||||||
|
|
||||||
gem1Ctrl = buildObjectShow("data/shapes/items/gem.dts", new Vector(17, 234), new Vector(79, 66), 2.5, 0.4);
|
// hcText2 = new GuiMLText(domcasual32, mlFontLoader);
|
||||||
helpWindow.addChild(gem1Ctrl);
|
// hcText2.position = new Vector(40, 24);
|
||||||
|
// hcText2.extent = new Vector(488, 274);
|
||||||
|
// hcText2.text.textColor = 0;
|
||||||
|
// hcText2.text.lineSpacing = 5;
|
||||||
|
// helpWindow.addChild(hcText2);
|
||||||
|
|
||||||
gem2Ctrl = buildObjectShow("data/shapes/items/gem.dts", new Vector(43, 215), new Vector(79, 66), 2.5, 0.4, ["base.gem" => "purple.gem"]);
|
// startPadCtrl = buildObjectShow("data/shapes/pads/startarea.dts", new Vector(30, 82), new Vector(79, 66), 8, 0.5);
|
||||||
helpWindow.addChild(gem2Ctrl);
|
// helpWindow.addChild(startPadCtrl);
|
||||||
|
|
||||||
gem3Ctrl = buildObjectShow("data/shapes/items/gem.dts", new Vector(45, 250), new Vector(79, 66), 2.5, 0.4, ["base.gem" => "green.gem"]);
|
// endPadCtrl = buildObjectShow("data/shapes/pads/endarea.dts", new Vector(31, 146), new Vector(79, 66), 8, 0.5);
|
||||||
helpWindow.addChild(gem3Ctrl);
|
// helpWindow.addChild(endPadCtrl);
|
||||||
|
|
||||||
superSpeedCtrl = buildObjectShow("data/shapes/items/superspeed.dts", new Vector(30, 73), new Vector(79, 66), 3.5, 0.35);
|
// gem1Ctrl = buildObjectShow("data/shapes/items/gem.dts", new Vector(17, 234), new Vector(79, 66), 2.5, 0.4);
|
||||||
helpWindow.addChild(superSpeedCtrl);
|
// helpWindow.addChild(gem1Ctrl);
|
||||||
|
|
||||||
superJumpCtrl = buildObjectShow("data/shapes/items/superjump.dts", new Vector(31, 137), new Vector(79, 66), 3.5, 0.35);
|
// gem2Ctrl = buildObjectShow("data/shapes/items/gem.dts", new Vector(43, 215), new Vector(79, 66), 2.5, 0.4, ["base.gem" => "purple.gem"]);
|
||||||
helpWindow.addChild(superJumpCtrl);
|
// helpWindow.addChild(gem2Ctrl);
|
||||||
|
|
||||||
shockAbsorberCtrl = buildObjectShow("data/shapes/items/shockabsorber.dts", new Vector(33, 204), new Vector(72, 61), 3.5, 0.35);
|
// gem3Ctrl = buildObjectShow("data/shapes/items/gem.dts", new Vector(45, 250), new Vector(79, 66), 2.5, 0.4, ["base.gem" => "green.gem"]);
|
||||||
helpWindow.addChild(shockAbsorberCtrl);
|
// helpWindow.addChild(gem3Ctrl);
|
||||||
|
|
||||||
superBounceCtrl = buildObjectShow("data/shapes/items/superbounce.dts", new Vector(35, 260), new Vector(72, 61), 3.5, 0.35);
|
// superSpeedCtrl = buildObjectShow("data/shapes/items/superspeed.dts", new Vector(30, 73), new Vector(79, 66), 3.5, 0.35);
|
||||||
helpWindow.addChild(superBounceCtrl);
|
// helpWindow.addChild(superSpeedCtrl);
|
||||||
|
|
||||||
helicopterCtrl = buildObjectShow("data/shapes/images/helicopter.dts", new Vector(30, 82), new Vector(79, 66), 2, 0.35);
|
// superJumpCtrl = buildObjectShow("data/shapes/items/superjump.dts", new Vector(31, 137), new Vector(79, 66), 3.5, 0.35);
|
||||||
helpWindow.addChild(helicopterCtrl);
|
// helpWindow.addChild(superJumpCtrl);
|
||||||
|
|
||||||
timeTravelCtrl = buildObjectShow("data/shapes/items/timetravel.dts", new Vector(31, 146), new Vector(79, 66), 3.5, 0.35);
|
// shockAbsorberCtrl = buildObjectShow("data/shapes/items/shockabsorber.dts", new Vector(33, 204), new Vector(72, 61), 3.5, 0.35);
|
||||||
helpWindow.addChild(timeTravelCtrl);
|
// helpWindow.addChild(shockAbsorberCtrl);
|
||||||
|
|
||||||
antiGravityCtrl = buildObjectShow("data/shapes/items/antigravity.dts", new Vector(35, 217), new Vector(72, 61), 3.5, 0.35);
|
// superBounceCtrl = buildObjectShow("data/shapes/items/superbounce.dts", new Vector(35, 260), new Vector(72, 61), 3.5, 0.35);
|
||||||
helpWindow.addChild(antiGravityCtrl);
|
// helpWindow.addChild(superBounceCtrl);
|
||||||
|
|
||||||
ductFanCtrl = buildObjectShow("data/shapes/hazards/ductfan.dts", new Vector(30, 82), new Vector(79, 66), 4, 0.5);
|
// helicopterCtrl = buildObjectShow("data/shapes/images/helicopter.dts", new Vector(30, 82), new Vector(79, 66), 2, 0.35);
|
||||||
helpWindow.addChild(ductFanCtrl);
|
// helpWindow.addChild(helicopterCtrl);
|
||||||
|
|
||||||
tornadoCtrl = buildObjectShow("data/shapes/hazards/tornado.dts", new Vector(26, 155), new Vector(91, 66), 18, 0.35);
|
// timeTravelCtrl = buildObjectShow("data/shapes/items/timetravel.dts", new Vector(31, 146), new Vector(79, 66), 3.5, 0.35);
|
||||||
for (mat in tornadoCtrl.sceneObject.materials) {
|
// helpWindow.addChild(timeTravelCtrl);
|
||||||
mat.blendMode = None;
|
|
||||||
}
|
|
||||||
helpWindow.addChild(tornadoCtrl);
|
|
||||||
|
|
||||||
trapdoorCtrl = buildObjectShow("data/shapes/hazards/trapdoor.dts", new Vector(35, 217), new Vector(77, 76), 8, 0.35);
|
// antiGravityCtrl = buildObjectShow("data/shapes/items/antigravity.dts", new Vector(35, 217), new Vector(72, 61), 3.5, 0.35);
|
||||||
helpWindow.addChild(trapdoorCtrl);
|
// helpWindow.addChild(antiGravityCtrl);
|
||||||
|
|
||||||
oilSlickCtrl = buildObjectShow("data/shapes/hazards/oilslick.dts", new Vector(35, 217), new Vector(77, 76), 8, 0.35);
|
// ductFanCtrl = buildObjectShow("data/shapes/hazards/ductfan.dts", new Vector(30, 82), new Vector(79, 66), 4, 0.5);
|
||||||
helpWindow.addChild(oilSlickCtrl);
|
// helpWindow.addChild(ductFanCtrl);
|
||||||
|
|
||||||
landMineCtrl = buildObjectShow("data/shapes/hazards/landmine.dts", new Vector(26, 155), new Vector(91, 66), 1.5, 0.35);
|
// tornadoCtrl = buildObjectShow("data/shapes/hazards/tornado.dts", new Vector(26, 155), new Vector(91, 66), 18, 0.35);
|
||||||
helpWindow.addChild(landMineCtrl);
|
// for (mat in tornadoCtrl.sceneObject.materials) {
|
||||||
|
// mat.blendMode = None;
|
||||||
|
// }
|
||||||
|
// helpWindow.addChild(tornadoCtrl);
|
||||||
|
|
||||||
bumperCtrl = buildObjectShow("data/shapes/bumpers/pball_round.dts", new Vector(30, 82), new Vector(79, 66), 1.8, 0.5);
|
// trapdoorCtrl = buildObjectShow("data/shapes/hazards/trapdoor.dts", new Vector(35, 217), new Vector(77, 76), 8, 0.35);
|
||||||
helpWindow.addChild(bumperCtrl);
|
// helpWindow.addChild(trapdoorCtrl);
|
||||||
|
|
||||||
redrawPage();
|
// oilSlickCtrl = buildObjectShow("data/shapes/hazards/oilslick.dts", new Vector(35, 217), new Vector(77, 76), 8, 0.35);
|
||||||
|
// helpWindow.addChild(oilSlickCtrl);
|
||||||
|
|
||||||
|
// landMineCtrl = buildObjectShow("data/shapes/hazards/landmine.dts", new Vector(26, 155), new Vector(91, 66), 1.5, 0.35);
|
||||||
|
// helpWindow.addChild(landMineCtrl);
|
||||||
|
|
||||||
|
// bumperCtrl = buildObjectShow("data/shapes/bumpers/pball_round.dts", new Vector(30, 82), new Vector(79, 66), 1.8, 0.5);
|
||||||
|
// helpWindow.addChild(bumperCtrl);
|
||||||
|
|
||||||
|
// redrawPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
function redrawPage() {
|
function redrawPage() {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue