");
- if (area && pos_x && pos_y) { tdElem.append($("").text(area).addClass("tt").append($("").append($("").text("(" + pos_x + ", " + pos_y + ")")))); }
+ if (area && pos_x && pos_y)
+ {
+ tdElem.append($("").text(area).addClass("tt").append($("").append($("").text("(" + pos_x + ", " + pos_y + ")"))));
+ tdElem.css("cursor", "pointer").on("click", function()
+ {
+ window.clipboardData.setData("Text", pos_x + ", " + pos_y);
+ });
+ }
else { tdElem.text("Not Available"); }
trElem.append(tdElem);
@@ -363,20 +516,24 @@ function add(name, assignment, ijob, life_status, dam1, dam2, dam3, dam4, area,
var x = parseInt(pos_x);
var y = maxy - parseInt(pos_y);
- var tx = (translate(x - 1, scale_x) - 1.5).toFixed(0);
- var ty = (translate(y - 1, scale_y) + 3).toFixed(0);
+ var tx = translateX(x);
+ var ty = translateY(y);
- var dotElem = $("");
+ var dotElem = $("");
$("#minimap").append(dotElem);
+ var counter = 0;
+
function enable()
{
+ ++counter;
dotElem.addClass("active").css({ "border-color": color });
}
function disable()
{
+ ++counter;
dotElem.removeClass("active").css({ "border-color": "transparent" });
}
@@ -388,7 +545,27 @@ function add(name, assignment, ijob, life_status, dam1, dam2, dam3, dam4, area,
window.location.href = "byond://?src=" + hSrc + "&action=select_person&name=" + encodeURIComponent(name);
}
- trElem.on("mouseover", enable).on("mouseout", disable).on("click", click);
+ trElem.on("mouseover", function()
+ {
+ enable();
+
+ if (zoom_factor > 1.00)
+ {
+ var c = counter;
+ setTimeout(function()
+ {
+ if (c == counter)
+ {
+ var minimap = document.getElementById("minimap");
+ var half = $(minimap).height() / 2;
+ var offset = $(dotElem).offset();
+
+ minimap.scrollLeft = offset.left + minimap.scrollLeft - half;
+ minimap.scrollTop = offset.top + minimap.scrollTop - half;
+ }
+ }, 100);
+ }
+ }).on("mouseout", disable).on("click", click);
dotElem.on("mouseover", function()
{
trElem.addClass("hover");
@@ -402,6 +579,9 @@ function add(name, assignment, ijob, life_status, dam1, dam2, dam3, dam4, area,
}
}
+function translateX(n) { return (translate(n - 1.5, scale_x) ).toFixed(0); }
+function translateY(n) { return (translate(n + 0.75, scale_y) ).toFixed(0); }
+
function translate(n, scale)
{
return (n * tile_size) * scale;
diff --git a/code/modules/html_interface/bootstrap.min.css b/code/modules/html_interface/css/bootstrap.min.css
similarity index 100%
rename from code/modules/html_interface/bootstrap.min.css
rename to code/modules/html_interface/css/bootstrap.min.css
diff --git a/code/modules/html_interface/html_interface.css b/code/modules/html_interface/css/html_interface.css
similarity index 100%
rename from code/modules/html_interface/html_interface.css
rename to code/modules/html_interface/css/html_interface.css
diff --git a/code/modules/html_interface/html_interface.dm b/code/modules/html_interface/html_interface.dm
index 2e3359e80c4..ffc04407f66 100644
--- a/code/modules/html_interface/html_interface.dm
+++ b/code/modules/html_interface/html_interface.dm
@@ -127,11 +127,11 @@ mob/verb/test()
/datum/html_interface/proc/specificRenderTitle(datum/html_interface_client/hclient, ignore_cache = FALSE)
/datum/html_interface/proc/sendResources(client/client)
- client << browse_rsc('jquery.min.js')
- client << browse_rsc('bootstrap.min.js')
- client << browse_rsc('bootstrap.min.css')
- client << browse_rsc('html_interface.css')
- client << browse_rsc('html_interface.js')
+ client << browse_rsc('js/jquery.min.js', "jquery.min.js")
+ client << browse_rsc('js/bootstrap.min.js', "bootstrap.min.js")
+ client << browse_rsc('css/bootstrap.min.css', "bootstrap.min.css")
+ client << browse_rsc('css/html_interface.css', "html_interface.css")
+ client << browse_rsc('js/html_interface.js', "html_interface.js")
/datum/html_interface/proc/createWindow(datum/html_interface_client/hclient)
winclone(hclient.client, "window", "browser_\ref[src]")
@@ -212,14 +212,15 @@ mob/verb/test()
// causing file not found errors.
// src.sendResources(hclient.client)
- if (winexists(hclient.client, "browser_\ref[src]"))
- src._renderTitle(hclient, TRUE)
- src._renderLayout(hclient)
- else
+ if (!winexists(hclient.client, "browser_\ref[src]"))
src.createWindow(hclient)
- hclient.is_loaded = FALSE
- hclient.client << output(replacetextEx(replacetextEx(file2text('html_interface.html'), "\[hsrc\]", "\ref[src]"), "", "[head]"), "browser_\ref[src].browser")
- winshow(hclient.client, "browser_\ref[src]", TRUE)
+ //src._renderTitle(hclient, TRUE)
+ //src._renderLayout(hclient)
+
+ hclient.is_loaded = FALSE
+ hclient.client << output(replacetextEx(replacetextEx(file2text('html_interface.html'), "\[hsrc\]", "\ref[src]"), "", "[head]"), "browser_\ref[src].browser")
+
+ winshow(hclient.client, "browser_\ref[src]", TRUE)
while (hclient.client && hclient.active && !hclient.is_loaded) sleep(2)
diff --git a/code/modules/html_interface/html_interface.html b/code/modules/html_interface/html_interface.html
index 1231c21df53..4bf76c6180a 100644
--- a/code/modules/html_interface/html_interface.html
+++ b/code/modules/html_interface/html_interface.html
@@ -8,6 +8,7 @@
+
diff --git a/code/modules/html_interface/bootstrap.min.js b/code/modules/html_interface/js/bootstrap.min.js
similarity index 100%
rename from code/modules/html_interface/bootstrap.min.js
rename to code/modules/html_interface/js/bootstrap.min.js
diff --git a/code/modules/html_interface/html_interface.js b/code/modules/html_interface/js/html_interface.js
similarity index 100%
rename from code/modules/html_interface/html_interface.js
rename to code/modules/html_interface/js/html_interface.js
diff --git a/code/modules/html_interface/jquery.min.js b/code/modules/html_interface/js/jquery.min.js
similarity index 100%
rename from code/modules/html_interface/jquery.min.js
rename to code/modules/html_interface/js/jquery.min.js
diff --git a/code/modules/html_interface/nanotrasen/nanotrasen.dm b/code/modules/html_interface/nanotrasen/nanotrasen.dm
index 1196b221785..3c1cfa47ef6 100644
--- a/code/modules/html_interface/nanotrasen/nanotrasen.dm
+++ b/code/modules/html_interface/nanotrasen/nanotrasen.dm
@@ -21,7 +21,7 @@ The client is optional and may be a /mob, /client or /html_interface_client obje
src.head = src.head + ""
src.updateLayout("")
-/datum/html_interface/updateLayout(layout)
+/datum/html_interface/nanotrasen/updateLayout(layout)
// Wrap the layout in our custom HTML
return ..("
[layout]
")
diff --git a/html/changelogs/nullquery-hi-extended.yml b/html/changelogs/nullquery-hi-extended.yml
new file mode 100644
index 00000000000..592b15ae7fd
--- /dev/null
+++ b/html/changelogs/nullquery-hi-extended.yml
@@ -0,0 +1,10 @@
+author: NullQuery
+
+# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
+delete-after: True
+
+changes:
+ - tweak: "Crew monitoring: The minimap now supports scaling. You can zoom in and out using the buttons. Hovering over an entry in the table centers the minimap on that part of the screen."
+ - tweak: "Crew monitoring: If the window is wide enough the health indicator will expand to show full health data (if available)."
+ - tweak: "Crew monitoring: Clicking on the area name will now copy the coordinates to your clipboard."
+ - tweak: "Crew monitoring: The AI can view health information again, but there is a 5 second delay between updates for everyone watching."