mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-12-24 08:52:43 +00:00
improve server list readability a bit
This commit is contained in:
parent
43be50428c
commit
a0ee2f1398
8 changed files with 28 additions and 8 deletions
BIN
data/ui/xbox/platform_android_white.png
Normal file
BIN
data/ui/xbox/platform_android_white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 314 B |
BIN
data/ui/xbox/platform_desktop_white.png
Normal file
BIN
data/ui/xbox/platform_desktop_white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 289 B |
BIN
data/ui/xbox/platform_mac_white.png
Normal file
BIN
data/ui/xbox/platform_mac_white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 268 B |
BIN
data/ui/xbox/platform_unknown_white.png
Normal file
BIN
data/ui/xbox/platform_unknown_white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 363 B |
BIN
data/ui/xbox/platform_web_white.png
Normal file
BIN
data/ui/xbox/platform_web_white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 388 B |
|
|
@ -197,6 +197,10 @@ class Console {
|
|||
MarbleGame.instance.fpsLimit = scale;
|
||||
MarbleGame.instance.limitingFps = true;
|
||||
log("Set FPS to " + scale);
|
||||
} else if (cmdType == 'reload') {
|
||||
#if sys
|
||||
hl.Api.checkReload();
|
||||
#end
|
||||
} else {
|
||||
error("Unknown command");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1784,6 +1784,8 @@ class Marble extends GameObject {
|
|||
this.megaMarbleUseTick = p.megaTick;
|
||||
// this.currentUp = p.gravityDirection;
|
||||
this.level.setUp(cast this, p.gravityDirection, this.level.timeState);
|
||||
if (this.outOfBounds && !p.oob && this.controllable)
|
||||
@:privateAccess this.level.playGui.setCenterText('');
|
||||
this.outOfBounds = p.oob;
|
||||
this.camera.oob = p.oob;
|
||||
if (p.powerUpId == 0x1FF) {
|
||||
|
|
|
|||
|
|
@ -64,15 +64,15 @@ class MPServerListGui extends GuiImage {
|
|||
case "notready":
|
||||
return ResourceLoader.getResource("data/ui/xbox/NotReady.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
case "pc":
|
||||
return ResourceLoader.getResource("data/ui/xbox/platform_desktop.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
return ResourceLoader.getResource("data/ui/xbox/platform_desktop_white.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
case "mac":
|
||||
return ResourceLoader.getResource("data/ui/xbox/platform_mac.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
return ResourceLoader.getResource("data/ui/xbox/platform_mac_white.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
case "web":
|
||||
return ResourceLoader.getResource("data/ui/xbox/platform_web.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
return ResourceLoader.getResource("data/ui/xbox/platform_web_white.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
case "android":
|
||||
return ResourceLoader.getResource("data/ui/xbox/platform_android.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
return ResourceLoader.getResource("data/ui/xbox/platform_android_white.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
case "unknown":
|
||||
return ResourceLoader.getResource("data/ui/xbox/platform_unknown.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
return ResourceLoader.getResource("data/ui/xbox/platform_unknown_white.png", ResourceLoader.getImage, this.imageResources).toTile();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -84,9 +84,9 @@ class MPServerListGui extends GuiImage {
|
|||
var serverList = new GuiMLTextListCtrl(arial14, serverDisplays, imgLoader);
|
||||
|
||||
serverList.selectedColor = 0xF29515;
|
||||
serverList.selectedFillColor = 0xEBEBEB;
|
||||
serverList.selectedFillColor = 0x858585;
|
||||
serverList.position = new Vector(25, 22);
|
||||
serverList.extent = new Vector(550, 480);
|
||||
serverList.extent = new Vector(680, 480);
|
||||
serverList.scrollable = true;
|
||||
serverList.onSelectedFunc = (sel) -> {
|
||||
curSelection = sel;
|
||||
|
|
@ -97,7 +97,7 @@ class MPServerListGui extends GuiImage {
|
|||
var platformToString = ["unknown", "pc", "mac", "web", "android"];
|
||||
|
||||
function updateServerListDisplay() {
|
||||
serverDisplays = ourServerList.map(x -> return '<img src="${platformToString[x.platform]}"></img><font color="#101010">${x.name}</font>');
|
||||
serverDisplays = ourServerList.map(x -> return '<img src="${platformToString[x.platform]}"></img><font color="#FFFFFF">${x.name}</font>');
|
||||
serverList.setTexts(serverDisplays);
|
||||
}
|
||||
|
||||
|
|
@ -124,6 +124,20 @@ class MPServerListGui extends GuiImage {
|
|||
backButton.pressedAction = (e) -> MarbleGame.canvas.setContent(new MainMenuGui());
|
||||
bottomBar.addChild(backButton);
|
||||
|
||||
var refreshButton = new GuiXboxButton("Refresh", 220);
|
||||
refreshButton.position = new Vector(750, 0);
|
||||
refreshButton.vertSizing = Bottom;
|
||||
refreshButton.horizSizing = Right;
|
||||
refreshButton.pressedAction = (e) -> {
|
||||
MasterServerClient.connectToMasterServer(() -> {
|
||||
MasterServerClient.instance.getServerList((servers) -> {
|
||||
ourServerList = servers;
|
||||
updateServerListDisplay();
|
||||
});
|
||||
});
|
||||
}
|
||||
bottomBar.addChild(refreshButton);
|
||||
|
||||
var nextButton = new GuiXboxButton("Join", 160);
|
||||
nextButton.position = new Vector(960, 0);
|
||||
nextButton.vertSizing = Bottom;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue