diff --git a/code/modules/nano/nanomapgen.dm b/code/modules/nano/nanomapgen.dm index 9b674966d0a..6e1e3712d7a 100644 --- a/code/modules/nano/nanomapgen.dm +++ b/code/modules/nano/nanomapgen.dm @@ -17,7 +17,7 @@ //NOTE: Does not explicitly support non 32x32 icons or stuff with large pixel_* values, so don't blame me if it doesn't work perfectly /mob/verb/nanomapgen_DumpImage() - set category = "Admin" + set category = "Server" set name = "Generate NanoUI Map" if(!src.client.holder) diff --git a/nano/css/icons.css b/nano/css/icons.css index e7a9e919a6e..f3e207e63e5 100644 --- a/nano/css/icons.css +++ b/nano/css/icons.css @@ -235,6 +235,7 @@ background-image: url(uiIcons16Green.png); background-position: -144px -96px; background-repeat: no-repeat; + zoom: 0.125; } .mapIcon16.dead { background-image: url(uiIcons16Red.png); diff --git a/nano/css/layout_default.css b/nano/css/layout_default.css index 66ccd02a8e2..eae4d398586 100644 --- a/nano/css/layout_default.css +++ b/nano/css/layout_default.css @@ -70,25 +70,25 @@ body { position: absolute; top: 50%; left: 50%; - margin: -1024px 0 0 -1024px; - width: 2048px; - height: 2048px; + margin: -512px 0 0 -512px; + width: 256px; + height: 256px; + overflow: hidden; + zoom: 4; } #uiMapImage { position: absolute; - top: 0px; - left: 0px; - width: 2048px; - height: 2048px; + bottom: 2px; + left: -6px; } #uiMapContent { position: absolute; - top: 0px; + bottom: 0px; left: 0px; - width: 2048px; - height: 2048px; + width: 256px; + height: 256px; } #uiMapFooter { @@ -109,6 +109,7 @@ body { background-color: #272727; padding: 8px; display: none; + z-index: 9999; } #uiLoadingNotice { diff --git a/nano/css/shared.css b/nano/css/shared.css index 2cbeda5c6dc..632e76b6996 100644 --- a/nano/css/shared.css +++ b/nano/css/shared.css @@ -49,7 +49,7 @@ hr { padding: 0px 4px 4px 0px; } -a:hover, .linkActive:hover { +a:hover, .zoomLink:hover, .linkActive:hover { background: #507aac; } diff --git a/nano/images/nanomap.png b/nano/images/nanomap.png index b923d26d32a..8b9452337e9 100644 Binary files a/nano/images/nanomap.png and b/nano/images/nanomap.png differ diff --git a/nano/js/nano_base_callbacks.js b/nano/js/nano_base_callbacks.js index a04f5de2a61..adbfb38fa47 100644 --- a/nano/js/nano_base_callbacks.js +++ b/nano/js/nano_base_callbacks.js @@ -52,7 +52,7 @@ NanoBaseCallbacks = function () } }); }, - mapIcons: function (updateData) { + nanomap: function (updateData) { $('.mapIcon') .off('mouseenter mouseleave') .on('mouseenter', @@ -67,6 +67,24 @@ NanoBaseCallbacks = function () }); } ); + + $('.zoomLink') + .off('click') + .on('click', function (event) { + event.preventDefault(); + var zoomLevel = $(this).data('zoomLevel'); + var uiMapObject = $('#uiMap'); + var uiMapWidth = uiMapObject.width() * zoomLevel; + var uiMapHeight = uiMapObject.height() * zoomLevel; + + uiMapObject.css({ + zoom: zoomLevel, + left: '50%', + top: '50%', + marginLeft: '-' + Math.floor(uiMapWidth / 2) + 'px', + marginTop: '-' + Math.floor(uiMapHeight / 2) + 'px' + }); + }); } }; diff --git a/nano/templates/crew_monitor_map_content.tmpl b/nano/templates/crew_monitor_map_content.tmpl index 6eccc93f0a0..1a04f3fe9fb 100644 --- a/nano/templates/crew_monitor_map_content.tmpl +++ b/nano/templates/crew_monitor_map_content.tmpl @@ -4,7 +4,7 @@ Used In File(s): \code\game\machinery\computer\crew.dm --> {{for data.crewmembers}} {{if value.sensor_type == 3}} -
+
diff --git a/nano/templates/crew_monitor_map_header.tmpl b/nano/templates/crew_monitor_map_header.tmpl index 2793e66c27b..f9f5e2f707d 100644 --- a/nano/templates/crew_monitor_map_header.tmpl +++ b/nano/templates/crew_monitor_map_header.tmpl @@ -2,4 +2,11 @@ Title: Crew Monitoring Console (Map header) Used In File(s): \code\game\machinery\computer\crew.dm --> -{{:helper.link('Show Detail List', 'script', {'showMap' : 0})}} \ No newline at end of file +{{:helper.link('Show Detail List', 'script', {'showMap' : 0})}} +
+ Zoom Level:  + + + + +
\ No newline at end of file diff --git a/nano/templates/layout_default.tmpl b/nano/templates/layout_default.tmpl index 03b705834b4..ad63ff3bfe5 100644 --- a/nano/templates/layout_default.tmpl +++ b/nano/templates/layout_default.tmpl @@ -2,11 +2,18 @@