diff --git a/src/app/assets/custom.css b/src/app/assets/custom.css index 5de92a57..72208721 100644 --- a/src/app/assets/custom.css +++ b/src/app/assets/custom.css @@ -2,6 +2,7 @@ html, body { overflow:hidden; background-color: #424242; + font-size: 14px !important; } #app { @@ -9,7 +10,7 @@ color: white; opacity: 0; } - + #app.show { opacity:1; } @@ -18,23 +19,17 @@ color: black; } - * { + * {# -webkit-user-select: none; /* Chrome all / Safari all */ user-select: none; } - .md-input-focused > .filterlabel { - opacity: 0; - } - - i.controlbtn { - + .filtericon { + color: #677e89; + font-size: 25px !important; } - - .slimscroll-l { - height: 570px; - } - + + .customAboutContainer img { border-radius: 100%; width: 120px; @@ -97,14 +92,9 @@ .btn-sort:hover { background-color: rgba(158, 158, 158, 0.4); } - - md-bottom-sheet { - color: black; - } - + md-bottom-sheet .md-subheader .md-subheader-inner { - padding: 0 !important; - color: black; + padding: 0 !important; } .gameholder { @@ -173,12 +163,17 @@ } md-bottom-sheet.md-grid md-list-item .md-grid-item-content { - width: 70px !important; + width: 70px !important; } + md-bottom-sheet.md-grid md-list-item { + padding: 5px; + } + .md-tab { max-width: 100% !important; } + md-bottom-sheet md-list-item:hover { background-color: transparent; } @@ -213,7 +208,6 @@ transform: scale(0); opacity:0; } - .repeat-animation.ng-enter, .repeat-animation.ng-leave, diff --git a/src/app/controllers/appController.js b/src/app/controllers/appController.js index e19d25ba..cef6db49 100644 --- a/src/app/controllers/appController.js +++ b/src/app/controllers/appController.js @@ -2,6 +2,13 @@ app.controller('appController', ['$scope', '$mdDialog', '$mdToast', '$mdBottomSheet', '$mdSidenav', 'modlistService', '$http', 'iwadService', 'nwService', appController]); function appController($scope, $mdDialog, $mdToast, $mdBottomSheet, $mdSidenav, modlistService, $http, iwadService, nwService) { + var $PARENT = $scope; + var TOASTDELAY = 1500; + + $mdToast.show( + $mdToast.simple() + .content('Checking for Updates...').position('bottom').hideDelay(TOASTDELAY) + ); $http.get('https://raw.githubusercontent.com/FreaKzero/ssgl-doom-launcher/master/package.json'). then(function(response) { @@ -12,7 +19,7 @@ $scope.downloadversion = response.data.version; $scope.download = function(url) { - var release = 'https://github.com/FreaKzero/ssgl-doom-launcher/releases/tag/v'+response.data.version; + var release = 'https://github.com/FreaKzero/ssgl-doom-launcher/releases/tag/v' + response.data.version; nwService.getShell().openExternal(release); }; @@ -31,10 +38,6 @@ console.log('ERROR: ' + response); }); - - var $PARENT = $scope; - var TOASTDELAY = 1500; - if ($scope.config.freshinstall === true) { SettingsDialog(null); } @@ -76,7 +79,6 @@ }); function AboutDialogController($scope, $mdBottomSheet) { - console.log($PARENT.APPVERSION) $scope.version = $PARENT.APPVERSION; $scope.openURL = function(url) { nwService.getShell().openExternal(url); @@ -97,6 +99,8 @@ }); function GameSelectionController($scope, $mdBottomSheet, iwadService) { + $scope.useoblige = false; + iwadService.getIWADS($PARENT.config.iwadpath).then(function(iwads) { $scope.iwads = iwads; }); @@ -111,11 +115,14 @@ $scope.engine = 'gzDoom'; } - $scope.startGame = function($index, engine) { - var iwad = $scope.iwads[$index].file; - - $PARENT.$broadcast('STARTGZDOOM', iwad, false, engine); - $mdBottomSheet.hide(); + $scope.startGame = function($index, engine, $event) { + if ($scope.useoblige === false) { + var iwad = $scope.iwads[$index].file; + $PARENT.$broadcast('STARTGZDOOM', iwad, false, engine); + $mdBottomSheet.hide(); + } else { + $scope.startGameOblige($event, $index, engine); + } }; $scope.startGameOblige = function(ev, $index, engine) { @@ -152,7 +159,7 @@ }; $scope.continue = function() { - $PARENT.$broadcast('STARTGZDOOM', iwad, $PARENT.config.oblige.mappath, engine); + $PARENT.$broadcast('STARTGZDOOM', iwad, $PARENT.config.oblige.mappath, engine, $mdDialog); }; $scope.cancel = function() { diff --git a/src/app/controllers/modController.js b/src/app/controllers/modController.js index d3367313..65b3ef5b 100644 --- a/src/app/controllers/modController.js +++ b/src/app/controllers/modController.js @@ -1,9 +1,9 @@ (function() { var execFile = require('child_process').execFile; - app.controller('modController', ['$scope', 'modService', 'modlistService', '$mdDialog', 'nwService','modselectedService', modController]); + app.controller('modController', ['$scope', 'modService', 'modlistService', '$mdDialog', 'nwService','modselectedService', '$mdToast', modController]); - function modController($scope, modService, modlistService, $mdDialog, nwService, modselectedService) { + function modController($scope, modService, modlistService, $mdDialog, nwService, modselectedService, $mdToast) { var self = this; var $parent = $scope; @@ -79,7 +79,20 @@ $scope.checkdoubles = function() {}; $scope.submitForm = function() { - modlistService.saveSelected($scope.listname, $parent.selected); + modlistService.saveSelected($scope.listname, $parent.selected).then(function(listname) { + $mdToast.show( + $mdToast.simple() + .content('Saved List to '+listname).position('bottom').hideDelay(1500) + ); + }, function(error) { + $mdToast.show( + $mdToast.simple() + .content(error.message).position('bottom').hideDelay(1500) + ); + }); + + + $parent.usedList = $scope.listname; $mdDialog.cancel(); }; @@ -110,7 +123,7 @@ }); } }; - + $scope.$on('STARTOBLIGE', function(ev, iwad, config, engine, log) { $mdDialog.show({ templateUrl: 'app/templates/ObligeLoading.html', @@ -145,11 +158,15 @@ }); }); - $scope.$on('STARTGZDOOM', function(ev, iwad, map, engine) { + $scope.$on('STARTGZDOOM', function(ev, iwad, map, engine, dialog) { if (typeof map === 'undefined') { map = false; } + if (typeof dialog === 'undefined') { + dialog = false; + } + var child; var SAVEDIR; var useEngine = ""; @@ -175,6 +192,17 @@ SAVEDIR = $scope.config.savepaths.zandronum + 'default'; } break; + + case "zdoom": + useEngine = $scope.config.engines.zdoom; + + if ($scope.usedList !== false) { + SAVEDIR = $scope.config.savepaths.zdoom + $scope.usedList; + } else { + SAVEDIR = $scope.config.savepaths.zdoom + 'default'; + } + + break; } var params = ['-iwad', $scope.config.iwadpath + iwad, '-savedir', SAVEDIR]; @@ -186,9 +214,13 @@ wads.push(map); } + if (dialog !== false) { + dialog.hide(); + } + params = params.concat(['-file'], wads); - console.log(params); child = execFile(useEngine, params, + function(error, stdout, stderr) { if (error) { console.log(error.stack); diff --git a/src/app/controllers/modlistController.js b/src/app/controllers/modlistController.js index d8909088..dd145701 100644 --- a/src/app/controllers/modlistController.js +++ b/src/app/controllers/modlistController.js @@ -1,7 +1,7 @@ (function() { - app.controller('modlistController', ['$scope', 'modlistService', '$rootScope', '$mdDialog', modlistController]); + app.controller('modlistController', ['$scope', 'modlistService', '$rootScope', '$mdDialog', '$mdToast', modlistController]); - function modlistController($scope, modlistService, $rootScope, $mdDialog) { + function modlistController($scope, modlistService, $rootScope, $mdDialog, $mdToast) { modlistService.getLists().then(function(list) { $scope.modlist = list; @@ -37,11 +37,21 @@ }; $scope.submitForm = function(valid) { - - if (valid && $scope.double.length === 0) { item.name = $scope.listname; - modlistService.rename(item); + + modlistService.rename(item).then(function(renamed) { + $mdToast.show( + $mdToast.simple() + .content('List renamed to ' + renamed).position('bottom').hideDelay(1500) + ); + }, function(error) { + $mdToast.show( + $mdToast.simple() + .content(error.message).position('bottom').hideDelay(1500) + ); + }); + $mdDialog.cancel(); } }; @@ -61,7 +71,19 @@ .targetEvent(ev); $mdDialog.show(confirm).then(function() { - modlistService.remove($scope.modlist[$index]); + + modlistService.remove($scope.modlist[$index]).then(function(listname) { + $mdToast.show( + $mdToast.simple() + .content('List ' + listname + ' removed').position('bottom').hideDelay(1500) + ); + }, function(error) { + $mdToast.show( + $mdToast.simple() + .content(error.message).position('bottom').hideDelay(1500) + ); + }); + $scope.modlist.splice($index, 1); }, function() { $mdDialog.cancel(); diff --git a/src/app/directives/directory-chooser.js b/src/app/directives/directory-chooser.js index 37428c04..74c78b46 100644 --- a/src/app/directives/directory-chooser.js +++ b/src/app/directives/directory-chooser.js @@ -1,5 +1,5 @@ (function() { - app.directive('dirChoose', function() { + app.directive('dirChoose', ['nwService', function(nwService) { return { restrict: 'AE', replace: 'true', @@ -13,7 +13,12 @@ template: '
Build and Play (Oblige)
+{{ mod.dir }}
+Sorry, No Mods Found
+{{ mod.dir }}
++
+
{{ mod.dir }}
-Sorry, No Mods Found
-{{ mod.dir }}
--
-