Ticket #2950: GuiNotification.patch

File GuiNotification.patch, 818 bytes (added by Niek, 9 years ago)

A patch for the GUI notification

  • binaries/data/mods/public/maps/scripts/TriggerHelper.js

     
    162162    return (classes && classes.indexOf(classname) != -1);
    163163};
    164164
     165//Post a GUI notification
     166//@param players: Array of playerIDs to post the message to
     167//@param message: the to be posted message in a String
     168function GUINotification(players, message) {
     169    var cmpGUIInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface);
     170    cmpGUIInterface.PushNotification({
     171        "players": players,
     172        "message": message,
     173        translateMessage: true
     174    });
     175}
     176
    165177Engine.RegisterGlobal("TriggerHelper", TriggerHelper);