Debugger can now connect. AngularJS: I have no idea what I'm doing.
This commit is contained in:
26
debugger/assets/ui/console/console.html
Normal file
26
debugger/assets/ui/console/console.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<div class="console" ng-controller="ConsoleController">
|
||||
<div class="console-part-log">
|
||||
<div class="console-log-outer">
|
||||
<ul>
|
||||
<li ng-repeat="line in log.lines track by $index">{{line}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="console-part-input">
|
||||
<div class="console-input-left">
|
||||
</div>
|
||||
<div class="console-input-middle">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-addon">@</span>
|
||||
<input type="text" class="form-control" placeholder="Command" ng-model="commandText" ui-enter="issueCommand()">
|
||||
</div>
|
||||
</div>
|
||||
<div class="console-input-right">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button type="button" class="btn btn-default">A</button>
|
||||
<button type="button" class="btn btn-default">B</button>
|
||||
<button type="button" class="btn btn-default">C</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
34
debugger/assets/ui/console/console.js
Normal file
34
debugger/assets/ui/console/console.js
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* 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.ui.console', [
|
||||
'xe.log'
|
||||
]);
|
||||
|
||||
|
||||
module.controller('ConsoleController', function($scope, log) {
|
||||
$scope.log = log;
|
||||
|
||||
$scope.commandText = '';
|
||||
|
||||
$scope.issueCommand = function() {
|
||||
var command = $scope.commandText;
|
||||
$scope.commandText = '';
|
||||
if (!command) {
|
||||
return;
|
||||
}
|
||||
|
||||
log.appendLine('@' + command);
|
||||
|
||||
// TODO(benvanik): execute.
|
||||
console.log(command);
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user