Fixed voice icon is now only been showed when loggedin
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* @copyright (c) 2008 - 2019 Life of German
|
||||
*/
|
||||
|
||||
export default function voice() {
|
||||
export default function voice(globalData: GlobalData) {
|
||||
|
||||
let dictLoaded = false;
|
||||
const Use3d = true;
|
||||
@@ -24,6 +24,7 @@ export default function voice() {
|
||||
|
||||
mp.events.add('render', () => {
|
||||
|
||||
if (globalData.LoggedIn) {
|
||||
if (!dictLoaded) {
|
||||
mp.game.graphics.requestStreamedTextureDict("voiceimages", true);
|
||||
dictLoaded = true;
|
||||
@@ -36,6 +37,7 @@ export default function voice() {
|
||||
} else {
|
||||
mp.game.graphics.drawSprite("voiceimages", "microphone-off", 0.165, 0.952, 0.015, 0.015 * (x / y), 0, 255, 51, 51, 255);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function addListener(target: PlayerMp) {
|
||||
|
||||
Binary file not shown.
@@ -9,11 +9,11 @@ let globalData: GlobalData = {
|
||||
HideGui: false,
|
||||
Interaction: false,
|
||||
InChat: false,
|
||||
LoggedIn = false
|
||||
LoggedIn: false
|
||||
};
|
||||
|
||||
import voice from './Voice/main';
|
||||
voice();
|
||||
voice(globalData);
|
||||
|
||||
import handMoney from './Gui/handmoney'
|
||||
handMoney();
|
||||
|
||||
Reference in New Issue
Block a user