-
Notifications
You must be signed in to change notification settings - Fork 155
Steam Events
Jan Petersen edited this page Sep 7, 2015
·
2 revisions
greenworks
is an EventEmitter, which is responsible for listening Steam events, an example of usage:
var greenworks = require('greenworks');
// Required to do initialized stuff before using greenworks' APIs
greenworks.initAPI();
function log(msg) {
console.log(msg);
}
greenworks.on('game-overlay-activated', function(is_active) {
if (is_active)
log('game overlay is activated');
else
log('game overlay is deactivated');
});
greenworks.on('steam-servers-connected', function() { log('connected')});
greenworks.on('steam-servers-disconnected', function() { log('disconnected')});
greenworks.on('steam-server-connect-failure', function() { log('connected failure')});
greenworks.on('steam-shutdown', function() { log('shutdown')});
Returns:
-
is_active
: Boolean - Indicates whether the game overlay is shown or hidden
Emits when game overlay activates or deactivates.
Emits when a game is connected to Steam server.
Emits when a game is disconnected to Steam server.
Emits when a game is failed to connect to Steam server.
Emits when Steam client is going to shutdown.