diff --git a/ReallifeGamemode.Client/Gui/playerlist.ts b/ReallifeGamemode.Client/Gui/playerlist.ts index e4be88ad..99293c0c 100644 --- a/ReallifeGamemode.Client/Gui/playerlist.ts +++ b/ReallifeGamemode.Client/Gui/playerlist.ts @@ -4,26 +4,32 @@ * @copyright (c) 2008 - 2018 Life of German */ -export default function playerList() { +export default function playerList(globalData: GlobalData) { - var playerlistBrowser + var playerlistBrowser: BrowserMp = null; var pList; mp.events.add("showPlayerlist", (playersJson) => { - if (!playerlistBrowser) { - playerlistBrowser = mp.browsers.new('package://assets/html/Playerlist/Tabliste.html'); - mp.gui.chat.activate(false); - mp.gui.cursor.show(true, true); - pList = JSON.parse(playersJson); - pList.forEach((player) => { - playerlistBrowser.execute(`ad_row('${JSON.stringify(player.Id)}','${JSON.stringify(player.Name)}',0,0,'${JSON.stringify(player.Ping)}');`); - }); - } else { + + if (playerlistBrowser == null) { + if (!globalData.InMenu) { + globalData.InMenu = true; + playerlistBrowser = mp.browsers.new('package://assets/html/Playerlist/Tabliste.html'); + mp.gui.chat.activate(false); + mp.gui.cursor.show(true, true); + pList = JSON.parse(playersJson); + pList.forEach((player) => { + playerlistBrowser.execute(`ad_row('${JSON.stringify(player.Id)}','${JSON.stringify(player.Name)}',0,0,'${JSON.stringify(player.Ping)}');`); + }); + } + } else { playerlistBrowser.destroy(); playerlistBrowser = null; mp.gui.chat.activate(true); mp.gui.cursor.show(false, false); + globalData.InMenu = false; } + }); mp.events.add("CEF:fetchPlayerList", () => { diff --git a/ReallifeGamemode.Client/Player/weaponlist.ts b/ReallifeGamemode.Client/Player/weaponlist.ts index 3e31319d..cea64a5c 100644 --- a/ReallifeGamemode.Client/Player/weaponlist.ts +++ b/ReallifeGamemode.Client/Player/weaponlist.ts @@ -26,16 +26,17 @@ export default function weaponList(globalData: GlobalData) { var secondaries; var melees; var specialsWep; - + var time; var primary = ""; var secondary = ""; var melee = ""; var specialWep = ""; + var timer = ""; //Weapon Menu - mp.events.add('showWeaponMenu', (primariesArr, secondariesArr, meleesArr, specialsArr) => { + mp.events.add('showWeaponMenu', (primariesArr, secondariesArr, meleesArr, specialsArr, jsonTime) => { if (!globalData.InMenu) { globalData.InMenu = true; @@ -44,13 +45,19 @@ export default function weaponList(globalData: GlobalData) { secondaries = secondariesArr; melees = meleesArr; specialsWep = specialsArr; + time = JSON.parse(jsonTime); - weaponMenu = new Menu("Waffenschrank", "Stelle deine Waffen Ausrüstung zusammen", new Point(50, 50), null, null); + let dealItem = new UIMenuListItem("Waffentransport", "", new ItemsCollection(time)); + dealItem.BackColor = new Color(204, 170, 0); + dealItem.HighlightedBackColor = new Color(255, 213, 0); - weaponMenu.AddItem(new UIMenuListItem("Primäre", "", new ItemsCollection(primaries))); - weaponMenu.AddItem(new UIMenuListItem("Sekundäre", "", new ItemsCollection(secondaries))); + weaponMenu = new Menu("Waffenschrank", "Stelle deine Waffenausrüstung zusammen", new Point(50, 50), null, null); + + weaponMenu.AddItem(new UIMenuListItem("Primäre", "", new ItemsCollection(secondaries))); + weaponMenu.AddItem(new UIMenuListItem("Sekundäre", "", new ItemsCollection(primaries))); weaponMenu.AddItem(new UIMenuListItem("Nahkampf", "", new ItemsCollection(melees))); weaponMenu.AddItem(new UIMenuListItem("Spezial", "", new ItemsCollection(specialsWep))); + weaponMenu.AddItem(dealItem); weaponMenu.AddItem(saveItem); weaponMenu.AddItem(cancelItem); weaponMenu.Visible = true; @@ -96,6 +103,10 @@ export default function weaponList(globalData: GlobalData) { } else if (item.Text === "Abbrechen") { weaponMenu.Close(); globalData.InMenu = false; + } else if (item.Text === "Waffentransport") { + mp.events.callRemote("startWeaponDeal"); + weaponMenu.Close(); + globalData.InMenu = false; } }); diff --git a/ReallifeGamemode.Client/assets/html/inventory/css/inventory.css b/ReallifeGamemode.Client/assets/html/inventory/css/inventory.css index 0c3bf2f2..4b4fad9a 100644 --- a/ReallifeGamemode.Client/assets/html/inventory/css/inventory.css +++ b/ReallifeGamemode.Client/assets/html/inventory/css/inventory.css @@ -619,7 +619,7 @@ t#tf_nameorid { text-align: center; text-decoration: none; display: inline-block; - font-size: 0.5vw; + font-size: 0.6vw; position: relative; left: 19vw; top: 13vw; @@ -634,7 +634,7 @@ t#tf_nameorid { text-align: center; text-decoration: none; display: inline-block; - font-size: 16px; + font-size: 0.5vw; font-color: white; position: relative; left: 17.8vw; @@ -723,7 +723,7 @@ t#tf_nameorid { text-align: center; text-decoration: none; display: inline-block; - font-size: 16px; + font-size: 0.5vw; font-color: white; position: relative; left: 17.8vw; @@ -731,7 +731,7 @@ t#tf_nameorid { color: #ffffff; opacity: 0.5; transition: 0.3s; -} +}i #tf_cancle3:hover { opacity: 1 @@ -753,7 +753,7 @@ t#tf_nameorid { text-align: center; text-decoration: none; display: inline-block; - font-size: 0.5vw; + font-size: 0.6vw; position: relative; left: 19vw; top: 13vw; @@ -768,7 +768,7 @@ t#tf_nameorid { text-align: center; text-decoration: none; display: inline-block; - font-size: 0.5vw; + font-size: 0.7vw; font-color: white; position: relative; left: 21vw; @@ -784,8 +784,8 @@ t#tf_nameorid { .BoxBlue { background-color: #1b1b1b; - height: 10vw; - width: 20vw; + height: 11.1vw; + width: 20.2vw; position: relative; margin-top: 11vw; margin-left: 16vw; @@ -809,12 +809,12 @@ t#tf_nameorid { #tf_submitZahlToHandel { background-color: #008CBA; border: none; - height: 1vw; + height: 1.4vw; width: 7vw; text-align: center; text-decoration: none; display: inline-block; - font-size: 0.4vw; + font-size: 0.6vw; position: relative; left: -3vw; top: 7vw; @@ -830,15 +830,15 @@ t#tf_nameorid { #tf_submitZahlToVehicle { background-color: #008CBA; border: none; - height: 1vw; - width: 8vw; + height: 1.3vw; + width: 7.8vw; text-align: center; text-decoration: none; display: inline-block; - font-size: 0.5vw; + font-size: 0.6vw; position: relative; left: 10.8vw; - top: 5.95vw; + top: 5.45vw; color: #ffffff; opacity: 0.5; transition: 0.3s; @@ -871,14 +871,14 @@ select.select_box2 { .blueIcon1 { position: relative; height: 3vw; - margin-bottom: -4vw; + margin-bottom: -3.1vw; margin-left: 13.4vw; } .blueIcon2 { position: relative; height: 3vw; - margin-bottom: -3.1vw; + margin-bottom: 0.9vw; margin-left: 3.4vw; } @@ -916,3 +916,56 @@ select.select_box2 { top: 3vw; color: #ffffff; } + + +.alert_green { + z-index: 2; + background: rgba(85, 255, 0, 0.90); + position: relative; + width: 17vw; + height: 1vw; + margin-left: 74.1vw; + padding-bottom: 3vw; + margin-top: -9.5vw; + font-family: 'OSL'; + font-size: 0.9vw; + text-align: center; + line-height: 3.9vw; +} + +.alert_red { + z-index: 2; + background: rgba(175, 0, 0, 0.9); + position: relative; + width: 17vw; + height: 1vw; + margin-left: 74.1vw; + padding-bottom: 3vw; + margin-top: -9.5vw; + font-family: 'OSL'; + text-align: center; + line-height: 3.9vw; + font-size: 0.7vw; + display: none; +} + +.alert_blue { + z-index: 2; + background: rgba(0, 140, 186, 0.90); + position: relative; + width: 17vw; + height: 1vw; + margin-left: 74.1vw; + padding-bottom: 3vw; + margin-top: -9.5vw; + font-family: 'OSL'; + text-align: center; + line-height: 3.9vw; + font-size: 0.7vw; + display: none; +} + +.alerts { + margin-bottom: 47.5vw; + padding-top: 43.3vw; +} \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/html/inventory/img/inventory/11.svg b/ReallifeGamemode.Client/assets/html/inventory/img/inventory/11.svg new file mode 100644 index 00000000..9a66c011 --- /dev/null +++ b/ReallifeGamemode.Client/assets/html/inventory/img/inventory/11.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/html/inventory/img/inventory/12.svg b/ReallifeGamemode.Client/assets/html/inventory/img/inventory/12.svg new file mode 100644 index 00000000..9a66c011 --- /dev/null +++ b/ReallifeGamemode.Client/assets/html/inventory/img/inventory/12.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/html/inventory/img/inventory/13.svg b/ReallifeGamemode.Client/assets/html/inventory/img/inventory/13.svg new file mode 100644 index 00000000..9a66c011 --- /dev/null +++ b/ReallifeGamemode.Client/assets/html/inventory/img/inventory/13.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/html/inventory/img/inventory/14.svg b/ReallifeGamemode.Client/assets/html/inventory/img/inventory/14.svg new file mode 100644 index 00000000..9a66c011 --- /dev/null +++ b/ReallifeGamemode.Client/assets/html/inventory/img/inventory/14.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/html/inventory/img/inventory/15.svg b/ReallifeGamemode.Client/assets/html/inventory/img/inventory/15.svg new file mode 100644 index 00000000..9a66c011 --- /dev/null +++ b/ReallifeGamemode.Client/assets/html/inventory/img/inventory/15.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/html/inventory/img/inventory/16.svg b/ReallifeGamemode.Client/assets/html/inventory/img/inventory/16.svg new file mode 100644 index 00000000..05c8e207 --- /dev/null +++ b/ReallifeGamemode.Client/assets/html/inventory/img/inventory/16.svg @@ -0,0 +1,36 @@ + + + diff --git a/ReallifeGamemode.Client/assets/html/inventory/inventory.html b/ReallifeGamemode.Client/assets/html/inventory/inventory.html index 5243a9ff..f32081e9 100644 --- a/ReallifeGamemode.Client/assets/html/inventory/inventory.html +++ b/ReallifeGamemode.Client/assets/html/inventory/inventory.html @@ -10,11 +10,15 @@
+