Function listing and selection.
This commit is contained in:
@@ -14,10 +14,12 @@ var module = angular.module('app', [
|
||||
'ui.router',
|
||||
'xe.datasources',
|
||||
'xe.directives',
|
||||
'xe.filters',
|
||||
'xe.log',
|
||||
'xe.router',
|
||||
'xe.session',
|
||||
'xe.ui.code',
|
||||
'xe.ui.code.functionView',
|
||||
'xe.ui.console',
|
||||
'xe.ui.navbar'
|
||||
]);
|
||||
|
||||
@@ -63,17 +63,17 @@ module.service('DataSource', function($q) {
|
||||
});
|
||||
};
|
||||
|
||||
DataSource.prototype.getModule = function(moduleId) {
|
||||
DataSource.prototype.getModule = function(moduleName) {
|
||||
return this.issue({
|
||||
command: 'cpu.get_module',
|
||||
moduleId: moduleId
|
||||
module: moduleName
|
||||
});
|
||||
};
|
||||
|
||||
DataSource.prototype.getFunctionList = function(moduleId) {
|
||||
DataSource.prototype.getFunctionList = function(moduleName) {
|
||||
return this.issue({
|
||||
command: 'cpu.get_function_list',
|
||||
moduleId: moduleId
|
||||
module: moduleName
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -24,3 +24,17 @@ module.directive('uiEnter', function() {
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
module.directive('uiEscape', function() {
|
||||
return function($scope, element, attrs) {
|
||||
element.bind("keydown keypress", function(e) {
|
||||
if(e.which === 27) {
|
||||
$scope.$apply(function(){
|
||||
$scope.$eval(attrs.uiEscape);
|
||||
});
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
23
debugger/src/filters.js
Normal file
23
debugger/src/filters.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* 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.filters', []);
|
||||
|
||||
|
||||
module.filter("hex32", function() {
|
||||
return function(number) {
|
||||
if (number !== null && number !== undefined) {
|
||||
var str = "" + number.toString(16).toUpperCase();
|
||||
while (str.length < 8) str = "0" + str;
|
||||
return str;
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -26,7 +26,7 @@ module.config(function($stateProvider, $urlRouterProvider) {
|
||||
templateUrl: 'assets/ui/session.html',
|
||||
resolve: {
|
||||
app: 'app',
|
||||
session: function($stateParams, $urlRouter, $state, $q, $timeout,
|
||||
session: function($stateParams, $state, $q,
|
||||
Session, app) {
|
||||
// If we are given a session we assume the user is trying to connect to
|
||||
// it. Attempt that now. If we fail we redirect to home, otherwise we
|
||||
@@ -100,7 +100,11 @@ module.config(function($stateProvider, $urlRouterProvider) {
|
||||
$stateProvider.state('session.code.function', {
|
||||
url: '/:module/:function',
|
||||
templateUrl: 'assets/ui/code/function-view.html',
|
||||
controller: function($stateParams) {
|
||||
controller: function($scope, $stateParams) {
|
||||
$scope.moduleName = $stateParams.module;
|
||||
$scope.functionAddress = parseInt($stateParams.function, 16);
|
||||
$scope.$emit('xxx');
|
||||
$scope.$broadcast('yyy');
|
||||
},
|
||||
onEnter: function() {},
|
||||
onExit: function() {}
|
||||
|
||||
Reference in New Issue
Block a user