diff --git a/Makefile b/Makefile index 336e5120..c2f82707 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,16 @@ -default: - ./build.py +default: mklocal +local: mklocal +mobile: mkmobile + +mklocal: + ./build.py local + +mkmobile: + ./build.py mobile + adb install -r build/mobile/IITC_Mobile-debug.apk + adb shell am start -n com.cradle.iitc_mobile/com.cradle.iitc_mobile.IITC_Mobile clean: ant -f mobile/build.xml clean + diff --git a/build.py b/build.py index 97f808e6..ec04387d 100755 --- a/build.py +++ b/build.py @@ -289,6 +289,7 @@ if buildMobile: if retcode != 0: print ("Error: mobile app failed to build. ant returned %d" % retcode) + exit(1) # ant may return 256, but python seems to allow only values <256 else: shutil.copy("mobile/bin/IITC_Mobile-%s.apk" % buildMobile, os.path.join(outDir,"IITC_Mobile-%s.apk" % buildMobile) ) diff --git a/mobile/plugins/user-location.css b/mobile/plugins/user-location.css new file mode 100644 index 00000000..c67b4c5e --- /dev/null +++ b/mobile/plugins/user-location.css @@ -0,0 +1,65 @@ +.user-location { + pointer-events: none; +} + +.user-location .container { + height: 32px; + width: 32px; + transform-origin: center; + -webkit-transform-origin: center; +} + +.user-location .container .inner, +.user-location .container .outer { + position: absolute; +} + +.user-location .res .inner { + background-color: #0088b3; + border-color: #0088b3; +} + +.user-location .res .outer { + background-color: #03baf4; + border-color: #03baf4; +} + +.user-location .enl .inner { + background-color: #1ee681; + border-color: #1ee681; +} + +.user-location .enl .outer { + background-color: #00aa4e; + border-color: #00aa4e; +} + +.user-location .circle .inner, +.user-location .circle .outer { + width: 32px; + height: 32px; + border-radius: 16px; +} + +.user-location .circle .inner { + transform: scale(0.6); + -webkit-transform: scale(0.6); +} + +.user-location .arrow .inner, +.user-location .arrow .outer { + left: 4px; + width: 0px; + height: 0px; + border-style: solid; + border-width: 0px 12px 32px; + border-left-color: transparent; + border-right-color: transparent; + background: transparent; +} + +.user-location .arrow .inner { + transform: scale(0.6) translateY(15%); + -webkit-transform: scale(0.6) translateY(15%); +} + diff --git a/mobile/plugins/user-location.user.js b/mobile/plugins/user-location.user.js index aefe7b62..783cb55e 100644 --- a/mobile/plugins/user-location.user.js +++ b/mobile/plugins/user-location.user.js @@ -1,7 +1,8 @@ // ==UserScript== // @id iitc-plugin-user-location@cradle // @name IITC plugin: User Location -// @version 0.1.4.@@DATETIMEVERSION@@ +// @category Tweaks +// @version 0.2.0.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ @@ -10,6 +11,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== @@PLUGINSTART@@ @@ -18,39 +20,85 @@ window.plugin.userLocation = function() {}; -window.plugin.userLocation.marker = {}; window.plugin.userLocation.locationLayer = new L.LayerGroup(); window.plugin.userLocation.setup = function() { + $('