decompiled panorama scripts, lets try it out
This commit is contained in:
34
panorama/scripts/custom_game/end_screen.js
Normal file
34
panorama/scripts/custom_game/end_screen.js
Normal file
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
|
||||
(function(){
|
||||
GameUI.SetDefaultUIEnabled( DotaDefaultUIElement_t.DOTA_DEFAULT_UI_ENDGAME, false );
|
||||
|
||||
var playerIDs = Game.GetPlayerIDsOnTeam(DOTATeam_t.DOTA_TEAM_GOODGUYS);
|
||||
for (var i = 0; i < playerIDs.length; i++) {
|
||||
var id = playerIDs[i];
|
||||
var info = Game.GetPlayerInfo(id);
|
||||
var panel = $.CreatePanel("Panel", $("#PlayersPanel"), "");
|
||||
panel.BLoadLayoutSnippet("player");
|
||||
|
||||
panel.FindChild("PlayerColor").style.backgroundColor = GameUI.DotaColorToHtml(Players.GetPlayerColor(id));
|
||||
|
||||
panel.FindChild("AvatarImage").steamid = info.player_steamid;
|
||||
panel.FindChild("PlayerAndHeroNameContainer").FindChild("PlayerNameLabel").text = info.player_name;
|
||||
panel.FindChild("PlayerAndHeroNameContainer").FindChild("HeroNameLabel").text = $.Localize(info.player_selected_hero);
|
||||
|
||||
var table = CustomNetTables.GetTableValue("CustomGameInfo", "game_info" + info.player_steamid);
|
||||
var KillCount = panel.FindChild("KillCount");
|
||||
KillCount.text = table["creature_kill_count"];
|
||||
}
|
||||
|
||||
if (Game.GetGameWinner() === DOTATeam_t.DOTA_TEAM_GOODGUYS) {
|
||||
$("#WinText").text = $.Localize("#dota_match_history_win");
|
||||
} else {
|
||||
$("#WinText").AddClass("fail");
|
||||
$("#WinText").text = $.Localize("#dota_match_history_loss");
|
||||
}
|
||||
|
||||
$.Schedule(5, function () {
|
||||
$("#ContinueButton").RemoveClass('Hide');
|
||||
})
|
||||
})();
|
||||
Reference in New Issue
Block a user