Debugger can now connect. AngularJS: I have no idea what I'm doing.
This commit is contained in:
45
debugger/src/log.js
Normal file
45
debugger/src/log.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var module = angular.module('xe.log', []);
|
||||
|
||||
|
||||
module.service('log', function($rootScope) {
|
||||
var Log = function() {
|
||||
this.lines = [];
|
||||
|
||||
this.progressActive = false;
|
||||
this.progress = 0;
|
||||
};
|
||||
|
||||
Log.prototype.appendLine = function(line) {
|
||||
this.lines.push(line);
|
||||
};
|
||||
|
||||
Log.prototype.info = function(line) {
|
||||
this.appendLine('I ' + line);
|
||||
};
|
||||
|
||||
Log.prototype.error = function(line) {
|
||||
this.appendLine('E ' + line);
|
||||
};
|
||||
|
||||
Log.prototype.setProgress = function(value) {
|
||||
this.progressActive = true;
|
||||
this.progress = value;
|
||||
};
|
||||
|
||||
Log.prototype.clearProgress = function() {
|
||||
this.progressActive = false;
|
||||
};
|
||||
|
||||
return new Log();
|
||||
});
|
||||
Reference in New Issue
Block a user