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/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/inventory.html b/ReallifeGamemode.Client/assets/html/inventory/inventory.html index d60564c4..f32081e9 100644 --- a/ReallifeGamemode.Client/assets/html/inventory/inventory.html +++ b/ReallifeGamemode.Client/assets/html/inventory/inventory.html @@ -10,6 +10,10 @@
+