mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-27 21:21:41 +00:00
better visibility of customs
This commit is contained in:
parent
d25546768e
commit
4d8629bee8
2 changed files with 21 additions and 8 deletions
|
|
@ -216,17 +216,26 @@ class MultiplayerLevelSelectGui extends GuiImage {
|
||||||
playerList.onSelectedFunc = (sel) -> {}
|
playerList.onSelectedFunc = (sel) -> {}
|
||||||
playerWnd.addChild(playerList);
|
playerWnd.addChild(playerList);
|
||||||
|
|
||||||
|
var custWnd = new GuiImage(ResourceLoader.getResource("data/ui/xbox/helpWindow.png", ResourceLoader.getImage, this.imageResources).toTile());
|
||||||
|
custWnd.horizSizing = Right;
|
||||||
|
custWnd.vertSizing = Bottom;
|
||||||
|
custWnd.position = new Vector(330, 58);
|
||||||
|
custWnd.extent = new Vector(640, 330);
|
||||||
|
|
||||||
var customListScroll = new GuiConsoleScrollCtrl(ResourceLoader.getResource("data/ui/common/osxscroll.png", ResourceLoader.getImage, this.imageResources)
|
var customListScroll = new GuiConsoleScrollCtrl(ResourceLoader.getResource("data/ui/common/osxscroll.png", ResourceLoader.getImage, this.imageResources)
|
||||||
.toTile());
|
.toTile());
|
||||||
customListScroll.position = new Vector(25, 22);
|
customListScroll.position = new Vector(25, 22);
|
||||||
customListScroll.extent = new Vector(590, 330);
|
customListScroll.extent = new Vector(600, 280);
|
||||||
|
customListScroll.scrollToBottom = false;
|
||||||
|
custWnd.addChild(customListScroll);
|
||||||
|
|
||||||
customList = new GuiTextListCtrl(arial14, MPCustoms.missionList.map(mission -> {
|
customList = new GuiTextListCtrl(arial14, MPCustoms.missionList.map(mission -> {
|
||||||
return mission.title;
|
return mission.title;
|
||||||
}));
|
}));
|
||||||
var custSelectedIdx = 0;
|
var custSelectedIdx = 0;
|
||||||
customList.selectedColor = 0xF29515;
|
customList.selectedColor = 0xF29515;
|
||||||
customList.selectedFillColor = 0xEBEBEB;
|
customList.selectedFillColor = 0x858585;
|
||||||
|
customList.textColor = 0xFFFFFF;
|
||||||
customList.position = new Vector(0, 0);
|
customList.position = new Vector(0, 0);
|
||||||
customList.extent = new Vector(550, 2880);
|
customList.extent = new Vector(550, 2880);
|
||||||
customList.scrollable = true;
|
customList.scrollable = true;
|
||||||
|
|
@ -273,11 +282,11 @@ class MultiplayerLevelSelectGui extends GuiImage {
|
||||||
customsButton.pressedAction = (e) -> {
|
customsButton.pressedAction = (e) -> {
|
||||||
showingCustoms = !showingCustoms;
|
showingCustoms = !showingCustoms;
|
||||||
if (showingCustoms) {
|
if (showingCustoms) {
|
||||||
playerWnd.addChild(customListScroll);
|
innerCtrl.removeChild(playerWnd);
|
||||||
playerWnd.removeChild(playerList);
|
innerCtrl.addChild(custWnd);
|
||||||
} else {
|
} else {
|
||||||
playerWnd.removeChild(customListScroll);
|
innerCtrl.addChild(playerWnd);
|
||||||
playerWnd.addChild(playerList);
|
innerCtrl.removeChild(custWnd);
|
||||||
updateLobbyNames();
|
updateLobbyNames();
|
||||||
}
|
}
|
||||||
MarbleGame.canvas.render(MarbleGame.canvas.scene2d);
|
MarbleGame.canvas.render(MarbleGame.canvas.scene2d);
|
||||||
|
|
@ -413,13 +422,13 @@ class MultiplayerLevelSelectGui extends GuiImage {
|
||||||
};
|
};
|
||||||
|
|
||||||
setLevelFn = (idx) -> {
|
setLevelFn = (idx) -> {
|
||||||
setLevel(idx);
|
|
||||||
levelSelectOpts.setCurrentOption(idx);
|
levelSelectOpts.setCurrentOption(idx);
|
||||||
|
setLevel(idx);
|
||||||
};
|
};
|
||||||
|
|
||||||
setLevelStr = (str) -> {
|
setLevelStr = (str) -> {
|
||||||
levelSelectOpts.optionText.text.text = str;
|
levelSelectOpts.optionText.text.text = str;
|
||||||
updateLobbyNames();
|
updatePlayerCountFn(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
levelSelectOpts.setCurrentOption(currentSelectionStatic);
|
levelSelectOpts.setCurrentOption(currentSelectionStatic);
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,11 @@ typedef RemoteServerInfo = {
|
||||||
}
|
}
|
||||||
|
|
||||||
class MasterServerClient {
|
class MasterServerClient {
|
||||||
|
#if js
|
||||||
|
static var serverIp = "wss://mbomaster.randomityguy.me:8443";
|
||||||
|
#else
|
||||||
static var serverIp = "ws://89.58.58.191:8080";
|
static var serverIp = "ws://89.58.58.191:8080";
|
||||||
|
#end
|
||||||
public static var instance:MasterServerClient;
|
public static var instance:MasterServerClient;
|
||||||
|
|
||||||
var ws:WebSocket;
|
var ws:WebSocket;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue